Skip to content

Commit

Permalink
retro-core: removed the shared rg_app_t pointer, it caused a naming c…
Browse files Browse the repository at this point in the history
…onflict with a lib I'm adding

No real downside here, the pointer wasn't used often and its value is static.
  • Loading branch information
ducalex committed Dec 3, 2024
1 parent cc8751f commit becfd40
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 5 deletions.
4 changes: 1 addition & 3 deletions retro-core/main/main.c
Original file line number Diff line number Diff line change
@@ -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);

Expand Down
1 change: 1 addition & 0 deletions retro-core/main/main_gbc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
1 change: 1 addition & 0 deletions retro-core/main/main_gw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
1 change: 1 addition & 0 deletions retro-core/main/main_lynx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions retro-core/main/main_nes.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
1 change: 1 addition & 0 deletions retro-core/main/main_pce.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
1 change: 1 addition & 0 deletions retro-core/main/main_sms.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#include <smsplus.h>

static rg_app_t *app;
static rg_surface_t *updates[2];
static rg_surface_t *currentUpdate;

Expand Down
1 change: 1 addition & 0 deletions retro-core/main/main_snes.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 0 additions & 2 deletions retro-core/main/shared.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit becfd40

Please sign in to comment.