mirror of
https://github.com/libretro/RetroArch
synced 2025-02-09 00:40:09 +00:00
(PS3) Silence more warnings
This commit is contained in:
parent
f069eeb017
commit
360bea85b9
@ -63,7 +63,7 @@ endif
|
|||||||
|
|
||||||
PPU_SRCS = griffin/griffin.c
|
PPU_SRCS = griffin/griffin.c
|
||||||
|
|
||||||
DEFINES += -DHAVE_MENU -DHAVE_RGUI -DHAVE_XMB -DHAVE_LIBRETRODB -DHAVE_MATERIALUI -DHAVE_SHADERPIPELINE -DRARCH_INTERNAL -DMSB_FIRST -DHAVE_OVERLAY -DHAVE_CC_RESAMPLER -DHAVE_STB_VORBIS -DHAVE_STB_FONT
|
DEFINES += -DHAVE_MENU -DHAVE_RGUI -DHAVE_XMB -DHAVE_LIBRETRODB -DHAVE_MATERIALUI -DHAVE_SHADERPIPELINE -DRARCH_INTERNAL -DMSB_FIRST -DHAVE_OVERLAY -DHAVE_CC_RESAMPLER -DHAVE_STB_VORBIS -DHAVE_STB_FONT -DHAVE_RUNAHEAD
|
||||||
|
|
||||||
ifeq ($(DEX_BUILD), 1)
|
ifeq ($(DEX_BUILD), 1)
|
||||||
DEFINES += -DDEX_BUILD
|
DEFINES += -DDEX_BUILD
|
||||||
|
30
dynamic.c
30
dynamic.c
@ -922,25 +922,27 @@ static bool dynamic_request_hw_context(enum retro_hw_context_type type,
|
|||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
case RETRO_HW_CONTEXT_DIRECT3D:
|
#if defined(HAVE_D3D9) || defined(HAVE_D3D11)
|
||||||
switch(major)
|
case RETRO_HW_CONTEXT_DIRECT3D:
|
||||||
{
|
switch (major)
|
||||||
|
{
|
||||||
#ifdef HAVE_D3D9
|
#ifdef HAVE_D3D9
|
||||||
case 9:
|
case 9:
|
||||||
RARCH_LOG("Requesting D3D9 context.\n");
|
RARCH_LOG("Requesting D3D9 context.\n");
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_D3D11
|
#ifdef HAVE_D3D11
|
||||||
case 11:
|
case 11:
|
||||||
RARCH_LOG("Requesting D3D11 context.\n");
|
RARCH_LOG("Requesting D3D11 context.\n");
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
|
default:
|
||||||
|
RARCH_LOG("Requesting unknown context.\n");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
break;
|
||||||
#endif
|
#endif
|
||||||
default:
|
|
||||||
goto unknown;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
unknown:
|
|
||||||
default:
|
default:
|
||||||
RARCH_LOG("Requesting unknown context.\n");
|
RARCH_LOG("Requesting unknown context.\n");
|
||||||
return false;
|
return false;
|
||||||
|
@ -138,7 +138,6 @@ void net_http_urlencode_full(char *dest,
|
|||||||
char *tmp = NULL;
|
char *tmp = NULL;
|
||||||
char url_domain[PATH_MAX_LENGTH] = {0};
|
char url_domain[PATH_MAX_LENGTH] = {0};
|
||||||
char url_path[PATH_MAX_LENGTH] = {0};
|
char url_path[PATH_MAX_LENGTH] = {0};
|
||||||
char url_encoded[PATH_MAX_LENGTH] = {0};
|
|
||||||
int count = 0;
|
int count = 0;
|
||||||
|
|
||||||
strlcpy (url_path, source, sizeof(url_path));
|
strlcpy (url_path, source, sizeof(url_path));
|
||||||
|
@ -28,6 +28,7 @@ static void unset_fast_savestate(void);
|
|||||||
static void set_hard_disable_audio(void);
|
static void set_hard_disable_audio(void);
|
||||||
static void unset_hard_disable_audio(void);
|
static void unset_hard_disable_audio(void);
|
||||||
|
|
||||||
|
/* TODO/FIXME - shouldn't this be signed size_t? */
|
||||||
static size_t runahead_save_state_size = -1;
|
static size_t runahead_save_state_size = -1;
|
||||||
|
|
||||||
/* Save State List for Run Ahead */
|
/* Save State List for Run Ahead */
|
||||||
@ -197,19 +198,18 @@ static void runahead_check_for_gui(void)
|
|||||||
runahead_last_frame_count = frame_count;
|
runahead_last_frame_count = frame_count;
|
||||||
}
|
}
|
||||||
|
|
||||||
void run_ahead(int runAheadCount, bool useSecondary)
|
void run_ahead(int runahead_count, bool useSecondary)
|
||||||
{
|
{
|
||||||
int frameNumber;
|
int frame_number = 0;
|
||||||
bool okay;
|
bool last_frame = false;
|
||||||
bool lastFrame;
|
bool suspended_frame = false;
|
||||||
bool suspendedFrame;
|
|
||||||
#if defined(HAVE_DYNAMIC) || defined(HAVE_DYLIB)
|
#if defined(HAVE_DYNAMIC) || defined(HAVE_DYLIB)
|
||||||
const bool haveDynamic = true;
|
const bool have_dynamic = true;
|
||||||
#else
|
#else
|
||||||
const bool haveDynamic = false;
|
const bool have_dynamic = false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (runAheadCount <= 0 || !runahead_available)
|
if (runahead_count <= 0 || !runahead_available)
|
||||||
{
|
{
|
||||||
core_run();
|
core_run();
|
||||||
runahead_force_input_dirty = true;
|
runahead_force_input_dirty = true;
|
||||||
@ -220,7 +220,8 @@ void run_ahead(int runAheadCount, bool useSecondary)
|
|||||||
{
|
{
|
||||||
if (!runahead_create())
|
if (!runahead_create())
|
||||||
{
|
{
|
||||||
/* RunAhead has been disabled because the core does not support savestates. */
|
/* RunAhead has been disabled because the core
|
||||||
|
* does not support savestates. */
|
||||||
core_run();
|
core_run();
|
||||||
runahead_force_input_dirty = true;
|
runahead_force_input_dirty = true;
|
||||||
return;
|
return;
|
||||||
@ -229,41 +230,44 @@ void run_ahead(int runAheadCount, bool useSecondary)
|
|||||||
|
|
||||||
runahead_check_for_gui();
|
runahead_check_for_gui();
|
||||||
|
|
||||||
if (!useSecondary || !haveDynamic || !runahead_secondary_core_available)
|
if (!useSecondary || !have_dynamic || !runahead_secondary_core_available)
|
||||||
{
|
{
|
||||||
/* TODO: multiple savestates for higher performance when not using secondary core */
|
/* TODO: multiple savestates for higher performance
|
||||||
for (frameNumber = 0; frameNumber <= runAheadCount; frameNumber++)
|
* when not using secondary core */
|
||||||
|
for (frame_number = 0; frame_number <= runahead_count; frame_number++)
|
||||||
{
|
{
|
||||||
lastFrame = frameNumber == runAheadCount;
|
last_frame = frame_number == runahead_count;
|
||||||
suspendedFrame = !lastFrame;
|
suspended_frame = !last_frame;
|
||||||
|
|
||||||
if (suspendedFrame)
|
if (suspended_frame)
|
||||||
{
|
{
|
||||||
runahead_suspend_audio();
|
runahead_suspend_audio();
|
||||||
runahead_suspend_video();
|
runahead_suspend_video();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (frameNumber == 0)
|
if (frame_number == 0)
|
||||||
core_run();
|
core_run();
|
||||||
else
|
else
|
||||||
core_run_no_input_polling();
|
core_run_no_input_polling();
|
||||||
|
|
||||||
if (suspendedFrame)
|
if (suspended_frame)
|
||||||
{
|
{
|
||||||
runahead_resume_video();
|
runahead_resume_video();
|
||||||
runahead_resume_audio();
|
runahead_resume_audio();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (frameNumber == 0)
|
if (frame_number == 0)
|
||||||
{
|
{
|
||||||
/* RunAhead has been disabled due to save state failure */
|
/* RunAhead has been disabled due
|
||||||
|
* to save state failure */
|
||||||
if (!runahead_save_state())
|
if (!runahead_save_state())
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (lastFrame)
|
if (last_frame)
|
||||||
{
|
{
|
||||||
/* RunAhead has been disabled due to load state failure */
|
/* RunAhead has been disabled due
|
||||||
|
* to load state failure */
|
||||||
if (!runahead_load_state())
|
if (!runahead_load_state())
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -272,6 +276,8 @@ void run_ahead(int runAheadCount, bool useSecondary)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
#if HAVE_DYNAMIC
|
#if HAVE_DYNAMIC
|
||||||
|
bool okay = false;
|
||||||
|
|
||||||
/* run main core with video suspended */
|
/* run main core with video suspended */
|
||||||
runahead_suspend_video();
|
runahead_suspend_video();
|
||||||
core_run();
|
core_run();
|
||||||
@ -291,7 +297,8 @@ void run_ahead(int runAheadCount, bool useSecondary)
|
|||||||
if (!runahead_load_state_secondary())
|
if (!runahead_load_state_secondary())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (frame_count = 0; frame_count < (unsigned)(runAheadCount - 1); frame_count++)
|
for (frame_count = 0; frame_count <
|
||||||
|
(unsigned)(runahead_count - 1); frame_count++)
|
||||||
{
|
{
|
||||||
runahead_suspend_video();
|
runahead_suspend_video();
|
||||||
runahead_suspend_audio();
|
runahead_suspend_audio();
|
||||||
@ -353,9 +360,9 @@ static bool runahead_create(void)
|
|||||||
|
|
||||||
static bool runahead_save_state(void)
|
static bool runahead_save_state(void)
|
||||||
{
|
{
|
||||||
|
bool okay = false;
|
||||||
retro_ctx_serialize_info_t *serialize_info =
|
retro_ctx_serialize_info_t *serialize_info =
|
||||||
(retro_ctx_serialize_info_t*)runahead_save_state_list->data[0];
|
(retro_ctx_serialize_info_t*)runahead_save_state_list->data[0];
|
||||||
bool okay;
|
|
||||||
set_fast_savestate();
|
set_fast_savestate();
|
||||||
okay = core_serialize(serialize_info);
|
okay = core_serialize(serialize_info);
|
||||||
unset_fast_savestate();
|
unset_fast_savestate();
|
||||||
|
@ -87,7 +87,6 @@ char* get_temp_directory_alloc(void)
|
|||||||
|
|
||||||
char* copy_core_to_temp_file(void)
|
char* copy_core_to_temp_file(void)
|
||||||
{
|
{
|
||||||
bool okay = false;
|
|
||||||
char *tempDirectory = NULL;
|
char *tempDirectory = NULL;
|
||||||
char *retroarchTempPath = NULL;
|
char *retroarchTempPath = NULL;
|
||||||
char *tempDllPath = NULL;
|
char *tempDllPath = NULL;
|
||||||
@ -146,7 +145,6 @@ bool write_file_with_random_name(char **tempDllPath,
|
|||||||
{
|
{
|
||||||
unsigned i;
|
unsigned i;
|
||||||
char numberBuf[32];
|
char numberBuf[32];
|
||||||
bool okay = false;
|
|
||||||
const char *prefix = "tmp";
|
const char *prefix = "tmp";
|
||||||
time_t timeValue = time(NULL);
|
time_t timeValue = time(NULL);
|
||||||
unsigned int numberValue = (unsigned int)timeValue;
|
unsigned int numberValue = (unsigned int)timeValue;
|
||||||
@ -298,8 +296,7 @@ bool secondary_core_run_no_input_polling(void)
|
|||||||
{
|
{
|
||||||
if (!secondary_module)
|
if (!secondary_module)
|
||||||
{
|
{
|
||||||
bool okay = secondary_core_create();
|
if (!secondary_core_create())
|
||||||
if (!okay)
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
secondary_core.retro_run();
|
secondary_core.retro_run();
|
||||||
@ -310,8 +307,7 @@ bool secondary_core_deserialize(const void *buffer, int size)
|
|||||||
{
|
{
|
||||||
if (!secondary_module)
|
if (!secondary_module)
|
||||||
{
|
{
|
||||||
bool okay = secondary_core_create();
|
if (!secondary_core_create())
|
||||||
if (!okay)
|
|
||||||
{
|
{
|
||||||
secondary_core_destroy();
|
secondary_core_destroy();
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user