(Menu) Cleanups

This commit is contained in:
twinaphex 2014-08-28 15:43:53 +02:00
parent 12d94cfb03
commit 66ce3c1a0d
3 changed files with 14 additions and 17 deletions

View File

@ -3341,12 +3341,6 @@ static int menu_common_setting_set(unsigned id, unsigned action, rarch_setting_t
else if (action == MENU_ACTION_RIGHT)
find_next_driver(RARCH_DRIVER_AUDIO, g_settings.audio.driver, sizeof(g_settings.audio.driver));
break;
case MENU_SETTINGS_DRIVER_AUDIO_DEVICE:
if (action == MENU_ACTION_OK)
menu_key_start_line(driver.menu, "Audio Device Name / IP: ", "audio_device", st_string_callback);
else if (action == MENU_ACTION_START)
*g_settings.audio.device = '\0';
break;
case MENU_SETTINGS_DRIVER_AUDIO_RESAMPLER:
if (action == MENU_ACTION_LEFT)
find_prev_resampler_driver();
@ -3546,10 +3540,6 @@ static int menu_common_setting_set(unsigned id, unsigned action, rarch_setting_t
}
break;
}
case MENU_SETTINGS_SHADER_PRESET_SAVE:
if (action == MENU_ACTION_OK)
menu_key_start_line(driver.menu, "Preset Filename: ", "shader_preset_save", preset_filename_callback);
break;
#ifdef _XBOX1
case MENU_SETTINGS_SOFT_DISPLAY_FILTER:
switch (action)
@ -3599,12 +3589,22 @@ static int menu_common_setting_set(unsigned id, unsigned action, rarch_setting_t
*g_extern.netplay_server = '\0';
break;
#endif
case MENU_SETTINGS_DRIVER_AUDIO_DEVICE:
if (action == MENU_ACTION_OK)
menu_key_start_line(driver.menu, "Audio Device Name / IP: ", "audio_device", st_string_callback);
else if (action == MENU_ACTION_START)
*g_settings.audio.device = '\0';
break;
case MENU_SETTINGS_NETPLAY_NICKNAME:
if (action == MENU_ACTION_OK)
menu_key_start_line(driver.menu, "Username: ", "netplay_nickname", st_string_callback);
else if (action == MENU_ACTION_START)
*g_settings.username = '\0';
break;
case MENU_SETTINGS_SHADER_PRESET_SAVE:
if (action == MENU_ACTION_OK)
menu_key_start_line(driver.menu, "Preset Filename: ", "shader_preset_save", preset_filename_callback);
break;
default:
break;
}

View File

@ -627,8 +627,6 @@ static void rgui_free(void *data)
static int rgui_input_postprocess(uint64_t old_state)
{
int ret = 0;
(void)old_state;
if ((driver.menu->trigger_state & (1ULL << RARCH_MENU_TOGGLE)) &&
@ -636,10 +634,10 @@ static int rgui_input_postprocess(uint64_t old_state)
!g_extern.libretro_dummy)
{
g_extern.lifecycle_state |= (1ULL << MODE_GAME);
ret = -1;
return -1;
}
return ret;
return 0;
}
void rgui_set_texture(void *data)

View File

@ -506,17 +506,16 @@ static void rmenu_free(void *data)
static int rmenu_input_postprocess(uint64_t old_state)
{
menu_handle_t *menu = (menu_handle_t*)driver.menu;
int ret = 0;
if ((menu->trigger_state & (1ULL << RARCH_MENU_TOGGLE)) &&
g_extern.main_is_init &&
!g_extern.libretro_dummy)
{
g_extern.lifecycle_state |= (1ULL << MODE_GAME);
ret = -1;
return -1;
}
return ret;
return 0;
}
static void rmenu_init_core_info(void *data)