aboutsummaryrefslogtreecommitdiff
path: root/libretro.c
diff options
context:
space:
mode:
Diffstat (limited to 'libretro.c')
-rw-r--r--libretro.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/libretro.c b/libretro.c
index 73d0d9f..f2056b9 100644
--- a/libretro.c
+++ b/libretro.c
@@ -43,8 +43,8 @@ char slash = '\\';
char slash = '/';
#endif
-static float samples_per_frame = 0.0;
-static float samplerate = (((SNES_CLOCK_SPEED * 6) / (32 * ONE_APU_CYCLE)));
+static int32_t samples_per_frame = 0;
+static int32_t samplerate = (((SNES_CLOCK_SPEED * 6) / (32 * ONE_APU_CYCLE)));
#ifdef PERF_TEST
#define RETRO_PERFORMANCE_INIT(name) \
@@ -109,9 +109,9 @@ unsigned retro_api_version()
return RETRO_API_VERSION;
}
-void S9xMessage(int32_t type, int32_t number, const char* message)
+void S9xMessage(const char* message)
{
-#define MAX_MESSAGE_LEN (36 * 3)
+ #define MAX_MESSAGE_LEN (36 * 3)
static char buffer [MAX_MESSAGE_LEN + 1];
@@ -400,7 +400,7 @@ static void check_variables(void)
#define FRAMESKIP
#endif
-static float samples_to_play = 0.0;
+static int32_t samples_to_play = 0;
void retro_run(void)
{
bool updated = false;
@@ -427,13 +427,13 @@ void retro_run(void)
if (samples_to_play > 512)
{
- S9xMixSamples(audio_buf, ((int32_t)samples_to_play) * 2);
- audio_batch_cb(audio_buf, (int32_t)samples_to_play);
- samples_to_play -= (int32_t)samples_to_play;
+ S9xMixSamples(audio_buf, samples_to_play * 2);
+ audio_batch_cb(audio_buf, samples_to_play);
+ samples_to_play = 0;
}
#endif
-#ifdef NO_VIDEO_OUTPUT
+#ifdef NO_VIDEO_OUTPUT
return;
#endif
@@ -767,7 +767,7 @@ void retro_cheat_set(unsigned index, bool enabled, const char* code)
Cheat.c[index].saved = false; // it'll be saved next time cheats run anyways
- Settings.ApplyCheats=true;
+ Settings.ApplyCheats = true;
S9xApplyCheats();
#endif
}