From a910da07992b41a7bc18ceac2b8af3cb1201108c Mon Sep 17 00:00:00 2001 From: fincs Date: Wed, 19 Dec 2018 20:07:11 +0100 Subject: [PATCH] Update for latest libnx gfx/console changes --- source/console.c | 9 +++++---- source/main.c | 6 ++---- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/source/console.c b/source/console.c index ad74114..8591a86 100644 --- a/source/console.c +++ b/source/console.c @@ -217,13 +217,14 @@ console_render(void) print_tcp_table(); #endif /* flush framebuffer */ - gfxFlushBuffers(); #ifdef _3DS + gfxFlushBuffers(); gspWaitForVBlank(); -#else - gfxWaitForVsync(); -#endif gfxSwapBuffers(); +#endif +#ifdef __SWITCH__ + consoleUpdate(NULL); +#endif } diff --git a/source/main.c b/source/main.c index 3f5217c..bf87f2c 100644 --- a/source/main.c +++ b/source/main.c @@ -35,8 +35,8 @@ loop(loop_status_t (*callback)(void)) #elif defined(__SWITCH__) while(appletMainLoop()) { - status = callback(); console_render(); + status = callback(); if(status != LOOP_CONTINUE) return status; } @@ -107,9 +107,7 @@ main(int argc, sdmcWriteSafe(false); /* initialize needed Switch services */ #elif defined(__SWITCH__) - //gfxInitResolution(644, 480); nifmInitialize(); - gfxInitDefault(); #endif /* initialize console subsystem */ @@ -177,7 +175,7 @@ log_fail: loop(wait_for_b); /* deinitialize Switch services */ - gfxExit(); + consoleExit(NULL); nifmExit(); #endif return 0;