N3DS: Move gfxInit and hidInit from main to video.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
diff --git a/src/main/n3ds/SDL_n3ds_main.c b/src/main/n3ds/SDL_n3ds_main.c
index 244d73c..1ccd014 100644
--- a/src/main/n3ds/SDL_n3ds_main.c
+++ b/src/main/n3ds/SDL_n3ds_main.c
@@ -49,15 +49,11 @@ N3DS_Init(void)
{
osSetSpeedupEnable(true);
romfsInit();
- gfxInit(GSP_RGBA8_OES, GSP_RGBA8_OES, false);
- hidInit();
}
SDL_FORCE_INLINE void
N3DS_Quit(void)
{
- hidExit();
- gfxExit();
romfsExit();
}
diff --git a/src/video/n3ds/SDL_n3dsvideo.c b/src/video/n3ds/SDL_n3dsvideo.c
index cd5e010..e3f79cb 100644
--- a/src/video/n3ds/SDL_n3dsvideo.c
+++ b/src/video/n3ds/SDL_n3dsvideo.c
@@ -95,6 +95,9 @@ VideoBootStrap N3DS_bootstrap = { N3DSVID_DRIVER_NAME, "N3DS Video Driver", N3DS
static int
N3DS_VideoInit(_THIS)
{
+ gfxInit(GSP_RGBA8_OES, GSP_RGBA8_OES, false);
+ hidInit();
+
AddN3DSDisplay(GFX_TOP);
AddN3DSDisplay(GFX_BOTTOM);
@@ -139,7 +142,9 @@ N3DS_VideoQuit(_THIS)
{
N3DS_SwkbQuit();
N3DS_QuitTouch();
- return;
+
+ hidExit();
+ gfxExit();
}
static void