(RGUI) Add Info page - will eventually be possible to switch

drivers with this
This commit is contained in:
twinaphex 2013-10-30 15:36:37 +01:00
parent 3219c5b9f2
commit 7e833618a6
4 changed files with 28 additions and 0 deletions

View File

@ -112,6 +112,7 @@ typedef enum
RGUI_SETTINGS_INPUT_OPTIONS,
RGUI_SETTINGS_PATH_OPTIONS,
RGUI_SETTINGS_OPTIONS,
RGUI_SETTINGS_INFO,
RGUI_SETTINGS_REWIND_ENABLE,
RGUI_SETTINGS_REWIND_GRANULARITY,
RGUI_SETTINGS_CONFIG_SAVE_ON_EXIT,
@ -121,6 +122,9 @@ typedef enum
RGUI_SETTINGS_DISK_OPTIONS,
RGUI_SETTINGS_DISK_INDEX,
RGUI_SETTINGS_DISK_APPEND,
RGUI_SETTINGS_INFO_VIDEO_DRIVER,
RGUI_SETTINGS_INFO_AUDIO_DRIVER,
RGUI_SETTINGS_INFO_INPUT_DRIVER,
#ifdef HAVE_SCREENSHOTS
RGUI_SETTINGS_SCREENSHOT,
RGUI_SETTINGS_GPU_SCREENSHOT,

View File

@ -1093,6 +1093,15 @@ void menu_set_settings_label(char *type_str, size_t type_str_size, unsigned *w,
case RGUI_SETTINGS_VIDEO_HARD_SYNC_FRAMES:
snprintf(type_str, type_str_size, "%u", g_settings.video.hard_sync_frames);
break;
case RGUI_SETTINGS_INFO_VIDEO_DRIVER:
strlcpy(type_str, driver.video->ident, type_str_size);
break;
case RGUI_SETTINGS_INFO_AUDIO_DRIVER:
strlcpy(type_str, driver.audio->ident, type_str_size);
break;
case RGUI_SETTINGS_INFO_INPUT_DRIVER:
strlcpy(type_str, driver.input->ident, type_str_size);
break;
case RGUI_SETTINGS_VIDEO_REFRESH_RATE_AUTO:
{
double refresh_rate = 0.0;
@ -1233,6 +1242,7 @@ void menu_set_settings_label(char *type_str, size_t type_str_size, unsigned *w,
case RGUI_SETTINGS_INPUT_OPTIONS:
case RGUI_SETTINGS_PATH_OPTIONS:
case RGUI_SETTINGS_OPTIONS:
case RGUI_SETTINGS_INFO:
case RGUI_SETTINGS_CUSTOM_BIND_ALL:
case RGUI_SETTINGS_CUSTOM_BIND_DEFAULT_ALL:
case RGUI_START_SCREEN:

View File

@ -78,6 +78,7 @@ static bool menu_type_is_settings(unsigned type)
type == RGUI_SETTINGS_DISK_OPTIONS ||
type == RGUI_SETTINGS_PATH_OPTIONS ||
type == RGUI_SETTINGS_OPTIONS ||
type == RGUI_SETTINGS_INFO ||
(type == RGUI_SETTINGS_INPUT_OPTIONS);
}
@ -231,6 +232,14 @@ static void rgui_settings_options_populate_entries(rgui_handle_t *rgui)
rgui_list_push(rgui->selection_buf, "Show Framerate", RGUI_SETTINGS_DEBUG_TEXT, 0);
}
static void rgui_settings_info_options_populate_entries(rgui_handle_t *rgui)
{
rgui_list_clear(rgui->selection_buf);
rgui_list_push(rgui->selection_buf, "Video driver", RGUI_SETTINGS_INFO_VIDEO_DRIVER, 0);
rgui_list_push(rgui->selection_buf, "Audio driver", RGUI_SETTINGS_INFO_AUDIO_DRIVER, 0);
rgui_list_push(rgui->selection_buf, "Input driver", RGUI_SETTINGS_INFO_INPUT_DRIVER, 0);
}
static void rgui_settings_populate_entries(rgui_handle_t *rgui)
{
rgui_list_clear(rgui->selection_buf);
@ -258,6 +267,7 @@ static void rgui_settings_populate_entries(rgui_handle_t *rgui)
rgui_list_push(rgui->selection_buf, "Input Options", RGUI_SETTINGS_INPUT_OPTIONS, 0);
rgui_list_push(rgui->selection_buf, "Path Options", RGUI_SETTINGS_PATH_OPTIONS, 0);
rgui_list_push(rgui->selection_buf, "Settings", RGUI_SETTINGS_OPTIONS, 0);
rgui_list_push(rgui->selection_buf, "Info", RGUI_SETTINGS_INFO, 0);
if (g_extern.main_is_init && !g_extern.libretro_dummy)
{
@ -922,6 +932,8 @@ static int rgui_settings_iterate(rgui_handle_t *rgui, rgui_action_t action)
rgui_settings_path_populate_entries(rgui);
else if (menu_type == RGUI_SETTINGS_OPTIONS)
rgui_settings_options_populate_entries(rgui);
else if (menu_type == RGUI_SETTINGS_INFO)
rgui_settings_info_options_populate_entries(rgui);
else if (menu_type == RGUI_SETTINGS_CORE_OPTIONS)
rgui_settings_core_options_populate_entries(rgui);
else if (menu_type == RGUI_SETTINGS_AUDIO_OPTIONS)

View File

@ -248,6 +248,8 @@ static void render_text(void *data)
snprintf(title, sizeof(title), "DISK APPEND %s", dir);
else if (menu_type == RGUI_SETTINGS_VIDEO_OPTIONS)
strlcpy(title, "VIDEO OPTIONS", sizeof(title));
else if (menu_type == RGUI_SETTINGS_INFO)
strlcpy(title, "INFO OPTIONS", sizeof(title));
#ifdef HAVE_SHADER_MANAGER
else if (menu_type == RGUI_SETTINGS_SHADER_OPTIONS)
strlcpy(title, "SHADER OPTIONS", sizeof(title));