(Menu) Get rid of wrongly implemented menu.action.active

This commit is contained in:
twinaphex 2015-03-11 17:59:01 +01:00
parent 72ba8abefa
commit a2d82612ad
6 changed files with 4 additions and 48 deletions

View File

@ -284,8 +284,10 @@ void notify_content_loaded(void)
if (g_runloop.is_idle) if (g_runloop.is_idle)
continue; continue;
if (g_runloop.is_menu && !menu_display_update_pending() && !g_runloop.frames.video.current.menu.action.active) #if 0
if (g_runloop.is_menu && !menu_display_update_pending())
continue; continue;
#endif
if (g_view) if (g_view)
[g_view display]; [g_view display];

View File

@ -57,9 +57,7 @@ static void draw_frame(void)
} }
} }
if (menu_display_update_pending() || rarch_render_cached_frame();
g_runloop.frames.video.current.menu.action.active )
rarch_render_cached_frame();
} }
/** /**

View File

@ -26,7 +26,6 @@ static int action_refresh_default(file_list_t *list, file_list_t *menu_list)
ret = menu_entries_deferred_push(list, menu_list); ret = menu_entries_deferred_push(list, menu_list);
menu->need_refresh = false; menu->need_refresh = false;
g_runloop.frames.video.current.menu.action.active = true;
return ret; return ret;
} }

View File

@ -24,7 +24,6 @@ static int action_select_default(unsigned type, const char *label,
return 0; return 0;
menu_list_push_stack(menu->menu_list, "", "info_screen", menu_list_push_stack(menu->menu_list, "", "info_screen",
0, menu->navigation.selection_ptr); 0, menu->navigation.selection_ptr);
g_runloop.frames.video.current.menu.action.active = true;
return 0; return 0;
} }

View File

@ -29,7 +29,6 @@ static int action_start_remap_file_load(unsigned type, const char *label,
{ {
g_settings.input.remapping_path[0] = '\0'; g_settings.input.remapping_path[0] = '\0';
input_remapping_set_defaults(); input_remapping_set_defaults();
g_runloop.frames.video.current.menu.action.active = true;
return 0; return 0;
} }
@ -38,7 +37,6 @@ static int action_start_video_filter_file_load(unsigned type, const char *label,
{ {
g_settings.video.softfilter_plugin[0] = '\0'; g_settings.video.softfilter_plugin[0] = '\0';
rarch_main_command(RARCH_CMD_REINIT); rarch_main_command(RARCH_CMD_REINIT);
g_runloop.frames.video.current.menu.action.active = true;
return 0; return 0;
} }
@ -56,7 +54,6 @@ static int action_start_performance_counters_core(unsigned type, const char *lab
{ {
counters[offset]->total = 0; counters[offset]->total = 0;
counters[offset]->call_cnt = 0; counters[offset]->call_cnt = 0;
g_runloop.frames.video.current.menu.action.active = true;
} }
return 0; return 0;
@ -74,7 +71,6 @@ static int action_start_input_desc(unsigned type, const char *label,
g_settings.input.remap_ids[inp_desc_user][inp_desc_button_index_offset] = g_settings.input.remap_ids[inp_desc_user][inp_desc_button_index_offset] =
g_settings.input.binds[inp_desc_user][inp_desc_button_index_offset].id; g_settings.input.binds[inp_desc_user][inp_desc_button_index_offset].id;
g_runloop.frames.video.current.menu.action.active = true;
return 0; return 0;
} }
@ -93,7 +89,6 @@ static int action_start_shader_action_parameter(unsigned type, const char *label
param->current = param->initial; param->current = param->initial;
param->current = min(max(param->minimum, param->current), param->maximum); param->current = min(max(param->minimum, param->current), param->maximum);
g_runloop.frames.video.current.menu.action.active = true;
#endif #endif
return 0; return 0;
@ -115,8 +110,6 @@ static int action_start_shader_action_preset_parameter(unsigned type, const char
param = &shader->parameters[type - MENU_SETTINGS_SHADER_PRESET_PARAMETER_0]; param = &shader->parameters[type - MENU_SETTINGS_SHADER_PRESET_PARAMETER_0];
param->current = param->initial; param->current = param->initial;
param->current = min(max(param->minimum, param->current), param->maximum); param->current = min(max(param->minimum, param->current), param->maximum);
g_runloop.frames.video.current.menu.action.active = true;
#endif #endif
return 0; return 0;
@ -140,8 +133,6 @@ static int action_start_shader_pass(unsigned type, const char *label,
if (shader_pass) if (shader_pass)
*shader_pass->source.path = '\0'; *shader_pass->source.path = '\0';
g_runloop.frames.video.current.menu.action.active = true;
#endif #endif
return 0; return 0;
@ -169,7 +160,6 @@ static int action_start_shader_scale_pass(unsigned type, const char *label,
{ {
shader_pass->fbo.scale_x = shader_pass->fbo.scale_y = 0; shader_pass->fbo.scale_x = shader_pass->fbo.scale_y = 0;
shader_pass->fbo.valid = false; shader_pass->fbo.valid = false;
g_runloop.frames.video.current.menu.action.active = true;
} }
} }
#endif #endif
@ -196,7 +186,6 @@ static int action_start_shader_filter_pass(unsigned type, const char *label,
return -1; return -1;
shader_pass->filter = RARCH_FILTER_UNSPEC; shader_pass->filter = RARCH_FILTER_UNSPEC;
g_runloop.frames.video.current.menu.action.active = true;
#endif #endif
return 0; return 0;
@ -219,7 +208,6 @@ static int action_start_shader_num_passes(unsigned type, const char *label,
menu->need_refresh = true; menu->need_refresh = true;
video_shader_resolve_parameters(NULL, menu->shader); video_shader_resolve_parameters(NULL, menu->shader);
g_runloop.frames.video.current.menu.action.active = true;
#endif #endif
return 0; return 0;
} }
@ -239,7 +227,6 @@ static int action_start_cheat_num_passes(unsigned type, const char *label,
{ {
cheat_manager_realloc(cheat, 0); cheat_manager_realloc(cheat, 0);
menu->need_refresh = true; menu->need_refresh = true;
g_runloop.frames.video.current.menu.action.active = true;
} }
return 0; return 0;
@ -258,7 +245,6 @@ static int action_start_performance_counters_frontend(unsigned type, const char
{ {
counters[offset]->total = 0; counters[offset]->total = 0;
counters[offset]->call_cnt = 0; counters[offset]->call_cnt = 0;
g_runloop.frames.video.current.menu.action.active = true;
} }
return 0; return 0;
@ -272,7 +258,6 @@ static int action_start_core_setting(unsigned type,
(void)label; (void)label;
core_option_set_default(g_extern.system.core_options, idx); core_option_set_default(g_extern.system.core_options, idx);
g_runloop.frames.video.current.menu.action.active = true;
return 0; return 0;
} }
@ -281,7 +266,6 @@ static int action_start_lookup_setting(unsigned type, const char *label,
unsigned action) unsigned action)
{ {
int ret = menu_setting_set(type, label, MENU_ACTION_START, false); int ret = menu_setting_set(type, label, MENU_ACTION_START, false);
g_runloop.frames.video.current.menu.action.active = true;
return ret; return ret;
} }

View File

@ -39,12 +39,10 @@ static int shader_action_parameter_toggle(unsigned type, const char *label,
{ {
case MENU_ACTION_LEFT: case MENU_ACTION_LEFT:
param->current -= param->step; param->current -= param->step;
g_runloop.frames.video.current.menu.action.active = true;
break; break;
case MENU_ACTION_RIGHT: case MENU_ACTION_RIGHT:
param->current += param->step; param->current += param->step;
g_runloop.frames.video.current.menu.action.active = true;
break; break;
default: default:
@ -76,12 +74,10 @@ static int shader_action_parameter_preset_toggle(unsigned type, const char *labe
{ {
case MENU_ACTION_LEFT: case MENU_ACTION_LEFT:
param->current -= param->step; param->current -= param->step;
g_runloop.frames.video.current.menu.action.active = true;
break; break;
case MENU_ACTION_RIGHT: case MENU_ACTION_RIGHT:
param->current += param->step; param->current += param->step;
g_runloop.frames.video.current.menu.action.active = true;
break; break;
default: default:
@ -109,7 +105,6 @@ static int action_toggle_cheat(unsigned type, const char *label,
case MENU_ACTION_RIGHT: case MENU_ACTION_RIGHT:
cheat->cheats[idx].state = !cheat->cheats[idx].state; cheat->cheats[idx].state = !cheat->cheats[idx].state;
cheat_manager_update(cheat, idx); cheat_manager_update(cheat, idx);
g_runloop.frames.video.current.menu.action.active = true;
break; break;
} }
@ -129,14 +124,12 @@ static int action_toggle_input_desc(unsigned type, const char *label,
if (g_settings.input.remap_ids[inp_desc_user][inp_desc_button_index_offset] > 0) if (g_settings.input.remap_ids[inp_desc_user][inp_desc_button_index_offset] > 0)
{ {
g_settings.input.remap_ids[inp_desc_user][inp_desc_button_index_offset]--; g_settings.input.remap_ids[inp_desc_user][inp_desc_button_index_offset]--;
g_runloop.frames.video.current.menu.action.active = true;
} }
break; break;
case MENU_ACTION_RIGHT: case MENU_ACTION_RIGHT:
if (g_settings.input.remap_ids[inp_desc_user][inp_desc_button_index_offset] < RARCH_FIRST_CUSTOM_BIND) if (g_settings.input.remap_ids[inp_desc_user][inp_desc_button_index_offset] < RARCH_FIRST_CUSTOM_BIND)
{ {
g_settings.input.remap_ids[inp_desc_user][inp_desc_button_index_offset]++; g_settings.input.remap_ids[inp_desc_user][inp_desc_button_index_offset]++;
g_runloop.frames.video.current.menu.action.active = true;
} }
break; break;
} }
@ -154,12 +147,10 @@ static int action_toggle_save_state(unsigned type, const char *label,
if (g_settings.state_slot >= 0) if (g_settings.state_slot >= 0)
{ {
g_settings.state_slot--; g_settings.state_slot--;
g_runloop.frames.video.current.menu.action.active = true;
} }
break; break;
case MENU_ACTION_RIGHT: case MENU_ACTION_RIGHT:
g_settings.state_slot++; g_settings.state_slot++;
g_runloop.frames.video.current.menu.action.active = true;
break; break;
} }
@ -185,21 +176,18 @@ static int action_toggle_scroll(unsigned type, const char *label,
menu->navigation.selection_ptr - fast_scroll_speed, true); menu->navigation.selection_ptr - fast_scroll_speed, true);
else else
menu_navigation_clear(&menu->navigation, false); menu_navigation_clear(&menu->navigation, false);
g_runloop.frames.video.current.menu.action.active = true;
break; break;
case MENU_ACTION_RIGHT: case MENU_ACTION_RIGHT:
if (menu->navigation.selection_ptr + fast_scroll_speed < (menu_list_get_size(menu->menu_list))) if (menu->navigation.selection_ptr + fast_scroll_speed < (menu_list_get_size(menu->menu_list)))
{ {
menu_navigation_set(&menu->navigation, menu_navigation_set(&menu->navigation,
menu->navigation.selection_ptr + fast_scroll_speed, true); menu->navigation.selection_ptr + fast_scroll_speed, true);
g_runloop.frames.video.current.menu.action.active = true;
} }
else else
{ {
if ((menu_list_get_size(menu->menu_list) > 0)) if ((menu_list_get_size(menu->menu_list) > 0))
{ {
menu_navigation_set_last(&menu->navigation); menu_navigation_set_last(&menu->navigation);
g_runloop.frames.video.current.menu.action.active = true;
} }
} }
break; break;
@ -258,11 +246,9 @@ static int action_toggle_mainmenu(unsigned type, const char *label,
"", "",
0); 0);
g_runloop.frames.video.current.menu.action.active = true;
break; break;
case 2: case 2:
action_toggle_scroll(0, "", action, false); action_toggle_scroll(0, "", action, false);
g_runloop.frames.video.current.menu.action.active = true;
break; break;
case 0: case 0:
default: default:
@ -302,7 +288,6 @@ static int action_toggle_shader_scale_pass(unsigned type, const char *label,
shader_pass->fbo.valid = current_scale; shader_pass->fbo.valid = current_scale;
shader_pass->fbo.scale_x = shader_pass->fbo.scale_y = current_scale; shader_pass->fbo.scale_x = shader_pass->fbo.scale_y = current_scale;
g_runloop.frames.video.current.menu.action.active = true;
} }
break; break;
} }
@ -336,7 +321,6 @@ static int action_toggle_shader_filter_pass(unsigned type, const char *label,
unsigned delta = (action == MENU_ACTION_LEFT) ? 2 : 1; unsigned delta = (action == MENU_ACTION_LEFT) ? 2 : 1;
shader_pass->filter = ((shader_pass->filter + delta) % 3); shader_pass->filter = ((shader_pass->filter + delta) % 3);
g_runloop.frames.video.current.menu.action.active = true;
} }
break; break;
} }
@ -373,13 +357,11 @@ static int action_toggle_cheat_num_passes(unsigned type, const char *label,
if (cheat->size) if (cheat->size)
new_size = cheat->size - 1; new_size = cheat->size - 1;
menu->need_refresh = true; menu->need_refresh = true;
g_runloop.frames.video.current.menu.action.active = true;
break; break;
case MENU_ACTION_RIGHT: case MENU_ACTION_RIGHT:
new_size = cheat->size + 1; new_size = cheat->size + 1;
menu->need_refresh = true; menu->need_refresh = true;
g_runloop.frames.video.current.menu.action.active = true;
break; break;
} }
@ -408,14 +390,12 @@ static int action_toggle_shader_num_passes(unsigned type, const char *label,
if (shader->passes) if (shader->passes)
shader->passes--; shader->passes--;
menu->need_refresh = true; menu->need_refresh = true;
g_runloop.frames.video.current.menu.action.active = true;
break; break;
case MENU_ACTION_RIGHT: case MENU_ACTION_RIGHT:
if ((shader->passes < GFX_MAX_SHADERS)) if ((shader->passes < GFX_MAX_SHADERS))
shader->passes++; shader->passes++;
menu->need_refresh = true; menu->need_refresh = true;
g_runloop.frames.video.current.menu.action.active = true;
break; break;
} }
@ -460,7 +440,6 @@ static int action_toggle_video_resolution(unsigned type, const char *label,
driver.video_poke->get_video_output_prev) driver.video_poke->get_video_output_prev)
{ {
driver.video_poke->get_video_output_prev(driver.video_data); driver.video_poke->get_video_output_prev(driver.video_data);
g_runloop.frames.video.current.menu.action.active = true;
} }
break; break;
case MENU_ACTION_RIGHT: case MENU_ACTION_RIGHT:
@ -468,7 +447,6 @@ static int action_toggle_video_resolution(unsigned type, const char *label,
driver.video_poke->get_video_output_next) driver.video_poke->get_video_output_next)
{ {
driver.video_poke->get_video_output_next(driver.video_data); driver.video_poke->get_video_output_next(driver.video_data);
g_runloop.frames.video.current.menu.action.active = true;
} }
break; break;
} }
@ -488,12 +466,10 @@ static int core_setting_toggle(unsigned type, const char *label,
{ {
case MENU_ACTION_LEFT: case MENU_ACTION_LEFT:
core_option_prev(g_extern.system.core_options, idx); core_option_prev(g_extern.system.core_options, idx);
g_runloop.frames.video.current.menu.action.active = true;
break; break;
case MENU_ACTION_RIGHT: case MENU_ACTION_RIGHT:
core_option_next(g_extern.system.core_options, idx); core_option_next(g_extern.system.core_options, idx);
g_runloop.frames.video.current.menu.action.active = true;
break; break;
} }
@ -507,11 +483,9 @@ static int disk_options_disk_idx_toggle(unsigned type, const char *label,
{ {
case MENU_ACTION_LEFT: case MENU_ACTION_LEFT:
rarch_main_command(RARCH_CMD_DISK_PREV); rarch_main_command(RARCH_CMD_DISK_PREV);
g_runloop.frames.video.current.menu.action.active = true;
break; break;
case MENU_ACTION_RIGHT: case MENU_ACTION_RIGHT:
rarch_main_command(RARCH_CMD_DISK_NEXT); rarch_main_command(RARCH_CMD_DISK_NEXT);
g_runloop.frames.video.current.menu.action.active = true;
break; break;
} }