Permalink
Browse files

Fix Android build.

  • Loading branch information...
1 parent e2bcd5d commit bb0993b6eb9277594133e113287b4a937a2a5d09 @Themaister committed Jul 15, 2013
Showing with 18 additions and 3 deletions.
  1. +1 −1 audio/thread_wrapper.c
  2. +13 −1 dynamic.c
  3. +4 −1 retroarch.c
View
@@ -110,7 +110,7 @@ static bool audio_thread_start(void *data)
static void audio_thread_set_nonblock_state(void *data, bool state)
{
- audio_thread_t *thr = (audio_thread_t*)data;
+ (void)data;
(void)state;
}
View
@@ -729,8 +729,16 @@ static bool environment_cb(unsigned cmd, void *data)
RARCH_LOG("Environ SET_AUDIO_CALLBACK.\n");
const struct retro_audio_callback *info = (const struct retro_audio_callback*)data;
- if (g_extern.recording || g_extern.netplay_enable) // A/V sync is a must.
+#ifdef HAVE_FFMPEG
+ if (g_extern.recording) // A/V sync is a must.
return false;
+#endif
+
+#ifdef HAVE_NETPLAY
+ if (g_extern.netplay_enable)
+ return false;
+#endif
+
g_extern.system.audio_callback = info->callback;
break;
}
@@ -739,8 +747,12 @@ static bool environment_cb(unsigned cmd, void *data)
case RETRO_ENVIRONMENT_SET_FRAME_TIME_CALLBACK:
{
RARCH_LOG("Environ SET_FRAME_TIME_CALLBACK.\n");
+
+#ifdef HAVE_NETPLAY
if (g_extern.netplay_enable) // retro_run() will be called in very strange and mysterious ways, have to disable it.
return false;
+#endif
+
const struct retro_frame_time_callback *info = (const struct retro_frame_time_callback*)data;
g_extern.system.frame_time = *info;
break;
View
@@ -2993,7 +2993,10 @@ static inline void update_frame_time(void)
rarch_time_t time = rarch_get_time_usec();
rarch_time_t delta = 0;
- bool is_locked_fps = g_extern.is_paused || driver.nonblock_state || g_extern.recording;
+ bool is_locked_fps = g_extern.is_paused || driver.nonblock_state;
+#ifdef HAVE_FFMPEG
+ is_locked_fps |= g_extern.recording;
+#endif
if (!g_extern.system.frame_time_last || is_locked_fps)
delta = g_extern.system.frame_time.reference;

0 comments on commit bb0993b

Please sign in to comment.