diff --git a/retro-core/main/main.c b/retro-core/main/main.c index b93e4052..876f9749 100644 --- a/retro-core/main/main.c +++ b/retro-core/main/main.c @@ -1,11 +1,9 @@ #include "shared.h" -rg_app_t *app; - void app_main(void) { - app = rg_system_init(AUDIO_SAMPLE_RATE, NULL, NULL); + rg_app_t *app = rg_system_init(AUDIO_SAMPLE_RATE, NULL, NULL); RG_LOGI("configNs=%s", app->configNs); diff --git a/retro-core/main/main_gbc.c b/retro-core/main/main_gbc.c index 4c34670a..5d26ae26 100644 --- a/retro-core/main/main_gbc.c +++ b/retro-core/main/main_gbc.c @@ -15,6 +15,7 @@ static int autoSaveSRAM_Timer = 0; static bool useSystemTime = true; static bool loadBIOSFile = false; +static rg_app_t *app; static rg_surface_t *updates[2]; static rg_surface_t *currentUpdate; diff --git a/retro-core/main/main_gw.c b/retro-core/main/main_gw.c index f815b84d..2ebe6b42 100644 --- a/retro-core/main/main_gw.c +++ b/retro-core/main/main_gw.c @@ -22,6 +22,7 @@ static bool softkey_A_pressed = 0; static bool softkey_only = 0; static int softkey_duration = 0; +static rg_app_t *app; static rg_surface_t *updates[2]; static rg_surface_t *currentUpdate; diff --git a/retro-core/main/main_lynx.cpp b/retro-core/main/main_lynx.cpp index bfba361b..8bfb5486 100644 --- a/retro-core/main/main_lynx.cpp +++ b/retro-core/main/main_lynx.cpp @@ -14,6 +14,7 @@ static int dpad_mapped_down; static int dpad_mapped_left; static int dpad_mapped_right; +static rg_app_t *app; static rg_surface_t *updates[2]; static rg_surface_t *currentUpdate; // static bool netplay = false; diff --git a/retro-core/main/main_nes.c b/retro-core/main/main_nes.c index e87933dd..9abfc5e2 100644 --- a/retro-core/main/main_nes.c +++ b/retro-core/main/main_nes.c @@ -9,6 +9,7 @@ static bool slowFrame = false; static bool nsfPlayer = false; static nes_t *nes; +static rg_app_t *app; static rg_surface_t *updates[2]; static rg_surface_t *currentUpdate; diff --git a/retro-core/main/main_pce.c b/retro-core/main/main_pce.c index 6ac33421..54d8501a 100644 --- a/retro-core/main/main_pce.c +++ b/retro-core/main/main_pce.c @@ -18,6 +18,7 @@ static int skipFrames = 0; static bool drawFrame = true; static bool slowFrame = false; +static rg_app_t *app; static rg_surface_t *updates[2]; static rg_surface_t *currentUpdate; diff --git a/retro-core/main/main_sms.c b/retro-core/main/main_sms.c index ca81cdec..670d14ab 100644 --- a/retro-core/main/main_sms.c +++ b/retro-core/main/main_sms.c @@ -2,6 +2,7 @@ #include +static rg_app_t *app; static rg_surface_t *updates[2]; static rg_surface_t *currentUpdate; diff --git a/retro-core/main/main_snes.c b/retro-core/main/main_snes.c index aa0901c2..544d1b6d 100644 --- a/retro-core/main/main_snes.c +++ b/retro-core/main/main_snes.c @@ -66,6 +66,7 @@ static const char *SNES_BUTTONS[] = { #define AUDIO_LOW_PASS_RANGE ((60 * 65536) / 100) +static rg_app_t *app; static rg_surface_t *updates[2]; static rg_surface_t *currentUpdate; static rg_audio_sample_t *audioBuffer; diff --git a/retro-core/main/shared.h b/retro-core/main/shared.h index 3939800f..49c10e24 100644 --- a/retro-core/main/shared.h +++ b/retro-core/main/shared.h @@ -7,8 +7,6 @@ #define AUDIO_SAMPLE_RATE (32000) #define AUDIO_BUFFER_LENGTH (AUDIO_SAMPLE_RATE / 50 + 1) -extern rg_app_t *app; - extern uint8_t shared_memory_block_64K[0x10000]; void launcher_main();