Skip to content

Commit

Permalink
Fix build without rcheevos
Browse files Browse the repository at this point in the history
  • Loading branch information
OFFTKP committed Aug 11, 2024
1 parent c16ecad commit 2d2d410
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
8 changes: 6 additions & 2 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
*
**/

#include "rc_client.h"
#include "rc_consoles.h"
#include <stdbool.h>
#include <stdio.h>
#define SE_AUDIO_SAMPLE_RATE 48000
Expand All @@ -20,7 +18,11 @@
#include "http_control_server.h"
#endif

#ifdef ENABLE_RETRO_ACHIEVEMENTS
#include "rc_client.h"
#include "rc_consoles.h"
#include "retro_achievements.h"
#endif

#include "gba.h"
#include "nds.h"
Expand Down Expand Up @@ -6710,7 +6712,9 @@ static void frame(void) {
if(emu_state.joy.inputs[SE_KEY_TOGGLE_FULLSCREEN]&&last_toggle_fullscreen==false)sapp_toggle_fullscreen();
last_toggle_fullscreen = emu_state.joy.inputs[SE_KEY_TOGGLE_FULLSCREEN];
#endif
#ifdef ENABLE_RETRO_ACHIEVEMENTS
retro_achievements_keep_alive();
#endif

#ifdef SE_PLATFORM_ANDROID
//Handle Android Back Button Navigation
Expand Down
8 changes: 0 additions & 8 deletions src/retro_achievements.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,13 +140,11 @@ struct ra_game_state_t
void inc()
{
outstanding_requests++;
printf("outstanding requests: %d\n", outstanding_requests.load());
}

void dec()
{
outstanding_requests--;
printf("outstanding requests: %d\n", outstanding_requests.load());
}
};

Expand Down Expand Up @@ -1143,11 +1141,6 @@ void retro_achievements_keep_alive()
}
}

void retro_achievements_logout()
{
rc_client_logout(ra_state->rc_client);
}

atlas_tile_t* retro_achievements_get_game_image()
{
if (!ra_state->game_state)
Expand Down Expand Up @@ -1220,7 +1213,6 @@ void retro_achievements_update_atlases()
sg_image_data data = {0};
data.subimage[0][0].ptr = atlas->data.data();
data.subimage[0][0].size = atlas->data.size();
printf("updating image %d\n", atlas->image.id);
sg_update_image(atlas->image, data);
}

Expand Down

0 comments on commit 2d2d410

Please sign in to comment.