From 5cb9713aaee683ae0719f921299b7ee541495982 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 17 Feb 2013 02:00:51 +0100 Subject: [PATCH] Don't compile in autosave for consoles --- Makefile.ps3 | 2 +- console/griffin/griffin.c | 2 +- netplay.c | 4 ++-- retroarch.c | 10 +++++----- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Makefile.ps3 b/Makefile.ps3 index 1102d52fea..94261a2931 100644 --- a/Makefile.ps3 +++ b/Makefile.ps3 @@ -109,7 +109,7 @@ PPU_LDLIBS = $(FONT_LIBS) $(GL_LIBS) $(WHOLE_START) -lretro_ps3 $(WHOLE_END) -l PPU_RANLIB = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ranlib.exe -DEFINES += -DHAVE_DEFAULT_RETROPAD_INPUT -DHAVE_RMENU -DHAVE_RMENU_GUI -DRARCH_CONSOLE -DHAVE_OPENGL -DHAVE_HEADSET -DHAVE_VID_CONTEXT -DHAVE_OPENGLES -DHAVE_OPENGLES1 -DHAVE_PSGL -DHAVE_CG -DHAVE_CG_RUNTIME_COMPILER -DHAVE_FILEBROWSER -DHAVE_FBO -DHAVE_RARCH_MAIN_WRAP -DHAVE_SYSMODULES -DHAVE_SYSUTILS -DHAVE_RARCH_EXEC -DHAVE_LIBRETRO_MANAGEMENT -DHAVE_RSOUND -DHAVE_ZLIB -DWANT_MINIZ -DHAVE_SINC -DSINC_LOWER_QUALITY -D__CELLOS_LV2__ -DHAVE_NETPLAY=1 -DHAVE_SOCKET_LEGACY=1 -DHAVE_OSKUTIL -DHAVE_MOUSE -DHAVE_GRIFFIN=1 -DHAVE_MULTIMAN=1 -DPACKAGE_VERSION=\"$(RARCH_VERSION)\" -Dmain=rarch_main -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT) +DEFINES += -DHAVE_DEFAULT_RETROPAD_INPUT -DHAVE_RMENU -DHAVE_THREADS -DHAVE_RMENU_GUI -DRARCH_CONSOLE -DHAVE_OPENGL -DHAVE_HEADSET -DHAVE_VID_CONTEXT -DHAVE_OPENGLES -DHAVE_OPENGLES1 -DHAVE_PSGL -DHAVE_CG -DHAVE_CG_RUNTIME_COMPILER -DHAVE_FILEBROWSER -DHAVE_FBO -DHAVE_RARCH_MAIN_WRAP -DHAVE_SYSMODULES -DHAVE_SYSUTILS -DHAVE_RARCH_EXEC -DHAVE_LIBRETRO_MANAGEMENT -DHAVE_RSOUND -DHAVE_ZLIB -DWANT_MINIZ -DHAVE_SINC -DSINC_LOWER_QUALITY -D__CELLOS_LV2__ -DHAVE_NETPLAY=1 -DHAVE_SOCKET_LEGACY=1 -DHAVE_OSKUTIL -DHAVE_MOUSE -DHAVE_GRIFFIN=1 -DHAVE_MULTIMAN=1 -DPACKAGE_VERSION=\"$(RARCH_VERSION)\" -Dmain=rarch_main -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT) ifeq ($(DEBUG), 1) PPU_OPTIMIZE_LV := -O0 -g diff --git a/console/griffin/griffin.c b/console/griffin/griffin.c index 862ace47b5..e713d68775 100644 --- a/console/griffin/griffin.c +++ b/console/griffin/griffin.c @@ -381,7 +381,7 @@ THREAD #include "../../thread/xenon_sdl_threads.c" #elif defined(HAVE_THREADS) #include "../../thread.c" -#ifdef ANDROID +#ifndef RARCH_CONSOLE #include "../../autosave.c" #endif #endif diff --git a/netplay.c b/netplay.c index 5920535cbb..9322297fe5 100644 --- a/netplay.c +++ b/netplay.c @@ -1396,11 +1396,11 @@ static void netplay_post_frame_net(netplay_t *handle) while (first || (handle->tmp_ptr != handle->self_ptr)) { pretro_serialize(handle->buffer[handle->tmp_ptr].state, handle->state_size); -#ifdef HAVE_THREADS +#if defined(HAVE_THREADS) && !defined(RARCH_CONSOLE) lock_autosave(); #endif pretro_run(); -#ifdef HAVE_THREADS +#if defined(HAVE_THREADS) && !defined(RARCH_CONSOLE) unlock_autosave(); #endif handle->tmp_ptr = NEXT_PTR(handle->tmp_ptr); diff --git a/retroarch.c b/retroarch.c index 01e52328d5..dd20006b7d 100644 --- a/retroarch.c +++ b/retroarch.c @@ -1640,7 +1640,7 @@ static void init_libretro_cbs(void) #endif } -#ifdef HAVE_THREADS +#if defined(HAVE_THREADS) && !defined(RARCH_CONSOLE) static void init_autosave(void) { int ram_types[2] = {-1, -1}; @@ -2748,7 +2748,7 @@ int rarch_main_init(int argc, char *argv[]) if (!g_extern.use_sram) RARCH_LOG("SRAM will not be saved.\n"); -#ifdef HAVE_THREADS +#if defined(HAVE_THREADS) && !defined(RARCH_CONSOLE) if (g_extern.use_sram) init_autosave(); #endif @@ -2828,7 +2828,7 @@ bool rarch_main_iterate(void) do_state_checks(); // Run libretro for one frame. -#ifdef HAVE_THREADS +#if defined(HAVE_THREADS) && !defined(RARCH_CONSOLE) lock_autosave(); #endif @@ -2855,7 +2855,7 @@ bool rarch_main_iterate(void) netplay_post_frame(g_extern.netplay); #endif -#ifdef HAVE_THREADS +#if defined(HAVE_THREADS) && !defined(RARCH_CONSOLE) unlock_autosave(); #endif @@ -2881,7 +2881,7 @@ void rarch_main_deinit(void) deinit_command(); #endif -#ifdef HAVE_THREADS +#if defined(HAVE_THREADS) && !defined(RARCH_CONSOLE) if (g_extern.use_sram) deinit_autosave(); #endif