mirror of
https://github.com/libretro/RetroArch
synced 2025-03-28 08:37:41 +00:00
Do not build in anything netplay related if not included.
This commit is contained in:
parent
d8eb5de380
commit
09d2ec7d3a
@ -294,12 +294,14 @@ struct global
|
|||||||
autosave_t *autosave[2];
|
autosave_t *autosave[2];
|
||||||
|
|
||||||
// Netplay.
|
// Netplay.
|
||||||
|
#ifdef HAVE_NETPLAY
|
||||||
netplay_t *netplay;
|
netplay_t *netplay;
|
||||||
char netplay_server[MAXPATHLEN];
|
char netplay_server[MAXPATHLEN];
|
||||||
bool netplay_enable;
|
bool netplay_enable;
|
||||||
bool netplay_is_client;
|
bool netplay_is_client;
|
||||||
unsigned netplay_sync_frames;
|
unsigned netplay_sync_frames;
|
||||||
uint16_t netplay_port;
|
uint16_t netplay_port;
|
||||||
|
#endif
|
||||||
|
|
||||||
// FFmpeg record.
|
// FFmpeg record.
|
||||||
#ifdef HAVE_FFMPEG
|
#ifdef HAVE_FFMPEG
|
||||||
|
26
ssnes.c
26
ssnes.c
@ -29,7 +29,6 @@
|
|||||||
#include "record/ffemu.h"
|
#include "record/ffemu.h"
|
||||||
#include "rewind.h"
|
#include "rewind.h"
|
||||||
#include "movie.h"
|
#include "movie.h"
|
||||||
#include "netplay.h"
|
|
||||||
#include "strl.h"
|
#include "strl.h"
|
||||||
#include "screenshot.h"
|
#include "screenshot.h"
|
||||||
#include "cheats.h"
|
#include "cheats.h"
|
||||||
@ -791,6 +790,7 @@ static void parse_input(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
#ifdef HAVE_NETPLAY
|
||||||
case 'H':
|
case 'H':
|
||||||
g_extern.netplay_enable = true;
|
g_extern.netplay_enable = true;
|
||||||
break;
|
break;
|
||||||
@ -805,6 +805,7 @@ static void parse_input(int argc, char *argv[])
|
|||||||
if (g_extern.netplay_sync_frames > 16)
|
if (g_extern.netplay_sync_frames > 16)
|
||||||
g_extern.netplay_sync_frames = 16;
|
g_extern.netplay_sync_frames = 16;
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
|
|
||||||
case 'U':
|
case 'U':
|
||||||
strlcpy(g_extern.ups_name, optarg, sizeof(g_extern.ups_name));
|
strlcpy(g_extern.ups_name, optarg, sizeof(g_extern.ups_name));
|
||||||
@ -824,9 +825,11 @@ static void parse_input(int argc, char *argv[])
|
|||||||
case 0:
|
case 0:
|
||||||
switch (val)
|
switch (val)
|
||||||
{
|
{
|
||||||
|
#ifdef HAVE_NETPLAY
|
||||||
case 'p':
|
case 'p':
|
||||||
g_extern.netplay_port = strtoul(optarg, NULL, 0);
|
g_extern.netplay_port = strtoul(optarg, NULL, 0);
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
|
|
||||||
case 'B':
|
case 'B':
|
||||||
strlcpy(g_extern.bps_name, optarg, sizeof(g_extern.bps_name));
|
strlcpy(g_extern.bps_name, optarg, sizeof(g_extern.bps_name));
|
||||||
@ -1859,8 +1862,10 @@ static void do_state_checks(void)
|
|||||||
check_screenshot();
|
check_screenshot();
|
||||||
check_mute();
|
check_mute();
|
||||||
|
|
||||||
|
#ifdef HAVE_NETPLAY
|
||||||
if (!g_extern.netplay)
|
if (!g_extern.netplay)
|
||||||
{
|
{
|
||||||
|
#endif
|
||||||
check_pause();
|
check_pause();
|
||||||
check_oneshot();
|
check_oneshot();
|
||||||
|
|
||||||
@ -1896,9 +1901,11 @@ static void do_state_checks(void)
|
|||||||
check_dsp_config();
|
check_dsp_config();
|
||||||
#endif
|
#endif
|
||||||
check_reset();
|
check_reset();
|
||||||
|
#ifdef HAVE_NETPLAY
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
check_fullscreen();
|
check_fullscreen();
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_DYLIB
|
#ifdef HAVE_DYLIB
|
||||||
// DSP plugin doesn't use variable input rate.
|
// DSP plugin doesn't use variable input rate.
|
||||||
@ -1957,7 +1964,9 @@ int main(int argc, char *argv[])
|
|||||||
#endif
|
#endif
|
||||||
init_drivers();
|
init_drivers();
|
||||||
|
|
||||||
|
#ifdef HAVE_NETPLAY
|
||||||
if (!g_extern.netplay)
|
if (!g_extern.netplay)
|
||||||
|
#endif
|
||||||
init_rewind();
|
init_rewind();
|
||||||
|
|
||||||
#ifdef HAVE_NETPLAY
|
#ifdef HAVE_NETPLAY
|
||||||
@ -1980,8 +1989,11 @@ int main(int argc, char *argv[])
|
|||||||
init_recording();
|
init_recording();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool use_sram = !g_extern.netplay_is_client &&
|
#ifdef HAVE_NETPLAY
|
||||||
!g_extern.sram_save_disable;
|
bool use_sram = !g_extern.sram_save_disable && !g_extern.netplay_is_client;
|
||||||
|
#else
|
||||||
|
bool use_sram = !g_extern.sram_save_disable;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (!use_sram)
|
if (!use_sram)
|
||||||
SSNES_LOG("SRAM will not be saved!\n");
|
SSNES_LOG("SRAM will not be saved!\n");
|
||||||
@ -1990,7 +2002,11 @@ int main(int argc, char *argv[])
|
|||||||
init_autosave();
|
init_autosave();
|
||||||
|
|
||||||
#ifdef HAVE_XML
|
#ifdef HAVE_XML
|
||||||
if (!g_extern.netplay && !g_extern.bsv.movie)
|
#ifdef HAVE_NETPLAY
|
||||||
|
if (!g_extern.bsv.movie && !g_extern.netplay)
|
||||||
|
#else
|
||||||
|
if (!g_extern.bsv.movie)
|
||||||
|
#endif
|
||||||
init_cheats();
|
init_cheats();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -2053,7 +2069,9 @@ int main(int argc, char *argv[])
|
|||||||
if (use_sram)
|
if (use_sram)
|
||||||
save_files();
|
save_files();
|
||||||
|
|
||||||
|
#ifdef HAVE_NETPLAY
|
||||||
if (!g_extern.netplay)
|
if (!g_extern.netplay)
|
||||||
|
#endif
|
||||||
deinit_rewind();
|
deinit_rewind();
|
||||||
|
|
||||||
#ifdef HAVE_XML
|
#ifdef HAVE_XML
|
||||||
|
Loading…
x
Reference in New Issue
Block a user