mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-16 15:27:41 +00:00
(Menu) Refactor more settings
This commit is contained in:
parent
47fd26f4e2
commit
bc14933f2f
@ -209,7 +209,11 @@ static void menu_common_entries_init(void *data, unsigned menu_type)
|
||||
break;
|
||||
case MENU_SETTINGS_VIDEO_OPTIONS:
|
||||
file_list_clear(menu->selection_buf);
|
||||
file_list_push(menu->selection_buf, "HW Shared Context", MENU_SETTINGS_VIDEO_HW_SHARED_CONTEXT, 0);
|
||||
if ((current_setting = setting_data_find_setting(setting_data, "video_shared_context")))
|
||||
{
|
||||
*current_setting->value.boolean = g_settings.video.shared_context;
|
||||
file_list_push(menu->selection_buf, current_setting->short_description, MENU_SETTINGS_VIDEO_HW_SHARED_CONTEXT, 0);
|
||||
}
|
||||
#if defined(GEKKO) || defined(__CELLOS_LV2__)
|
||||
file_list_push(menu->selection_buf, "Screen Resolution", MENU_SETTINGS_VIDEO_RESOLUTION, 0);
|
||||
#endif
|
||||
@ -4570,21 +4574,8 @@ static int menu_common_setting_set(unsigned setting, unsigned action)
|
||||
#endif
|
||||
|
||||
case MENU_SETTINGS_VIDEO_HW_SHARED_CONTEXT:
|
||||
switch (action)
|
||||
{
|
||||
case MENU_ACTION_START:
|
||||
g_settings.video.shared_context = video_shared_context;
|
||||
break;
|
||||
|
||||
case MENU_ACTION_LEFT:
|
||||
case MENU_ACTION_RIGHT:
|
||||
case MENU_ACTION_OK:
|
||||
g_settings.video.shared_context = !g_settings.video.shared_context;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if ((current_setting = setting_data_find_setting(setting_data, "video_shared_context")))
|
||||
menu_common_setting_set_current_boolean(current_setting, action);
|
||||
break;
|
||||
case MENU_SETTINGS_VIDEO_VSYNC:
|
||||
if ((current_setting = setting_data_find_setting(setting_data, "video_vsync")))
|
||||
|
@ -733,6 +733,8 @@ static void general_change_handler(const void *data)
|
||||
else if (!strcmp(setting->name, "location_allow"))
|
||||
g_settings.location.allow = *setting->value.boolean;
|
||||
#endif
|
||||
else if (!strcmp(setting->name, "video_shared_context"))
|
||||
g_settings.video.shared_context = *setting->value.boolean;
|
||||
}
|
||||
|
||||
|
||||
@ -850,6 +852,9 @@ rarch_setting_t* setting_data_get_list(void)
|
||||
/* VIDEO */
|
||||
/*********/
|
||||
START_GROUP("Video Options")
|
||||
START_SUB_GROUP("State")
|
||||
CONFIG_BOOL(g_settings.video.shared_context, "video_shared_context", "HW Shared Context Enable", false, GROUP_NAME, SUBGROUP_NAME, general_change_handler)
|
||||
END_SUB_GROUP()
|
||||
START_SUB_GROUP("Monitor")
|
||||
CONFIG_UINT(g_settings.video.monitor_index, "video_monitor_index", "Monitor Index", monitor_index, GROUP_NAME, SUBGROUP_NAME, general_change_handler)
|
||||
#if !defined(RARCH_CONSOLE) && !defined(RARCH_MOBILE)
|
||||
|
Loading…
Reference in New Issue
Block a user