Skip to content

Commit

Permalink
Update for latest libnx gfx/console changes
Browse files Browse the repository at this point in the history
  • Loading branch information
fincs committed Dec 19, 2018
1 parent 97081b8 commit a910da0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
9 changes: 5 additions & 4 deletions source/console.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
}


Expand Down
6 changes: 2 additions & 4 deletions source/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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 */
Expand Down Expand Up @@ -177,7 +175,7 @@ main(int argc,
loop(wait_for_b);

/* deinitialize Switch services */
gfxExit();
consoleExit(NULL);
nifmExit();
#endif
return 0;
Expand Down

0 comments on commit a910da0

Please sign in to comment.