1
0
mirror of https://github.com/libretro/RetroArch synced 2024-07-08 12:15:49 +00:00

More warning fixes for non-shader target platforms

This commit is contained in:
twinaphex 2019-12-22 08:18:00 +01:00
parent e93d90bc45
commit 6eed40f80c
3 changed files with 14 additions and 12 deletions

View File

@ -550,13 +550,15 @@ bool manual_content_scan_get_menu_core_name(const char **core_name)
* > Returned string list must be free()'d */
struct string_list *manual_content_scan_get_menu_system_name_list(void)
{
settings_t *settings = config_get_ptr();
struct string_list *name_list = string_list_new();
union string_list_elem_attr attr;
#ifdef HAVE_LIBRETRODB
settings_t *settings = config_get_ptr();
#endif
struct string_list *name_list = string_list_new();
/* Sanity check */
if (!name_list)
goto error;
return NULL;
attr.i = 0;
@ -571,7 +573,6 @@ struct string_list *manual_content_scan_get_menu_system_name_list(void)
goto error;
#ifdef HAVE_LIBRETRODB
/* If platform has database support, get names
* of all installed database files */
if (settings)

View File

@ -9885,6 +9885,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
}
break;
case DISPLAYLIST_DROPDOWN_LIST_VIDEO_SHADER_NUM_PASSES:
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
{
unsigned i;
struct video_shader *shader = menu_shader_get();
@ -9910,6 +9911,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
info->need_refresh = true;
info->need_push = true;
}
#endif
break;
case DISPLAYLIST_DROPDOWN_LIST_SPECIAL:
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);

View File

@ -2691,15 +2691,14 @@ static void retroarch_set_runtime_shader_preset(const char *arg)
else
runtime_shader_preset[0] = '\0';
}
#endif
static void retroarch_unset_runtime_shader_preset(void)
{
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
runtime_shader_preset[0] = '\0';
}
#else
static void retroarch_set_runtime_shader_preset(const char *arg) {}
static void retroarch_unset_runtime_shader_preset(void) {}
#endif
}
#define MEASURE_FRAME_TIME_SAMPLES_COUNT (2 * 1024)
@ -29347,19 +29346,18 @@ bool accessibility_speak_linux(
bool accessibility_speak_priority(const char* speak_text, int priority)
{
const char* voice = NULL;
RARCH_LOG("Spoke: %s\n", speak_text);
if (is_accessibility_enabled())
{
#if defined(_WIN32) && !defined(_XBOX) && !defined(__WINRT__) && !defined(EMSCRIPTEN)
voice = get_user_language_iso639_1(true);
const char *voice = get_user_language_iso639_1(true);
return accessibility_speak_windows(speak_text, voice, priority);
#elif defined(__APPLE__) && defined(_IS_OSX) && !defined(EMSCRIPTEN)
voice = get_user_language_iso639_1(false);
const char *voice = get_user_language_iso639_1(false);
return accessibility_speak_macos(speak_text, voice, priority);
#elif (defined(__linux__) || defined(__unix__)) && !defined(EMSCRIPTEN)
voice = get_user_language_iso639_1(true);
const char *voice = get_user_language_iso639_1(true);
return accessibility_speak_linux(speak_text, voice, priority);
#endif
RARCH_LOG("Platform not supported for accessibility.\n");
@ -29375,6 +29373,7 @@ bool accessibility_speak_priority(const char* speak_text, int priority)
#endif
*/
}
return true;
}