From 4599acf7aad01da3e47155d4c90d177f871838c2 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 12 Dec 2016 13:30:50 +0100 Subject: [PATCH] Move code to dynamic.c --- audio/audio_driver.c | 11 ----------- dynamic.c | 10 ++++++++++ 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/audio/audio_driver.c b/audio/audio_driver.c index 68e60ec4c5..5f1b89287d 100644 --- a/audio/audio_driver.c +++ b/audio/audio_driver.c @@ -32,10 +32,6 @@ #include "audio_thread_wrapper.h" #include "../record/record_driver.h" -#ifdef HAVE_NETWORKING -#include "../network/netplay/netplay.h" -#endif - #include "../command.h" #include "../driver.h" #include "../configuration.h" @@ -852,13 +848,6 @@ bool audio_driver_deinit(void) bool audio_driver_set_callback(const void *data) { const struct retro_audio_callback *cb = (const struct retro_audio_callback*)data; -#ifdef HAVE_NETWORKING - if (netplay_driver_ctl(RARCH_NETPLAY_CTL_IS_ENABLED, NULL)) - return false; -#endif - - if (recording_driver_get_data_ptr()) /* A/V sync is a must. */ - return false; if (cb) audio_callback = *cb; diff --git a/dynamic.c b/dynamic.c index a375c92267..c84d7b25d4 100644 --- a/dynamic.c +++ b/dynamic.c @@ -36,6 +36,10 @@ #include "cheevos.h" #endif +#ifdef HAVE_NETWORKING +#include "network/netplay/netplay.h" +#endif + #include "dynamic.h" #include "command.h" @@ -1286,6 +1290,12 @@ bool rarch_environment_cb(unsigned cmd, void *data) #ifdef HAVE_THREADS { RARCH_LOG("Environ SET_AUDIO_CALLBACK.\n"); +#ifdef HAVE_NETWORKING + if (netplay_driver_ctl(RARCH_NETPLAY_CTL_IS_ENABLED, NULL)) + return false; +#endif + if (recording_driver_get_data_ptr()) /* A/V sync is a must. */ + return false; audio_driver_set_callback(data); } #endif