diff --git a/src/Platform_NDS.c b/src/Platform_NDS.c index a56ba63f5..54089983d 100644 --- a/src/Platform_NDS.c +++ b/src/Platform_NDS.c @@ -66,17 +66,18 @@ cc_uint64 Stopwatch_Measure(void) { static void LogNocash(const char* msg, int len) { // Can only be up to 120 bytes total char buffer[120]; - len = min(len, 119); + len = min(len, 118); Mem_Copy(buffer, msg, len); - buffer[len] = '\n'; - nocashWrite(buffer, len + 1); + buffer[len + 0] = '\n'; + buffer[len + 1] = '\0'; + nocashWrite(buffer, len + 2); } extern void consolePrintString(const char* ptr, int len); void Platform_Log(const char* msg, int len) { LogNocash(msg, len); - if (!keyboardOpen) consolePrintString(msg, len); + consolePrintString(msg, len); } TimeMS DateTime_CurrentUTC(void) { diff --git a/src/Window_WiiU.c b/src/Window_WiiU.c index 7c013ebd6..2e2bdf13e 100644 --- a/src/Window_WiiU.c +++ b/src/Window_WiiU.c @@ -269,7 +269,7 @@ void Window_AllocFramebuffer(struct Bitmap* bmp) { bmp->scan0 = (BitmapCol*)Mem_Alloc(bmp->width * bmp->height, 4, "window pixels"); } -static void DrawIt(struct Bitmap* bmp) { +static void DrawIt(void) { Gfx_LoadIdentityMatrix(MATRIX_VIEW); Gfx_LoadIdentityMatrix(MATRIX_PROJECTION); Gfx_SetDepthTest(false); @@ -281,19 +281,18 @@ static void DrawIt(struct Bitmap* bmp) { Gfx_DrawVb_IndexedTris(4); } -static void DrawTV(struct Bitmap* bmp) { +static void DrawTV(void) { WHBGfxBeginRenderTV(); WHBGfxClearColor(0.0f, 0.0f, 1.0f, 1.0f); - DrawIt(bmp); + DrawIt(); WHBGfxFinishRenderTV(); } -static void DrawDRC(struct Bitmap* bmp) { +static void DrawDRC(void) { WHBGfxBeginRenderDRC(); WHBGfxClearColor(1.0f, 0.0f, 0.0f, 1.0f); - DrawIt(bmp); + DrawIt(); WHBGfxFinishRenderDRC(); - } void Window_DrawFramebuffer(Rect2D r, struct Bitmap* bmp) { @@ -306,8 +305,8 @@ void Window_DrawFramebuffer(Rect2D r, struct Bitmap* bmp) { Gfx_UpdateTexture(&fb, r.x, r.y, &part, bmp->width, false); WHBGfxBeginRender(); - DrawTV(bmp); - DrawDRC(bmp); + DrawTV(); + DrawDRC(); WHBGfxFinishRender(); }