Move code to dynamic.c

This commit is contained in:
twinaphex 2016-12-12 13:30:50 +01:00
parent 52a41e77c4
commit 4599acf7aa
2 changed files with 10 additions and 11 deletions

View File

@ -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;

View File

@ -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