(RMenu) Split up Shader Options into submenu - same as RGUI

This commit is contained in:
twinaphex 2013-05-05 21:11:34 +02:00
parent e8ef68345b
commit 9d2d0e5844
2 changed files with 37 additions and 14 deletions

View File

@ -232,9 +232,12 @@ static void menu_stack_pop(unsigned menu_type)
selected = FIRST_INGAME_MENU_SETTING;
rgui->frame_buf_show = true;
break;
case INGAME_MENU_SHADER_OPTIONS:
selected = FIRST_VIDEO_SETTING;
break;
#ifdef HAVE_SHADER_MANAGER
case CGP_CHOICE:
selected = FIRST_VIDEO_SETTING;
selected = FIRST_SHADERMAN_SETTING;
break;
#endif
default:
@ -267,6 +270,9 @@ static void menu_stack_push(unsigned menu_type, bool prev_dir)
case INGAME_MENU_VIDEO_OPTIONS:
selected = FIRST_VIDEO_SETTING;
break;
case INGAME_MENU_SHADER_OPTIONS:
selected = FIRST_SHADERMAN_SETTING;
break;
case INGAME_MENU_AUDIO_OPTIONS:
selected = FIRST_AUDIO_SETTING;
break;
@ -351,6 +357,10 @@ static void display_menubar(uint8_t menu_type)
case INGAME_MENU_VIDEO_OPTIONS_MODE:
strlcpy(title, "Video Options", sizeof(title));
break;
case INGAME_MENU_SHADER_OPTIONS:
case INGAME_MENU_SHADER_OPTIONS_MODE:
strlcpy(title, "Shader Options", sizeof(title));
break;
case INGAME_MENU_INPUT_OPTIONS:
case INGAME_MENU_INPUT_OPTIONS_MODE:
strlcpy(title, "Input Options", sizeof(title));
@ -1522,6 +1532,10 @@ static int set_setting_action(uint8_t menu_type, unsigned switchvalue, uint64_t
if (input & (1ULL << DEVICE_NAV_B))
menu_stack_push(INGAME_MENU_VIDEO_OPTIONS, false);
break;
case INGAME_MENU_SHADER_OPTIONS_MODE:
if (input & (1ULL << DEVICE_NAV_B))
menu_stack_push(INGAME_MENU_SHADER_OPTIONS, false);
break;
case INGAME_MENU_AUDIO_OPTIONS_MODE:
if (input & (1ULL << DEVICE_NAV_B))
menu_stack_push(INGAME_MENU_AUDIO_OPTIONS, false);
@ -1727,13 +1741,15 @@ static int select_setting(void *data, uint64_t input)
break;
case INGAME_MENU_VIDEO_OPTIONS:
first_setting = FIRST_VIDEO_SETTING;
max_settings = SHADERMAN_SHADER_LAST;
max_settings = MAX_NO_OF_VIDEO_SETTINGS;
break;
case INGAME_MENU_SHADER_OPTIONS:
first_setting = FIRST_SHADERMAN_SETTING;
#ifdef HAVE_SHADER_MANAGER
switch (rgui->shader.passes)
{
case 0:
max_settings = MAX_NO_OF_VIDEO_SETTINGS;
max_settings = MAX_NO_OF_SHADERMAN_SETTINGS;
break;
case 1:
max_settings = SHADERMAN_SHADER_0_SCALE+1;
@ -2085,6 +2101,11 @@ static int select_setting(void *data, uint64_t input)
strlcpy(setting_text, "...", sizeof(setting_text));
strlcpy(comment, "Set core-specific options.", sizeof(comment));
break;
case INGAME_MENU_SHADER_OPTIONS_MODE:
strlcpy(text, "Shader Options", sizeof(text));
strlcpy(setting_text, "...", sizeof(setting_text));
strlcpy(comment, "Set and manage shader options.", sizeof(comment));
break;
case INGAME_MENU_LOAD_GAME_HISTORY_MODE:
strlcpy(text, "Load Game (History)", sizeof(text));
strlcpy(setting_text, "...", sizeof(setting_text));
@ -3013,6 +3034,7 @@ int rgui_iterate(rgui_handle_t *rgui)
case INGAME_MENU:
case INGAME_MENU_SETTINGS:
case INGAME_MENU_VIDEO_OPTIONS:
case INGAME_MENU_SHADER_OPTIONS:
case INGAME_MENU_AUDIO_OPTIONS:
case INGAME_MENU_INPUT_OPTIONS:
case INGAME_MENU_PATH_OPTIONS:

View File

@ -64,6 +64,7 @@ enum
INGAME_MENU_AUDIO_OPTIONS,
INGAME_MENU_INPUT_OPTIONS,
INGAME_MENU_PATH_OPTIONS,
INGAME_MENU_SHADER_OPTIONS,
INGAME_MENU_SCREENSHOT,
};
@ -137,6 +138,9 @@ enum
INGAME_MENU_RETURN_TO_MULTIMAN,
#endif
INGAME_MENU_QUIT_RETROARCH,
#ifdef HAVE_SHADER_MANAGER
INGAME_MENU_SHADER_OPTIONS_MODE,
#endif
#ifdef __CELLOS_LV2__
SETTING_CHANGE_RESOLUTION,
SETTING_PAL60_MODE,
@ -183,31 +187,28 @@ enum
SHADERMAN_SHADER_7_FILTER,
SHADERMAN_SHADER_7_SCALE,
#endif
#ifdef HAVE_SHADER_MANAGER
SHADERMAN_SHADER_LAST = SHADERMAN_SHADER_0_SCALE + (3 * (RGUI_MAX_SHADERS - 1)),
#else
SHADERMAN_SHADER_LAST = SETTING_ROTATION+1,
#endif
SHADERMAN_LAST,
SETTING_LAST_LAST,
};
#endif
#define FIRST_SETTING 0
#define FIRST_VIDEO_SETTING INGAME_MENU_QUIT_RETROARCH+1
#define FIRST_SETTING 0
#define FIRST_VIDEO_SETTING INGAME_MENU_QUIT_RETROARCH+1
#define FIRST_AUDIO_SETTING SETTING_DEFAULT_VIDEO_ALL+1
#define FIRST_PATH_SETTING SETTING_DEFAULT_AUDIO_ALL+1
#define FIRST_CONTROLS_SETTING_PAGE_1 SETTING_PATH_DEFAULT_ALL+1
#define FIRST_CONTROL_BIND SETTING_CONTROLS_RETRO_DEVICE_ID_JOYPAD_B
#define FIRST_INGAME_MENU_SETTING SETTING_LAST+1
#define MAX_NO_OF_SETTINGS SETTING_DEFAULT_VIDEO_ALL+1
#define MAX_NO_OF_SETTINGS SETTING_DEFAULT_VIDEO_ALL+1
#define MAX_NO_OF_VIDEO_SETTINGS SETTING_ROTATION+1
#define MAX_NO_OF_AUDIO_SETTINGS SETTING_DEFAULT_AUDIO_ALL+1
#define MAX_NO_OF_PATH_SETTINGS SETTING_PATH_DEFAULT_ALL+1
#define MAX_NO_OF_CONTROLS_SETTINGS SETTING_CONTROLS_DEFAULT_ALL+1
#define MAX_NO_OF_INGAME_MENU_SETTINGS INGAME_MENU_QUIT_RETROARCH+1
#ifdef HAVE_SHADER_MANAGER
#define MAX_NO_OF_VIDEO_SETTINGS SHADERMAN_SHADER_PASSES+1
#define FIRST_SHADERMAN_SETTING SHADERMAN_AUTOSTART_CGP_ON_STARTUP
#define MAX_NO_OF_SHADERMAN_SETTINGS SHADERMAN_SHADER_PASSES+1
#endif
void menu_init (void);