(Menu) Make distinction between menu and RGUI more clear - RGUI is just

the display layer driver now
This commit is contained in:
twinaphex 2014-06-10 01:42:26 +02:00
parent 974af4429a
commit 639e6dbe33
11 changed files with 1561 additions and 1561 deletions

View File

@ -458,10 +458,10 @@ typedef struct menu_ctx_driver
const char *ident;
} menu_ctx_driver_t;
#define RGUI_MAX_BUTTONS 219
#define MENU_MAX_BUTTONS 219
#define RGUI_MAX_AXES 32
#define RGUI_MAX_HATS 4
#define MENU_MAX_AXES 32
#define MENU_MAX_HATS 4
#ifndef MAX_PLAYERS
#define MAX_PLAYERS 8
@ -469,17 +469,17 @@ typedef struct menu_ctx_driver
struct rgui_bind_state_port
{
bool buttons[RGUI_MAX_BUTTONS];
int16_t axes[RGUI_MAX_AXES];
uint16_t hats[RGUI_MAX_HATS];
bool buttons[MENU_MAX_BUTTONS];
int16_t axes[MENU_MAX_AXES];
uint16_t hats[MENU_MAX_HATS];
};
struct rgui_bind_axis_state
{
// Default axis state.
int16_t rested_axes[RGUI_MAX_AXES];
int16_t rested_axes[MENU_MAX_AXES];
// Locked axis state. If we configured an axis, avoid having the same axis state trigger something again right away.
int16_t locked_axes[RGUI_MAX_AXES];
int16_t locked_axes[MENU_MAX_AXES];
};
struct rgui_bind_state

File diff suppressed because it is too large Load Diff

View File

@ -30,169 +30,169 @@
typedef enum
{
// Shader stuff
RGUI_SETTINGS_GENERAL_OPTIONS = RGUI_START_SCREEN + 1,
RGUI_SETTINGS_VIDEO_OPTIONS,
RGUI_SETTINGS_VIDEO_OPTIONS_FIRST,
RGUI_SETTINGS_VIDEO_RESOLUTION,
RGUI_SETTINGS_VIDEO_PAL60,
RGUI_SETTINGS_VIDEO_FILTER,
RGUI_SETTINGS_VIDEO_SOFT_FILTER,
RGUI_SETTINGS_FLICKER_FILTER,
RGUI_SETTINGS_SOFT_DISPLAY_FILTER,
RGUI_SETTINGS_VIDEO_GAMMA,
RGUI_SETTINGS_VIDEO_INTEGER_SCALE,
RGUI_SETTINGS_VIDEO_ASPECT_RATIO,
RGUI_SETTINGS_CUSTOM_VIEWPORT,
RGUI_SETTINGS_CUSTOM_VIEWPORT_2,
RGUI_SETTINGS_TOGGLE_FULLSCREEN,
RGUI_SETTINGS_VIDEO_THREADED,
RGUI_SETTINGS_VIDEO_ROTATION,
RGUI_SETTINGS_VIDEO_VSYNC,
RGUI_SETTINGS_VIDEO_HARD_SYNC,
RGUI_SETTINGS_VIDEO_HARD_SYNC_FRAMES,
RGUI_SETTINGS_VIDEO_BLACK_FRAME_INSERTION,
RGUI_SETTINGS_VIDEO_SWAP_INTERVAL,
RGUI_SETTINGS_VIDEO_WINDOW_SCALE_X,
RGUI_SETTINGS_VIDEO_WINDOW_SCALE_Y,
RGUI_SETTINGS_VIDEO_CROP_OVERSCAN,
RGUI_SETTINGS_VIDEO_REFRESH_RATE_AUTO,
RGUI_SETTINGS_VIDEO_MONITOR_INDEX,
RGUI_SETTINGS_VIDEO_SOFTFILTER,
RGUI_SETTINGS_VIDEO_OPTIONS_LAST,
RGUI_SETTINGS_FONT_OPTIONS,
RGUI_SETTINGS_FONT_ENABLE,
RGUI_SETTINGS_FONT_SIZE,
RGUI_SETTINGS_SLOWMOTION_RATIO,
RGUI_SETTINGS_FASTFORWARD_RATIO,
RGUI_SETTINGS_LOAD_DUMMY_ON_CORE_SHUTDOWN,
RGUI_SETTINGS_SHADER_OPTIONS,
RGUI_SETTINGS_SHADER_FILTER,
RGUI_SETTINGS_SHADER_PRESET,
RGUI_SETTINGS_SHADER_APPLY,
RGUI_SETTINGS_SHADER_PARAMETERS, // Modifies current shader directly. Will not get saved to CGP.
RGUI_SETTINGS_SHADER_PRESET_PARAMETERS, // Modifies shader preset currently in RGUI.
RGUI_SETTINGS_SHADER_PASSES,
RGUI_SETTINGS_SHADER_PARAMETER_0,
RGUI_SETTINGS_SHADER_PARAMETER_LAST = RGUI_SETTINGS_SHADER_PARAMETER_0 + (GFX_MAX_PARAMETERS - 1),
RGUI_SETTINGS_SHADER_0,
RGUI_SETTINGS_SHADER_0_FILTER,
RGUI_SETTINGS_SHADER_0_SCALE,
RGUI_SETTINGS_SHADER_LAST = RGUI_SETTINGS_SHADER_0_SCALE + (3 * (GFX_MAX_SHADERS - 1)),
RGUI_SETTINGS_SHADER_PRESET_SAVE,
MENU_SETTINGS_GENERAL_OPTIONS = MENU_START_SCREEN + 1,
MENU_SETTINGS_VIDEO_OPTIONS,
MENU_SETTINGS_VIDEO_OPTIONS_FIRST,
MENU_SETTINGS_VIDEO_RESOLUTION,
MENU_SETTINGS_VIDEO_PAL60,
MENU_SETTINGS_VIDEO_FILTER,
MENU_SETTINGS_VIDEO_SOFT_FILTER,
MENU_SETTINGS_FLICKER_FILTER,
MENU_SETTINGS_SOFT_DISPLAY_FILTER,
MENU_SETTINGS_VIDEO_GAMMA,
MENU_SETTINGS_VIDEO_INTEGER_SCALE,
MENU_SETTINGS_VIDEO_ASPECT_RATIO,
MENU_SETTINGS_CUSTOM_VIEWPORT,
MENU_SETTINGS_CUSTOM_VIEWPORT_2,
MENU_SETTINGS_TOGGLE_FULLSCREEN,
MENU_SETTINGS_VIDEO_THREADED,
MENU_SETTINGS_VIDEO_ROTATION,
MENU_SETTINGS_VIDEO_VSYNC,
MENU_SETTINGS_VIDEO_HARD_SYNC,
MENU_SETTINGS_VIDEO_HARD_SYNC_FRAMES,
MENU_SETTINGS_VIDEO_BLACK_FRAME_INSERTION,
MENU_SETTINGS_VIDEO_SWAP_INTERVAL,
MENU_SETTINGS_VIDEO_WINDOW_SCALE_X,
MENU_SETTINGS_VIDEO_WINDOW_SCALE_Y,
MENU_SETTINGS_VIDEO_CROP_OVERSCAN,
MENU_SETTINGS_VIDEO_REFRESH_RATE_AUTO,
MENU_SETTINGS_VIDEO_MONITOR_INDEX,
MENU_SETTINGS_VIDEO_SOFTFILTER,
MENU_SETTINGS_VIDEO_OPTIONS_LAST,
MENU_SETTINGS_FONT_OPTIONS,
MENU_SETTINGS_FONT_ENABLE,
MENU_SETTINGS_FONT_SIZE,
MENU_SETTINGS_SLOWMOTION_RATIO,
MENU_SETTINGS_FASTFORWARD_RATIO,
MENU_SETTINGS_LOAD_DUMMY_ON_CORE_SHUTDOWN,
MENU_SETTINGS_SHADER_OPTIONS,
MENU_SETTINGS_SHADER_FILTER,
MENU_SETTINGS_SHADER_PRESET,
MENU_SETTINGS_SHADER_APPLY,
MENU_SETTINGS_SHADER_PARAMETERS, // Modifies current shader directly. Will not get saved to CGP.
MENU_SETTINGS_SHADER_PRESET_PARAMETERS, // Modifies shader preset currently in RGUI.
MENU_SETTINGS_SHADER_PASSES,
MENU_SETTINGS_SHADER_PARAMETER_0,
MENU_SETTINGS_SHADER_PARAMETER_LAST = MENU_SETTINGS_SHADER_PARAMETER_0 + (GFX_MAX_PARAMETERS - 1),
MENU_SETTINGS_SHADER_0,
MENU_SETTINGS_SHADER_0_FILTER,
MENU_SETTINGS_SHADER_0_SCALE,
MENU_SETTINGS_SHADER_LAST = MENU_SETTINGS_SHADER_0_SCALE + (3 * (GFX_MAX_SHADERS - 1)),
MENU_SETTINGS_SHADER_PRESET_SAVE,
// settings options are done here too
RGUI_SETTINGS_OPEN_FILEBROWSER,
RGUI_SETTINGS_OPEN_FILEBROWSER_DEFERRED_CORE,
RGUI_SETTINGS_OPEN_HISTORY,
RGUI_SETTINGS_CORE,
RGUI_SETTINGS_CORE_INFO,
RGUI_SETTINGS_DEFERRED_CORE,
RGUI_SETTINGS_CONFIG,
RGUI_SETTINGS_SAVE_CONFIG,
RGUI_SETTINGS_CORE_OPTIONS,
RGUI_SETTINGS_AUDIO_OPTIONS,
RGUI_SETTINGS_INPUT_OPTIONS,
RGUI_SETTINGS_PATH_OPTIONS,
RGUI_SETTINGS_OVERLAY_OPTIONS,
RGUI_SETTINGS_NETPLAY_OPTIONS,
RGUI_SETTINGS_PRIVACY_OPTIONS,
RGUI_SETTINGS_OPTIONS,
RGUI_SETTINGS_DRIVERS,
RGUI_SETTINGS_PERFORMANCE_COUNTERS,
RGUI_SETTINGS_PERFORMANCE_COUNTERS_LIBRETRO,
RGUI_SETTINGS_PERFORMANCE_COUNTERS_FRONTEND,
RGUI_SETTINGS_REWIND_ENABLE,
RGUI_SETTINGS_LIBRETRO_LOG_LEVEL,
RGUI_SETTINGS_LOGGING_VERBOSITY,
RGUI_SETTINGS_PERFORMANCE_COUNTERS_ENABLE,
RGUI_SETTINGS_REWIND_GRANULARITY,
RGUI_SETTINGS_CONFIG_SAVE_ON_EXIT,
RGUI_SETTINGS_PER_CORE_CONFIG,
RGUI_SETTINGS_SRAM_AUTOSAVE,
RGUI_SETTINGS_SAVESTATE_SAVE,
RGUI_SETTINGS_SAVESTATE_LOAD,
RGUI_SETTINGS_DISK_OPTIONS,
RGUI_SETTINGS_DISK_INDEX,
RGUI_SETTINGS_DISK_APPEND,
RGUI_SETTINGS_DRIVER_VIDEO,
RGUI_SETTINGS_DRIVER_AUDIO,
RGUI_SETTINGS_DRIVER_AUDIO_DEVICE,
RGUI_SETTINGS_DRIVER_AUDIO_RESAMPLER,
RGUI_SETTINGS_DRIVER_INPUT,
RGUI_SETTINGS_DRIVER_CAMERA,
RGUI_SETTINGS_DRIVER_LOCATION,
RGUI_SETTINGS_DRIVER_MENU,
RGUI_SETTINGS_SCREENSHOT,
RGUI_SETTINGS_GPU_SCREENSHOT,
RGUI_SETTINGS_SAVESTATE_AUTO_SAVE,
RGUI_SETTINGS_SAVESTATE_AUTO_LOAD,
RGUI_SETTINGS_BLOCK_SRAM_OVERWRITE,
RGUI_SETTINGS_WINDOW_COMPOSITING_ENABLE,
RGUI_SETTINGS_PAUSE_IF_WINDOW_FOCUS_LOST,
RGUI_SCREENSHOT_DIR_PATH,
RGUI_BROWSER_DIR_PATH,
RGUI_CONTENT_DIR_PATH,
RGUI_ASSETS_DIR_PATH,
RGUI_FILTER_DIR_PATH,
RGUI_DSP_FILTER_DIR_PATH,
RGUI_SHADER_DIR_PATH,
RGUI_SAVESTATE_DIR_PATH,
RGUI_SAVEFILE_DIR_PATH,
RGUI_LIBRETRO_DIR_PATH,
RGUI_LIBRETRO_INFO_DIR_PATH,
RGUI_CONFIG_DIR_PATH,
RGUI_OVERLAY_DIR_PATH,
RGUI_SYSTEM_DIR_PATH,
RGUI_AUTOCONFIG_DIR_PATH,
RGUI_SETTINGS_RESTART_GAME,
RGUI_SETTINGS_AUDIO_DSP_FILTER,
RGUI_SETTINGS_AUDIO_MUTE,
RGUI_SETTINGS_AUDIO_CONTROL_RATE_DELTA,
RGUI_SETTINGS_AUDIO_DSP_EFFECT,
RGUI_SETTINGS_AUDIO_VOLUME,
RGUI_SETTINGS_CUSTOM_BGM_CONTROL_ENABLE,
RGUI_SETTINGS_ZIP_EXTRACT,
RGUI_SETTINGS_DEBUG_TEXT,
RGUI_SETTINGS_RESTART_EMULATOR,
RGUI_SETTINGS_RESUME_GAME,
RGUI_SETTINGS_QUIT_RARCH,
MENU_SETTINGS_OPEN_FILEBROWSER,
MENU_SETTINGS_OPEN_FILEBROWSER_DEFERRED_CORE,
MENU_SETTINGS_OPEN_HISTORY,
MENU_SETTINGS_CORE,
MENU_SETTINGS_CORE_INFO,
MENU_SETTINGS_DEFERRED_CORE,
MENU_SETTINGS_CONFIG,
MENU_SETTINGS_SAVE_CONFIG,
MENU_SETTINGS_CORE_OPTIONS,
MENU_SETTINGS_AUDIO_OPTIONS,
MENU_SETTINGS_INPUT_OPTIONS,
MENU_SETTINGS_PATH_OPTIONS,
MENU_SETTINGS_OVERLAY_OPTIONS,
MENU_SETTINGS_NETPLAY_OPTIONS,
MENU_SETTINGS_PRIVACY_OPTIONS,
MENU_SETTINGS_OPTIONS,
MENU_SETTINGS_DRIVERS,
MENU_SETTINGS_PERFORMANCE_COUNTERS,
MENU_SETTINGS_PERFORMANCE_COUNTERS_LIBRETRO,
MENU_SETTINGS_PERFORMANCE_COUNTERS_FRONTEND,
MENU_SETTINGS_REWIND_ENABLE,
MENU_SETTINGS_LIBRETRO_LOG_LEVEL,
MENU_SETTINGS_LOGGING_VERBOSITY,
MENU_SETTINGS_PERFORMANCE_COUNTERS_ENABLE,
MENU_SETTINGS_REWIND_GRANULARITY,
MENU_SETTINGS_CONFIG_SAVE_ON_EXIT,
MENU_SETTINGS_PER_CORE_CONFIG,
MENU_SETTINGS_SRAM_AUTOSAVE,
MENU_SETTINGS_SAVESTATE_SAVE,
MENU_SETTINGS_SAVESTATE_LOAD,
MENU_SETTINGS_DISK_OPTIONS,
MENU_SETTINGS_DISK_INDEX,
MENU_SETTINGS_DISK_APPEND,
MENU_SETTINGS_DRIVER_VIDEO,
MENU_SETTINGS_DRIVER_AUDIO,
MENU_SETTINGS_DRIVER_AUDIO_DEVICE,
MENU_SETTINGS_DRIVER_AUDIO_RESAMPLER,
MENU_SETTINGS_DRIVER_INPUT,
MENU_SETTINGS_DRIVER_CAMERA,
MENU_SETTINGS_DRIVER_LOCATION,
MENU_SETTINGS_DRIVER_MENU,
MENU_SETTINGS_SCREENSHOT,
MENU_SETTINGS_GPU_SCREENSHOT,
MENU_SETTINGS_SAVESTATE_AUTO_SAVE,
MENU_SETTINGS_SAVESTATE_AUTO_LOAD,
MENU_SETTINGS_BLOCK_SRAM_OVERWRITE,
MENU_SETTINGS_WINDOW_COMPOSITING_ENABLE,
MENU_SETTINGS_PAUSE_IF_WINDOW_FOCUS_LOST,
MENU_SCREENSHOT_DIR_PATH,
MENU_BROWSER_DIR_PATH,
MENU_CONTENT_DIR_PATH,
MENU_ASSETS_DIR_PATH,
MENU_FILTER_DIR_PATH,
MENU_DSP_FILTER_DIR_PATH,
MENU_SHADER_DIR_PATH,
MENU_SAVESTATE_DIR_PATH,
MENU_SAVEFILE_DIR_PATH,
MENU_LIBRETRO_DIR_PATH,
MENU_LIBRETRO_INFO_DIR_PATH,
MENU_CONFIG_DIR_PATH,
MENU_OVERLAY_DIR_PATH,
MENU_SYSTEM_DIR_PATH,
MENU_AUTOCONFIG_DIR_PATH,
MENU_SETTINGS_RESTART_GAME,
MENU_SETTINGS_AUDIO_DSP_FILTER,
MENU_SETTINGS_AUDIO_MUTE,
MENU_SETTINGS_AUDIO_CONTROL_RATE_DELTA,
MENU_SETTINGS_AUDIO_DSP_EFFECT,
MENU_SETTINGS_AUDIO_VOLUME,
MENU_SETTINGS_CUSTOM_BGM_CONTROL_ENABLE,
MENU_SETTINGS_ZIP_EXTRACT,
MENU_SETTINGS_DEBUG_TEXT,
MENU_SETTINGS_RESTART_EMULATOR,
MENU_SETTINGS_RESUME_GAME,
MENU_SETTINGS_QUIT_RARCH,
RGUI_SETTINGS_NETPLAY_ENABLE,
RGUI_SETTINGS_NETPLAY_MODE,
RGUI_SETTINGS_NETPLAY_SPECTATOR_MODE_ENABLE,
RGUI_SETTINGS_NETPLAY_HOST_IP_ADDRESS,
RGUI_SETTINGS_NETPLAY_TCP_UDP_PORT,
RGUI_SETTINGS_NETPLAY_DELAY_FRAMES,
RGUI_SETTINGS_NETPLAY_NICKNAME,
MENU_SETTINGS_NETPLAY_ENABLE,
MENU_SETTINGS_NETPLAY_MODE,
MENU_SETTINGS_NETPLAY_SPECTATOR_MODE_ENABLE,
MENU_SETTINGS_NETPLAY_HOST_IP_ADDRESS,
MENU_SETTINGS_NETPLAY_TCP_UDP_PORT,
MENU_SETTINGS_NETPLAY_DELAY_FRAMES,
MENU_SETTINGS_NETPLAY_NICKNAME,
RGUI_SETTINGS_PRIVACY_CAMERA_ALLOW,
RGUI_SETTINGS_PRIVACY_LOCATION_ALLOW,
MENU_SETTINGS_PRIVACY_CAMERA_ALLOW,
MENU_SETTINGS_PRIVACY_LOCATION_ALLOW,
RGUI_SETTINGS_OVERLAY_PRESET,
RGUI_SETTINGS_OVERLAY_OPACITY,
RGUI_SETTINGS_OVERLAY_SCALE,
RGUI_SETTINGS_BIND_PLAYER,
RGUI_SETTINGS_BIND_DEVICE,
RGUI_SETTINGS_BIND_DEVICE_TYPE,
RGUI_SETTINGS_BIND_ANALOG_MODE,
RGUI_SETTINGS_INPUT_AXIS_THRESHOLD,
RGUI_SETTINGS_DEVICE_AUTODETECT_ENABLE,
MENU_SETTINGS_OVERLAY_PRESET,
MENU_SETTINGS_OVERLAY_OPACITY,
MENU_SETTINGS_OVERLAY_SCALE,
MENU_SETTINGS_BIND_PLAYER,
MENU_SETTINGS_BIND_DEVICE,
MENU_SETTINGS_BIND_DEVICE_TYPE,
MENU_SETTINGS_BIND_ANALOG_MODE,
MENU_SETTINGS_INPUT_AXIS_THRESHOLD,
MENU_SETTINGS_DEVICE_AUTODETECT_ENABLE,
// Match up with libretro order for simplicity.
RGUI_SETTINGS_BIND_BEGIN,
RGUI_SETTINGS_BIND_LAST = RGUI_SETTINGS_BIND_BEGIN + RARCH_ANALOG_RIGHT_Y_MINUS,
RGUI_SETTINGS_BIND_ALL_LAST = RGUI_SETTINGS_BIND_BEGIN + RARCH_MENU_TOGGLE,
MENU_SETTINGS_BIND_BEGIN,
MENU_SETTINGS_BIND_LAST = MENU_SETTINGS_BIND_BEGIN + RARCH_ANALOG_RIGHT_Y_MINUS,
MENU_SETTINGS_BIND_ALL_LAST = MENU_SETTINGS_BIND_BEGIN + RARCH_MENU_TOGGLE,
RGUI_SETTINGS_CUSTOM_BIND_MODE,
RGUI_SETTINGS_CUSTOM_BIND,
RGUI_SETTINGS_CUSTOM_BIND_KEYBOARD,
RGUI_SETTINGS_CUSTOM_BIND_ALL,
RGUI_SETTINGS_CUSTOM_BIND_DEFAULT_ALL,
RGUI_SETTINGS_ONSCREEN_KEYBOARD_ENABLE,
RGUI_SETTINGS_LIBRETRO_PERF_COUNTERS_BEGIN,
RGUI_SETTINGS_LIBRETRO_PERF_COUNTERS_END = RGUI_SETTINGS_LIBRETRO_PERF_COUNTERS_BEGIN + (MAX_COUNTERS - 1),
RGUI_SETTINGS_PERF_COUNTERS_BEGIN,
RGUI_SETTINGS_PERF_COUNTERS_END = RGUI_SETTINGS_PERF_COUNTERS_BEGIN + (MAX_COUNTERS - 1)
MENU_SETTINGS_CUSTOM_BIND_MODE,
MENU_SETTINGS_CUSTOM_BIND,
MENU_SETTINGS_CUSTOM_BIND_KEYBOARD,
MENU_SETTINGS_CUSTOM_BIND_ALL,
MENU_SETTINGS_CUSTOM_BIND_DEFAULT_ALL,
MENU_SETTINGS_ONSCREEN_KEYBOARD_ENABLE,
MENU_SETTINGS_LIBRETRO_PERF_COUNTERS_BEGIN,
MENU_SETTINGS_LIBRETRO_PERF_COUNTERS_END = MENU_SETTINGS_LIBRETRO_PERF_COUNTERS_BEGIN + (MAX_COUNTERS - 1),
MENU_SETTINGS_PERF_COUNTERS_BEGIN,
MENU_SETTINGS_PERF_COUNTERS_END = MENU_SETTINGS_PERF_COUNTERS_BEGIN + (MAX_COUNTERS - 1)
} rgui_settings_t;
#ifdef GEKKO

View File

@ -285,7 +285,7 @@ static int menu_lakka_iterate(unsigned action)
switch (action)
{
case RGUI_ACTION_LEFT:
case MENU_ACTION_LEFT:
if (depth == 0 && menu_active_category > 0)
{
menu_active_category--;
@ -293,7 +293,7 @@ static int menu_lakka_iterate(unsigned action)
}
break;
case RGUI_ACTION_RIGHT:
case MENU_ACTION_RIGHT:
if (depth == 0 && menu_active_category < num_categories-1)
{
menu_active_category++;
@ -301,7 +301,7 @@ static int menu_lakka_iterate(unsigned action)
}
break;
case RGUI_ACTION_DOWN:
case MENU_ACTION_DOWN:
if (depth == 0 && active_category->active_item < active_category->num_items - 1)
{
active_category->active_item++;
@ -317,7 +317,7 @@ static int menu_lakka_iterate(unsigned action)
}
break;
case RGUI_ACTION_UP:
case MENU_ACTION_UP:
if (depth == 0 && active_category->active_item > 0)
{
active_category->active_item--;
@ -330,7 +330,7 @@ static int menu_lakka_iterate(unsigned action)
}
break;
case RGUI_ACTION_OK:
case MENU_ACTION_OK:
if (depth == 1)
{
switch (active_item->active_subitem)
@ -389,7 +389,7 @@ static int menu_lakka_iterate(unsigned action)
}
break;
case RGUI_ACTION_CANCEL:
case MENU_ACTION_CANCEL:
if (depth == 1)
{
lakka_close_submenu();

View File

@ -293,114 +293,114 @@ static void rgui_render(void)
if (driver.menu_ctx && driver.menu_ctx->backend && driver.menu_ctx->backend->type_is)
menu_type_is = driver.menu_ctx->backend->type_is(menu_type);
if (menu_type == RGUI_SETTINGS_CORE)
if (menu_type == MENU_SETTINGS_CORE)
snprintf(title, sizeof(title), "CORE SELECTION %s", dir);
else if (menu_type == RGUI_SETTINGS_DEFERRED_CORE)
else if (menu_type == MENU_SETTINGS_DEFERRED_CORE)
snprintf(title, sizeof(title), "DETECTED CORES %s", dir);
else if (menu_type == RGUI_SETTINGS_CONFIG)
else if (menu_type == MENU_SETTINGS_CONFIG)
snprintf(title, sizeof(title), "CONFIG %s", dir);
else if (menu_type == RGUI_SETTINGS_DISK_APPEND)
else if (menu_type == MENU_SETTINGS_DISK_APPEND)
snprintf(title, sizeof(title), "DISK APPEND %s", dir);
else if (menu_type == RGUI_SETTINGS_VIDEO_OPTIONS)
else if (menu_type == MENU_SETTINGS_VIDEO_OPTIONS)
strlcpy(title, "VIDEO OPTIONS", sizeof(title));
else if (menu_type == RGUI_SETTINGS_INPUT_OPTIONS ||
menu_type == RGUI_SETTINGS_CUSTOM_BIND ||
menu_type == RGUI_SETTINGS_CUSTOM_BIND_KEYBOARD)
else if (menu_type == MENU_SETTINGS_INPUT_OPTIONS ||
menu_type == MENU_SETTINGS_CUSTOM_BIND ||
menu_type == MENU_SETTINGS_CUSTOM_BIND_KEYBOARD)
strlcpy(title, "INPUT OPTIONS", sizeof(title));
else if (menu_type == RGUI_SETTINGS_OVERLAY_OPTIONS)
else if (menu_type == MENU_SETTINGS_OVERLAY_OPTIONS)
strlcpy(title, "OVERLAY OPTIONS", sizeof(title));
else if (menu_type == RGUI_SETTINGS_NETPLAY_OPTIONS)
else if (menu_type == MENU_SETTINGS_NETPLAY_OPTIONS)
strlcpy(title, "NETPLAY OPTIONS", sizeof(title));
else if (menu_type == RGUI_SETTINGS_PATH_OPTIONS)
else if (menu_type == MENU_SETTINGS_PATH_OPTIONS)
strlcpy(title, "PATH OPTIONS", sizeof(title));
else if (menu_type == RGUI_SETTINGS_OPTIONS)
else if (menu_type == MENU_SETTINGS_OPTIONS)
strlcpy(title, "SETTINGS", sizeof(title));
else if (menu_type == RGUI_SETTINGS_DRIVERS)
else if (menu_type == MENU_SETTINGS_DRIVERS)
strlcpy(title, "DRIVER OPTIONS", sizeof(title));
else if (menu_type == RGUI_SETTINGS_PERFORMANCE_COUNTERS)
else if (menu_type == MENU_SETTINGS_PERFORMANCE_COUNTERS)
strlcpy(title, "PERFORMANCE COUNTERS", sizeof(title));
else if (menu_type == RGUI_SETTINGS_PERFORMANCE_COUNTERS_LIBRETRO)
else if (menu_type == MENU_SETTINGS_PERFORMANCE_COUNTERS_LIBRETRO)
strlcpy(title, "CORE PERFORMANCE COUNTERS", sizeof(title));
else if (menu_type == RGUI_SETTINGS_PERFORMANCE_COUNTERS_FRONTEND)
else if (menu_type == MENU_SETTINGS_PERFORMANCE_COUNTERS_FRONTEND)
strlcpy(title, "FRONTEND PERFORMANCE COUNTERS", sizeof(title));
#ifdef HAVE_SHADER_MANAGER
else if (menu_type == RGUI_SETTINGS_SHADER_OPTIONS)
else if (menu_type == MENU_SETTINGS_SHADER_OPTIONS)
strlcpy(title, "SHADER OPTIONS", sizeof(title));
else if (menu_type == RGUI_SETTINGS_SHADER_PARAMETERS)
else if (menu_type == MENU_SETTINGS_SHADER_PARAMETERS)
strlcpy(title, "SHADER PARAMETERS (CURRENT)", sizeof(title));
else if (menu_type == RGUI_SETTINGS_SHADER_PRESET_PARAMETERS)
else if (menu_type == MENU_SETTINGS_SHADER_PRESET_PARAMETERS)
strlcpy(title, "SHADER PARAMETERS (RGUI PRESET)", sizeof(title));
#endif
else if (menu_type == RGUI_SETTINGS_FONT_OPTIONS)
else if (menu_type == MENU_SETTINGS_FONT_OPTIONS)
strlcpy(title, "FONT OPTIONS", sizeof(title));
else if (menu_type == RGUI_SETTINGS_GENERAL_OPTIONS)
else if (menu_type == MENU_SETTINGS_GENERAL_OPTIONS)
strlcpy(title, "GENERAL OPTIONS", sizeof(title));
else if (menu_type == RGUI_SETTINGS_AUDIO_OPTIONS)
else if (menu_type == MENU_SETTINGS_AUDIO_OPTIONS)
strlcpy(title, "AUDIO OPTIONS", sizeof(title));
else if (menu_type == RGUI_SETTINGS_DISK_OPTIONS)
else if (menu_type == MENU_SETTINGS_DISK_OPTIONS)
strlcpy(title, "DISK OPTIONS", sizeof(title));
else if (menu_type == RGUI_SETTINGS_CORE_OPTIONS)
else if (menu_type == MENU_SETTINGS_CORE_OPTIONS)
strlcpy(title, "CORE OPTIONS", sizeof(title));
else if (menu_type == RGUI_SETTINGS_CORE_INFO)
else if (menu_type == MENU_SETTINGS_CORE_INFO)
strlcpy(title, "CORE INFO", sizeof(title));
else if (menu_type == RGUI_SETTINGS_PRIVACY_OPTIONS)
else if (menu_type == MENU_SETTINGS_PRIVACY_OPTIONS)
strlcpy(title, "PRIVACY OPTIONS", sizeof(title));
#ifdef HAVE_SHADER_MANAGER
else if (menu_type_is == RGUI_SETTINGS_SHADER_OPTIONS)
else if (menu_type_is == MENU_SETTINGS_SHADER_OPTIONS)
snprintf(title, sizeof(title), "SHADER %s", dir);
#endif
else if (menu_type == RGUI_SETTINGS_PATH_OPTIONS ||
menu_type == RGUI_SETTINGS_OPTIONS ||
menu_type == RGUI_SETTINGS_CUSTOM_VIEWPORT ||
menu_type == RGUI_SETTINGS_CUSTOM_VIEWPORT_2 ||
menu_type == RGUI_START_SCREEN ||
menu_type == RGUI_SETTINGS)
else if (menu_type == MENU_SETTINGS_PATH_OPTIONS ||
menu_type == MENU_SETTINGS_OPTIONS ||
menu_type == MENU_SETTINGS_CUSTOM_VIEWPORT ||
menu_type == MENU_SETTINGS_CUSTOM_VIEWPORT_2 ||
menu_type == MENU_START_SCREEN ||
menu_type == MENU_SETTINGS)
snprintf(title, sizeof(title), "MENU %s", dir);
else if (menu_type == RGUI_SETTINGS_OPEN_HISTORY)
else if (menu_type == MENU_SETTINGS_OPEN_HISTORY)
strlcpy(title, "LOAD HISTORY", sizeof(title));
else if (menu_type == RGUI_INFO_SCREEN)
else if (menu_type == MENU_INFO_SCREEN)
strlcpy(title, "INFO", sizeof(title));
#ifdef HAVE_OVERLAY
else if (menu_type == RGUI_SETTINGS_OVERLAY_PRESET)
else if (menu_type == MENU_SETTINGS_OVERLAY_PRESET)
snprintf(title, sizeof(title), "OVERLAY %s", dir);
#endif
else if (menu_type == RGUI_SETTINGS_VIDEO_SOFTFILTER)
else if (menu_type == MENU_SETTINGS_VIDEO_SOFTFILTER)
snprintf(title, sizeof(title), "FILTER %s", dir);
else if (menu_type == RGUI_SETTINGS_AUDIO_DSP_FILTER)
else if (menu_type == MENU_SETTINGS_AUDIO_DSP_FILTER)
snprintf(title, sizeof(title), "DSP FILTER %s", dir);
else if (menu_type == RGUI_BROWSER_DIR_PATH)
else if (menu_type == MENU_BROWSER_DIR_PATH)
snprintf(title, sizeof(title), "BROWSER DIR %s", dir);
else if (menu_type == RGUI_CONTENT_DIR_PATH)
else if (menu_type == MENU_CONTENT_DIR_PATH)
snprintf(title, sizeof(title), "CONTENT DIR %s", dir);
#ifdef HAVE_SCREENSHOTS
else if (menu_type == RGUI_SCREENSHOT_DIR_PATH)
else if (menu_type == MENU_SCREENSHOT_DIR_PATH)
snprintf(title, sizeof(title), "SCREENSHOT DIR %s", dir);
#endif
else if (menu_type == RGUI_AUTOCONFIG_DIR_PATH)
else if (menu_type == MENU_AUTOCONFIG_DIR_PATH)
snprintf(title, sizeof(title), "AUTOCONFIG DIR %s", dir);
else if (menu_type == RGUI_SHADER_DIR_PATH)
else if (menu_type == MENU_SHADER_DIR_PATH)
snprintf(title, sizeof(title), "SHADER DIR %s", dir);
else if (menu_type == RGUI_FILTER_DIR_PATH)
else if (menu_type == MENU_FILTER_DIR_PATH)
snprintf(title, sizeof(title), "FILTER DIR %s", dir);
else if (menu_type == RGUI_DSP_FILTER_DIR_PATH)
else if (menu_type == MENU_DSP_FILTER_DIR_PATH)
snprintf(title, sizeof(title), "DSP FILTER DIR %s", dir);
else if (menu_type == RGUI_SAVESTATE_DIR_PATH)
else if (menu_type == MENU_SAVESTATE_DIR_PATH)
snprintf(title, sizeof(title), "SAVESTATE DIR %s", dir);
#ifdef HAVE_DYNAMIC
else if (menu_type == RGUI_LIBRETRO_DIR_PATH)
else if (menu_type == MENU_LIBRETRO_DIR_PATH)
snprintf(title, sizeof(title), "LIBRETRO DIR %s", dir);
#endif
else if (menu_type == RGUI_CONFIG_DIR_PATH)
else if (menu_type == MENU_CONFIG_DIR_PATH)
snprintf(title, sizeof(title), "CONFIG DIR %s", dir);
else if (menu_type == RGUI_SAVEFILE_DIR_PATH)
else if (menu_type == MENU_SAVEFILE_DIR_PATH)
snprintf(title, sizeof(title), "SAVEFILE DIR %s", dir);
#ifdef HAVE_OVERLAY
else if (menu_type == RGUI_OVERLAY_DIR_PATH)
else if (menu_type == MENU_OVERLAY_DIR_PATH)
snprintf(title, sizeof(title), "OVERLAY DIR %s", dir);
#endif
else if (menu_type == RGUI_SYSTEM_DIR_PATH)
else if (menu_type == MENU_SYSTEM_DIR_PATH)
snprintf(title, sizeof(title), "SYSTEM DIR %s", dir);
else if (menu_type == RGUI_ASSETS_DIR_PATH)
else if (menu_type == MENU_ASSETS_DIR_PATH)
snprintf(title, sizeof(title), "ASSETS DIR %s", dir);
else
{
@ -452,33 +452,33 @@ static void rgui_render(void)
char type_str[256];
unsigned w = 19;
if (menu_type == RGUI_SETTINGS_PERFORMANCE_COUNTERS)
if (menu_type == MENU_SETTINGS_PERFORMANCE_COUNTERS)
w = 28;
else if (menu_type == RGUI_SETTINGS_INPUT_OPTIONS || menu_type == RGUI_SETTINGS_CUSTOM_BIND || menu_type == RGUI_SETTINGS_CUSTOM_BIND_KEYBOARD)
else if (menu_type == MENU_SETTINGS_INPUT_OPTIONS || menu_type == MENU_SETTINGS_CUSTOM_BIND || menu_type == MENU_SETTINGS_CUSTOM_BIND_KEYBOARD)
w = 21;
else if (menu_type == RGUI_SETTINGS_PATH_OPTIONS)
else if (menu_type == MENU_SETTINGS_PATH_OPTIONS)
w = 24;
#ifdef HAVE_SHADER_MANAGER
if (type >= RGUI_SETTINGS_SHADER_FILTER &&
type <= RGUI_SETTINGS_SHADER_LAST)
if (type >= MENU_SETTINGS_SHADER_FILTER &&
type <= MENU_SETTINGS_SHADER_LAST)
{
// HACK. Work around that we're using the menu_type as dir type to propagate state correctly.
if ((menu_type_is == RGUI_SETTINGS_SHADER_OPTIONS)
&& (menu_type_is == RGUI_SETTINGS_SHADER_OPTIONS))
if ((menu_type_is == MENU_SETTINGS_SHADER_OPTIONS)
&& (menu_type_is == MENU_SETTINGS_SHADER_OPTIONS))
{
type = RGUI_FILE_DIRECTORY;
type = MENU_FILE_DIRECTORY;
strlcpy(type_str, "(DIR)", sizeof(type_str));
w = 5;
}
else if (type == RGUI_SETTINGS_SHADER_OPTIONS || type == RGUI_SETTINGS_SHADER_PRESET || type == RGUI_SETTINGS_SHADER_PARAMETERS || type == RGUI_SETTINGS_SHADER_PRESET_PARAMETERS)
else if (type == MENU_SETTINGS_SHADER_OPTIONS || type == MENU_SETTINGS_SHADER_PRESET || type == MENU_SETTINGS_SHADER_PARAMETERS || type == MENU_SETTINGS_SHADER_PRESET_PARAMETERS)
strlcpy(type_str, "...", sizeof(type_str));
else if (type == RGUI_SETTINGS_SHADER_FILTER)
else if (type == MENU_SETTINGS_SHADER_FILTER)
snprintf(type_str, sizeof(type_str), "%s",
g_settings.video.smooth ? "Linear" : "Nearest");
else if (driver.menu_ctx && driver.menu_ctx->backend && driver.menu_ctx->backend->shader_manager_get_str)
{
if (type >= RGUI_SETTINGS_SHADER_PARAMETER_0 && type <= RGUI_SETTINGS_SHADER_PARAMETER_LAST)
if (type >= MENU_SETTINGS_SHADER_PARAMETER_0 && type <= MENU_SETTINGS_SHADER_PARAMETER_LAST)
driver.menu_ctx->backend->shader_manager_get_str(driver.menu->parameter_shader, type_str, sizeof(type_str), type);
else
driver.menu_ctx->backend->shader_manager_get_str(driver.menu->shader, type_str, sizeof(type_str), type);
@ -487,9 +487,9 @@ static void rgui_render(void)
else
#endif
// Pretty-print libretro cores from menu.
if (menu_type == RGUI_SETTINGS_CORE || menu_type == RGUI_SETTINGS_DEFERRED_CORE)
if (menu_type == MENU_SETTINGS_CORE || menu_type == MENU_SETTINGS_DEFERRED_CORE)
{
if (type == RGUI_FILE_PLAIN)
if (type == MENU_FILE_PLAIN)
{
strlcpy(type_str, "(CORE)", sizeof(type_str));
file_list_get_alt_at_offset(driver.menu->selection_buf, i, &path);
@ -498,25 +498,25 @@ static void rgui_render(void)
else
{
strlcpy(type_str, "(DIR)", sizeof(type_str));
type = RGUI_FILE_DIRECTORY;
type = MENU_FILE_DIRECTORY;
w = 5;
}
}
else if (menu_type == RGUI_SETTINGS_CONFIG ||
else if (menu_type == MENU_SETTINGS_CONFIG ||
#ifdef HAVE_OVERLAY
menu_type == RGUI_SETTINGS_OVERLAY_PRESET ||
menu_type == MENU_SETTINGS_OVERLAY_PRESET ||
#endif
menu_type == RGUI_SETTINGS_VIDEO_SOFTFILTER ||
menu_type == RGUI_SETTINGS_AUDIO_DSP_FILTER ||
menu_type == RGUI_SETTINGS_DISK_APPEND ||
menu_type_is == RGUI_FILE_DIRECTORY)
menu_type == MENU_SETTINGS_VIDEO_SOFTFILTER ||
menu_type == MENU_SETTINGS_AUDIO_DSP_FILTER ||
menu_type == MENU_SETTINGS_DISK_APPEND ||
menu_type_is == MENU_FILE_DIRECTORY)
{
if (type == RGUI_FILE_PLAIN)
if (type == MENU_FILE_PLAIN)
{
strlcpy(type_str, "(FILE)", sizeof(type_str));
w = 6;
}
else if (type == RGUI_FILE_USE_DIRECTORY)
else if (type == MENU_FILE_USE_DIRECTORY)
{
*type_str = '\0';
w = 0;
@ -524,18 +524,18 @@ static void rgui_render(void)
else
{
strlcpy(type_str, "(DIR)", sizeof(type_str));
type = RGUI_FILE_DIRECTORY;
type = MENU_FILE_DIRECTORY;
w = 5;
}
}
else if (menu_type == RGUI_SETTINGS_OPEN_HISTORY)
else if (menu_type == MENU_SETTINGS_OPEN_HISTORY)
{
*type_str = '\0';
w = 0;
}
else if (type >= RGUI_SETTINGS_CORE_OPTION_START)
else if (type >= MENU_SETTINGS_CORE_OPTION_START)
strlcpy(type_str,
core_option_get_val(g_extern.system.core_options, type - RGUI_SETTINGS_CORE_OPTION_START),
core_option_get_val(g_extern.system.core_options, type - MENU_SETTINGS_CORE_OPTION_START),
sizeof(type_str));
else if (driver.menu_ctx && driver.menu_ctx->backend && driver.menu_ctx->backend->setting_set_label)
driver.menu_ctx->backend->setting_set_label(type_str, sizeof(type_str), &w, type);
@ -547,7 +547,7 @@ static void rgui_render(void)
strlcpy(entry_title_buf, path, sizeof(entry_title_buf));
strlcpy(type_str_buf, type_str, sizeof(type_str_buf));
if (type == RGUI_FILE_PLAIN || type == RGUI_FILE_DIRECTORY || type == RGUI_SETTINGS_CORE_INFO_NONE)
if (type == MENU_FILE_PLAIN || type == MENU_FILE_DIRECTORY || type == MENU_SETTINGS_CORE_INFO_NONE)
menu_ticker_line(entry_title_buf, RGUI_TERM_WIDTH - (w + 1 + 2), g_extern.frame_count / 15, path, selected);
else
menu_ticker_line(type_str_buf, w, g_extern.frame_count / 15, type_str, selected);

View File

@ -157,113 +157,113 @@ static void rmenu_render(void)
if (driver.menu_ctx && driver.menu_ctx->backend && driver.menu_ctx->backend->type_is)
menu_type_is = driver.menu_ctx->backend->type_is(menu_type);
if (menu_type == RGUI_SETTINGS_CORE)
if (menu_type == MENU_SETTINGS_CORE)
snprintf(title, sizeof(title), "CORE SELECTION %s", dir);
else if (menu_type == RGUI_SETTINGS_DEFERRED_CORE)
else if (menu_type == MENU_SETTINGS_DEFERRED_CORE)
snprintf(title, sizeof(title), "DETECTED CORES %s", dir);
else if (menu_type == RGUI_SETTINGS_CONFIG)
else if (menu_type == MENU_SETTINGS_CONFIG)
snprintf(title, sizeof(title), "CONFIG %s", dir);
else if (menu_type == RGUI_SETTINGS_DISK_APPEND)
else if (menu_type == MENU_SETTINGS_DISK_APPEND)
snprintf(title, sizeof(title), "DISK APPEND %s", dir);
else if (menu_type == RGUI_SETTINGS_VIDEO_OPTIONS)
else if (menu_type == MENU_SETTINGS_VIDEO_OPTIONS)
strlcpy(title, "VIDEO OPTIONS", sizeof(title));
else if (menu_type == RGUI_SETTINGS_DRIVERS)
else if (menu_type == MENU_SETTINGS_DRIVERS)
strlcpy(title, "DRIVER OPTIONS", sizeof(title));
else if (menu_type == RGUI_SETTINGS_PERFORMANCE_COUNTERS)
else if (menu_type == MENU_SETTINGS_PERFORMANCE_COUNTERS)
strlcpy(title, "PERFORMANCE COUNTERS", sizeof(title));
else if (menu_type == RGUI_SETTINGS_PERFORMANCE_COUNTERS_LIBRETRO)
else if (menu_type == MENU_SETTINGS_PERFORMANCE_COUNTERS_LIBRETRO)
strlcpy(title, "CORE PERFORMANCE COUNTERS", sizeof(title));
else if (menu_type == RGUI_SETTINGS_PERFORMANCE_COUNTERS_FRONTEND)
else if (menu_type == MENU_SETTINGS_PERFORMANCE_COUNTERS_FRONTEND)
strlcpy(title, "FRONTEND PERFORMANCE COUNTERS", sizeof(title));
#ifdef HAVE_SHADER_MANAGER
else if (menu_type == RGUI_SETTINGS_SHADER_OPTIONS)
else if (menu_type == MENU_SETTINGS_SHADER_OPTIONS)
strlcpy(title, "SHADER OPTIONS", sizeof(title));
else if (menu_type == RGUI_SETTINGS_SHADER_PARAMETERS)
else if (menu_type == MENU_SETTINGS_SHADER_PARAMETERS)
strlcpy(title, "SHADER PARAMETERS (CURRENT)", sizeof(title));
else if (menu_type == RGUI_SETTINGS_SHADER_PRESET_PARAMETERS)
else if (menu_type == MENU_SETTINGS_SHADER_PRESET_PARAMETERS)
strlcpy(title, "SHADER PARAMETERS (RGUI PRESET)", sizeof(title));
#endif
else if (menu_type == RGUI_SETTINGS_AUDIO_OPTIONS)
else if (menu_type == MENU_SETTINGS_AUDIO_OPTIONS)
strlcpy(title, "AUDIO OPTIONS", sizeof(title));
else if (menu_type == RGUI_SETTINGS_OVERLAY_OPTIONS)
else if (menu_type == MENU_SETTINGS_OVERLAY_OPTIONS)
strlcpy(title, "OVERLAY OPTIONS", sizeof(title));
else if (menu_type == RGUI_SETTINGS_NETPLAY_OPTIONS)
else if (menu_type == MENU_SETTINGS_NETPLAY_OPTIONS)
strlcpy(title, "NETPLAY OPTIONS", sizeof(title));
else if (menu_type == RGUI_SETTINGS_FONT_OPTIONS)
else if (menu_type == MENU_SETTINGS_FONT_OPTIONS)
strlcpy(title, "FONT OPTIONS", sizeof(title));
else if (menu_type == RGUI_SETTINGS_GENERAL_OPTIONS)
else if (menu_type == MENU_SETTINGS_GENERAL_OPTIONS)
strlcpy(title, "GENERAL OPTIONS", sizeof(title));
else if (menu_type == RGUI_SETTINGS_PATH_OPTIONS)
else if (menu_type == MENU_SETTINGS_PATH_OPTIONS)
strlcpy(title, "PATH OPTIONS", sizeof(title));
else if (menu_type == RGUI_SETTINGS_OPTIONS)
else if (menu_type == MENU_SETTINGS_OPTIONS)
strlcpy(title, "SETTINGS", sizeof(title));
else if (menu_type == RGUI_SETTINGS_INPUT_OPTIONS)
else if (menu_type == MENU_SETTINGS_INPUT_OPTIONS)
strlcpy(title, "INPUT OPTIONS", sizeof(title));
else if (menu_type == RGUI_SETTINGS_DISK_OPTIONS)
else if (menu_type == MENU_SETTINGS_DISK_OPTIONS)
strlcpy(title, "DISK OPTIONS", sizeof(title));
else if (menu_type == RGUI_SETTINGS_CORE_OPTIONS)
else if (menu_type == MENU_SETTINGS_CORE_OPTIONS)
strlcpy(title, "CORE OPTIONS", sizeof(title));
else if (menu_type == RGUI_SETTINGS_CORE_INFO)
else if (menu_type == MENU_SETTINGS_CORE_INFO)
strlcpy(title, "CORE INFO", sizeof(title));
else if (menu_type == RGUI_SETTINGS_PRIVACY_OPTIONS)
else if (menu_type == MENU_SETTINGS_PRIVACY_OPTIONS)
strlcpy(title, "PRIVACY OPTIONS", sizeof(title));
#ifdef HAVE_SHADER_MANAGER
else if (menu_type_is == RGUI_SETTINGS_SHADER_OPTIONS)
else if (menu_type_is == MENU_SETTINGS_SHADER_OPTIONS)
snprintf(title, sizeof(title), "SHADER %s", dir);
#endif
else if ((menu_type == RGUI_SETTINGS_INPUT_OPTIONS) ||
(menu_type == RGUI_SETTINGS_PATH_OPTIONS) ||
(menu_type == RGUI_SETTINGS_OPTIONS) ||
(menu_type == RGUI_SETTINGS_CUSTOM_VIEWPORT || menu_type == RGUI_SETTINGS_CUSTOM_VIEWPORT_2) ||
menu_type == RGUI_SETTINGS_CUSTOM_BIND ||
menu_type == RGUI_START_SCREEN ||
menu_type == RGUI_SETTINGS)
else if ((menu_type == MENU_SETTINGS_INPUT_OPTIONS) ||
(menu_type == MENU_SETTINGS_PATH_OPTIONS) ||
(menu_type == MENU_SETTINGS_OPTIONS) ||
(menu_type == MENU_SETTINGS_CUSTOM_VIEWPORT || menu_type == MENU_SETTINGS_CUSTOM_VIEWPORT_2) ||
menu_type == MENU_SETTINGS_CUSTOM_BIND ||
menu_type == MENU_START_SCREEN ||
menu_type == MENU_SETTINGS)
snprintf(title, sizeof(title), "MENU %s", dir);
else if (menu_type == RGUI_SETTINGS_OPEN_HISTORY)
else if (menu_type == MENU_SETTINGS_OPEN_HISTORY)
strlcpy(title, "LOAD HISTORY", sizeof(title));
else if (menu_type == RGUI_INFO_SCREEN)
else if (menu_type == MENU_INFO_SCREEN)
strlcpy(title, "INFO", sizeof(title));
#ifdef HAVE_OVERLAY
else if (menu_type == RGUI_SETTINGS_OVERLAY_PRESET)
else if (menu_type == MENU_SETTINGS_OVERLAY_PRESET)
snprintf(title, sizeof(title), "OVERLAY %s", dir);
#endif
else if (menu_type == RGUI_SETTINGS_VIDEO_SOFTFILTER)
else if (menu_type == MENU_SETTINGS_VIDEO_SOFTFILTER)
snprintf(title, sizeof(title), "FILTER %s", dir);
else if (menu_type == RGUI_SETTINGS_AUDIO_DSP_FILTER)
else if (menu_type == MENU_SETTINGS_AUDIO_DSP_FILTER)
snprintf(title, sizeof(title), "DSP FILTER %s", dir);
else if (menu_type == RGUI_BROWSER_DIR_PATH)
else if (menu_type == MENU_BROWSER_DIR_PATH)
snprintf(title, sizeof(title), "BROWSER DIR %s", dir);
else if (menu_type == RGUI_CONTENT_DIR_PATH)
else if (menu_type == MENU_CONTENT_DIR_PATH)
snprintf(title, sizeof(title), "CONTENT DIR %s", dir);
#ifdef HAVE_SCREENSHOTS
else if (menu_type == RGUI_SCREENSHOT_DIR_PATH)
else if (menu_type == MENU_SCREENSHOT_DIR_PATH)
snprintf(title, sizeof(title), "SCREENSHOT DIR %s", dir);
#endif
else if (menu_type == RGUI_AUTOCONFIG_DIR_PATH)
else if (menu_type == MENU_AUTOCONFIG_DIR_PATH)
snprintf(title, sizeof(title), "AUTOCONFIG DIR %s", dir);
else if (menu_type == RGUI_SHADER_DIR_PATH)
else if (menu_type == MENU_SHADER_DIR_PATH)
snprintf(title, sizeof(title), "SHADER DIR %s", dir);
else if (menu_type == RGUI_FILTER_DIR_PATH)
else if (menu_type == MENU_FILTER_DIR_PATH)
snprintf(title, sizeof(title), "FILTER DIR %s", dir);
else if (menu_type == RGUI_DSP_FILTER_DIR_PATH)
else if (menu_type == MENU_DSP_FILTER_DIR_PATH)
snprintf(title, sizeof(title), "DSP FILTER DIR %s", dir);
else if (menu_type == RGUI_SAVESTATE_DIR_PATH)
else if (menu_type == MENU_SAVESTATE_DIR_PATH)
snprintf(title, sizeof(title), "SAVESTATE DIR %s", dir);
#ifdef HAVE_DYNAMIC
else if (menu_type == RGUI_LIBRETRO_DIR_PATH)
else if (menu_type == MENU_LIBRETRO_DIR_PATH)
snprintf(title, sizeof(title), "LIBRETRO DIR %s", dir);
#endif
else if (menu_type == RGUI_CONFIG_DIR_PATH)
else if (menu_type == MENU_CONFIG_DIR_PATH)
snprintf(title, sizeof(title), "CONFIG DIR %s", dir);
else if (menu_type == RGUI_SAVEFILE_DIR_PATH)
else if (menu_type == MENU_SAVEFILE_DIR_PATH)
snprintf(title, sizeof(title), "SAVEFILE DIR %s", dir);
#ifdef HAVE_OVERLAY
else if (menu_type == RGUI_OVERLAY_DIR_PATH)
else if (menu_type == MENU_OVERLAY_DIR_PATH)
snprintf(title, sizeof(title), "OVERLAY DIR %s", dir);
#endif
else if (menu_type == RGUI_SYSTEM_DIR_PATH)
else if (menu_type == MENU_SYSTEM_DIR_PATH)
snprintf(title, sizeof(title), "SYSTEM DIR %s", dir);
else if (menu_type == RGUI_ASSETS_DIR_PATH)
else if (menu_type == MENU_ASSETS_DIR_PATH)
snprintf(title, sizeof(title), "ASSETS DIR %s", dir);
else
{
@ -327,31 +327,31 @@ static void rmenu_render(void)
char type_str[256];
unsigned w = 19;
if (menu_type == RGUI_SETTINGS_INPUT_OPTIONS || menu_type == RGUI_SETTINGS_CUSTOM_BIND)
if (menu_type == MENU_SETTINGS_INPUT_OPTIONS || menu_type == MENU_SETTINGS_CUSTOM_BIND)
w = 21;
else if (menu_type == RGUI_SETTINGS_PATH_OPTIONS)
else if (menu_type == MENU_SETTINGS_PATH_OPTIONS)
w = 24;
#ifdef HAVE_SHADER_MANAGER
if (type >= RGUI_SETTINGS_SHADER_FILTER &&
type <= RGUI_SETTINGS_SHADER_LAST)
if (type >= MENU_SETTINGS_SHADER_FILTER &&
type <= MENU_SETTINGS_SHADER_LAST)
{
// HACK. Work around that we're using the menu_type as dir type to propagate state correctly.
if ((menu_type_is == RGUI_SETTINGS_SHADER_OPTIONS)
&& (menu_type_is == RGUI_SETTINGS_SHADER_OPTIONS))
if ((menu_type_is == MENU_SETTINGS_SHADER_OPTIONS)
&& (menu_type_is == MENU_SETTINGS_SHADER_OPTIONS))
{
type = RGUI_FILE_DIRECTORY;
type = MENU_FILE_DIRECTORY;
strlcpy(type_str, "(DIR)", sizeof(type_str));
w = 5;
}
else if (type == RGUI_SETTINGS_SHADER_OPTIONS || type == RGUI_SETTINGS_SHADER_PRESET || type == RGUI_SETTINGS_SHADER_PARAMETERS || type == RGUI_SETTINGS_SHADER_PRESET_PARAMETERS)
else if (type == MENU_SETTINGS_SHADER_OPTIONS || type == MENU_SETTINGS_SHADER_PRESET || type == MENU_SETTINGS_SHADER_PARAMETERS || type == MENU_SETTINGS_SHADER_PRESET_PARAMETERS)
strlcpy(type_str, "...", sizeof(type_str));
else if (type == RGUI_SETTINGS_SHADER_FILTER)
else if (type == MENU_SETTINGS_SHADER_FILTER)
snprintf(type_str, sizeof(type_str), "%s",
g_settings.video.smooth ? "Linear" : "Nearest");
else if (driver.menu_ctx && driver.menu_ctx->backend && driver.menu_ctx->backend->shader_manager_get_str)
{
if (type >= RGUI_SETTINGS_SHADER_PARAMETER_0 && type <= RGUI_SETTINGS_SHADER_PARAMETER_LAST)
if (type >= MENU_SETTINGS_SHADER_PARAMETER_0 && type <= MENU_SETTINGS_SHADER_PARAMETER_LAST)
driver.menu_ctx->backend->shader_manager_get_str(rgui->parameter_shader, type_str, sizeof(type_str), type);
else
driver.menu_ctx->backend->shader_manager_get_str(rgui->shader, type_str, sizeof(type_str), type);
@ -360,9 +360,9 @@ static void rmenu_render(void)
else
#endif
// Pretty-print libretro cores from menu.
if (menu_type == RGUI_SETTINGS_CORE || menu_type == RGUI_SETTINGS_DEFERRED_CORE)
if (menu_type == MENU_SETTINGS_CORE || menu_type == MENU_SETTINGS_DEFERRED_CORE)
{
if (type == RGUI_FILE_PLAIN)
if (type == MENU_FILE_PLAIN)
{
strlcpy(type_str, "(CORE)", sizeof(type_str));
file_list_get_alt_at_offset(rgui->selection_buf, i, &path);
@ -371,25 +371,25 @@ static void rmenu_render(void)
else
{
strlcpy(type_str, "(DIR)", sizeof(type_str));
type = RGUI_FILE_DIRECTORY;
type = MENU_FILE_DIRECTORY;
w = 5;
}
}
else if (menu_type == RGUI_SETTINGS_CONFIG ||
else if (menu_type == MENU_SETTINGS_CONFIG ||
#ifdef HAVE_OVERLAY
menu_type == RGUI_SETTINGS_OVERLAY_PRESET ||
menu_type == MENU_SETTINGS_OVERLAY_PRESET ||
#endif
menu_type == RGUI_SETTINGS_VIDEO_SOFTFILTER ||
menu_type == RGUI_SETTINGS_AUDIO_DSP_FILTER ||
menu_type == RGUI_SETTINGS_DISK_APPEND ||
menu_type_is == RGUI_FILE_DIRECTORY)
menu_type == MENU_SETTINGS_VIDEO_SOFTFILTER ||
menu_type == MENU_SETTINGS_AUDIO_DSP_FILTER ||
menu_type == MENU_SETTINGS_DISK_APPEND ||
menu_type_is == MENU_FILE_DIRECTORY)
{
if (type == RGUI_FILE_PLAIN)
if (type == MENU_FILE_PLAIN)
{
strlcpy(type_str, "(FILE)", sizeof(type_str));
w = 6;
}
else if (type == RGUI_FILE_USE_DIRECTORY)
else if (type == MENU_FILE_USE_DIRECTORY)
{
*type_str = '\0';
w = 0;
@ -397,18 +397,18 @@ static void rmenu_render(void)
else
{
strlcpy(type_str, "(DIR)", sizeof(type_str));
type = RGUI_FILE_DIRECTORY;
type = MENU_FILE_DIRECTORY;
w = 5;
}
}
else if (menu_type == RGUI_SETTINGS_OPEN_HISTORY)
else if (menu_type == MENU_SETTINGS_OPEN_HISTORY)
{
*type_str = '\0';
w = 0;
}
else if (type >= RGUI_SETTINGS_CORE_OPTION_START)
else if (type >= MENU_SETTINGS_CORE_OPTION_START)
strlcpy(type_str,
core_option_get_val(g_extern.system.core_options, type - RGUI_SETTINGS_CORE_OPTION_START),
core_option_get_val(g_extern.system.core_options, type - MENU_SETTINGS_CORE_OPTION_START),
sizeof(type_str));
else if (driver.menu_ctx && driver.menu_ctx->backend && driver.menu_ctx->backend->setting_set_label)
driver.menu_ctx->backend->setting_set_label(type_str, sizeof(type_str), &w, type);
@ -420,7 +420,7 @@ static void rmenu_render(void)
strlcpy(entry_title_buf, path, sizeof(entry_title_buf));
strlcpy(type_str_buf, type_str, sizeof(type_str_buf));
if ((type == RGUI_FILE_PLAIN || type == RGUI_FILE_DIRECTORY))
if ((type == MENU_FILE_PLAIN || type == MENU_FILE_DIRECTORY))
menu_ticker_line(entry_title_buf, RMENU_TERM_WIDTH - (w + 1 + 2), g_extern.frame_count / 15, path, selected);
else
menu_ticker_line(type_str_buf, w, g_extern.frame_count / 15, type_str, selected);

View File

@ -395,109 +395,109 @@ static void rmenu_xui_render(void)
if (driver.menu_ctx && driver.menu_ctx->backend && driver.menu_ctx->backend->type_is)
menu_type_is = driver.menu_ctx->backend->type_is(menu_type);
if (menu_type == RGUI_SETTINGS_CORE)
if (menu_type == MENU_SETTINGS_CORE)
snprintf(title, sizeof(title), "CORE SELECTION %s", dir);
else if (menu_type == RGUI_SETTINGS_DEFERRED_CORE)
else if (menu_type == MENU_SETTINGS_DEFERRED_CORE)
snprintf(title, sizeof(title), "DETECTED CORES %s", dir);
else if (menu_type == RGUI_SETTINGS_CONFIG)
else if (menu_type == MENU_SETTINGS_CONFIG)
snprintf(title, sizeof(title), "CONFIG %s", dir);
else if (menu_type == RGUI_SETTINGS_DISK_APPEND)
else if (menu_type == MENU_SETTINGS_DISK_APPEND)
snprintf(title, sizeof(title), "DISK APPEND %s", dir);
else if (menu_type == RGUI_SETTINGS_VIDEO_OPTIONS)
else if (menu_type == MENU_SETTINGS_VIDEO_OPTIONS)
strlcpy(title, "VIDEO OPTIONS", sizeof(title));
else if (menu_type == RGUI_SETTINGS_INPUT_OPTIONS)
else if (menu_type == MENU_SETTINGS_INPUT_OPTIONS)
strlcpy(title, "INPUT OPTIONS", sizeof(title));
else if (menu_type == RGUI_SETTINGS_OVERLAY_OPTIONS)
else if (menu_type == MENU_SETTINGS_OVERLAY_OPTIONS)
strlcpy(title, "OVERLAY OPTIONS", sizeof(title));
else if (menu_type == RGUI_SETTINGS_NETPLAY_OPTIONS)
else if (menu_type == MENU_SETTINGS_NETPLAY_OPTIONS)
strlcpy(title, "NETPLAY OPTIONS", sizeof(title));
else if (menu_type == RGUI_SETTINGS_PATH_OPTIONS)
else if (menu_type == MENU_SETTINGS_PATH_OPTIONS)
strlcpy(title, "PATH OPTIONS", sizeof(title));
else if (menu_type == RGUI_SETTINGS_OPTIONS)
else if (menu_type == MENU_SETTINGS_OPTIONS)
strlcpy(title, "SETTINGS", sizeof(title));
else if (menu_type == RGUI_SETTINGS_DRIVERS)
else if (menu_type == MENU_SETTINGS_DRIVERS)
strlcpy(title, "DRIVER OPTIONS", sizeof(title));
else if (menu_type == RGUI_SETTINGS_PERFORMANCE_COUNTERS)
else if (menu_type == MENU_SETTINGS_PERFORMANCE_COUNTERS)
strlcpy(title, "PERFORMANCE COUNTERS", sizeof(title));
else if (menu_type == RGUI_SETTINGS_PERFORMANCE_COUNTERS_LIBRETRO)
else if (menu_type == MENU_SETTINGS_PERFORMANCE_COUNTERS_LIBRETRO)
strlcpy(title, "CORE PERFORMANCE COUNTERS", sizeof(title));
else if (menu_type == RGUI_SETTINGS_PERFORMANCE_COUNTERS_FRONTEND)
else if (menu_type == MENU_SETTINGS_PERFORMANCE_COUNTERS_FRONTEND)
strlcpy(title, "FRONTEND PERFORMANCE COUNTERS", sizeof(title));
#ifdef HAVE_SHADER_MANAGER
else if (menu_type == RGUI_SETTINGS_SHADER_OPTIONS)
else if (menu_type == MENU_SETTINGS_SHADER_OPTIONS)
strlcpy(title, "SHADER OPTIONS", sizeof(title));
#endif
else if (menu_type == RGUI_SETTINGS_FONT_OPTIONS)
else if (menu_type == MENU_SETTINGS_FONT_OPTIONS)
strlcpy(title, "FONT OPTIONS", sizeof(title));
else if (menu_type == RGUI_SETTINGS_GENERAL_OPTIONS)
else if (menu_type == MENU_SETTINGS_GENERAL_OPTIONS)
strlcpy(title, "GENERAL OPTIONS", sizeof(title));
else if (menu_type == RGUI_SETTINGS_AUDIO_OPTIONS)
else if (menu_type == MENU_SETTINGS_AUDIO_OPTIONS)
strlcpy(title, "AUDIO OPTIONS", sizeof(title));
else if (menu_type == RGUI_SETTINGS_DISK_OPTIONS)
else if (menu_type == MENU_SETTINGS_DISK_OPTIONS)
strlcpy(title, "DISK OPTIONS", sizeof(title));
else if (menu_type == RGUI_SETTINGS_CORE_OPTIONS)
else if (menu_type == MENU_SETTINGS_CORE_OPTIONS)
strlcpy(title, "CORE OPTIONS", sizeof(title));
else if (menu_type == RGUI_SETTINGS_CORE_INFO)
else if (menu_type == MENU_SETTINGS_CORE_INFO)
strlcpy(title, "CORE INFO", sizeof(title));
else if (menu_type == RGUI_SETTINGS_PRIVACY_OPTIONS)
else if (menu_type == MENU_SETTINGS_PRIVACY_OPTIONS)
strlcpy(title, "PRIVACY OPTIONS", sizeof(title));
#ifdef HAVE_SHADER_MANAGER
else if (menu_type_is == RGUI_SETTINGS_SHADER_OPTIONS)
else if (menu_type_is == MENU_SETTINGS_SHADER_OPTIONS)
snprintf(title, sizeof(title), "SHADER %s", dir);
#endif
else if ((menu_type == RGUI_SETTINGS_INPUT_OPTIONS) ||
(menu_type == RGUI_SETTINGS_PATH_OPTIONS) ||
(menu_type == RGUI_SETTINGS_OPTIONS) ||
(menu_type == RGUI_SETTINGS_CUSTOM_VIEWPORT || menu_type == RGUI_SETTINGS_CUSTOM_VIEWPORT_2) ||
menu_type == RGUI_SETTINGS_CUSTOM_BIND ||
menu_type == RGUI_START_SCREEN ||
menu_type == RGUI_SETTINGS)
else if ((menu_type == MENU_SETTINGS_INPUT_OPTIONS) ||
(menu_type == MENU_SETTINGS_PATH_OPTIONS) ||
(menu_type == MENU_SETTINGS_OPTIONS) ||
(menu_type == MENU_SETTINGS_CUSTOM_VIEWPORT || menu_type == MENU_SETTINGS_CUSTOM_VIEWPORT_2) ||
menu_type == MENU_SETTINGS_CUSTOM_BIND ||
menu_type == MENU_START_SCREEN ||
menu_type == MENU_SETTINGS)
snprintf(title, sizeof(title), "MENU %s", dir);
else if (menu_type == RGUI_SETTINGS_OPEN_HISTORY)
else if (menu_type == MENU_SETTINGS_OPEN_HISTORY)
strlcpy(title, "LOAD HISTORY", sizeof(title));
else if (menu_type == RGUI_INFO_SCREEN)
else if (menu_type == MENU_INFO_SCREEN)
strlcpy(title, "INFO", sizeof(title));
#ifdef HAVE_OVERLAY
else if (menu_type == RGUI_SETTINGS_OVERLAY_PRESET)
else if (menu_type == MENU_SETTINGS_OVERLAY_PRESET)
snprintf(title, sizeof(title), "OVERLAY %s", dir);
#endif
else if (menu_type == RGUI_SETTINGS_VIDEO_SOFTFILTER)
else if (menu_type == MENU_SETTINGS_VIDEO_SOFTFILTER)
snprintf(title, sizeof(title), "FILTER %s", dir);
else if (menu_type == RGUI_SETTINGS_AUDIO_DSP_FILTER)
else if (menu_type == MENU_SETTINGS_AUDIO_DSP_FILTER)
snprintf(title, sizeof(title), "DSP FILTER %s", dir);
else if (menu_type == RGUI_BROWSER_DIR_PATH)
else if (menu_type == MENU_BROWSER_DIR_PATH)
snprintf(title, sizeof(title), "BROWSER DIR %s", dir);
else if (menu_type == RGUI_CONTENT_DIR_PATH)
else if (menu_type == MENU_CONTENT_DIR_PATH)
snprintf(title, sizeof(title), "CONTENT DIR %s", dir);
#ifdef HAVE_SCREENSHOTS
else if (menu_type == RGUI_SCREENSHOT_DIR_PATH)
else if (menu_type == MENU_SCREENSHOT_DIR_PATH)
snprintf(title, sizeof(title), "SCREENSHOT DIR %s", dir);
#endif
else if (menu_type == RGUI_AUTOCONFIG_DIR_PATH)
else if (menu_type == MENU_AUTOCONFIG_DIR_PATH)
snprintf(title, sizeof(title), "AUTOCONFIG DIR %s", dir);
else if (menu_type == RGUI_SHADER_DIR_PATH)
else if (menu_type == MENU_SHADER_DIR_PATH)
snprintf(title, sizeof(title), "SHADER DIR %s", dir);
else if (menu_type == RGUI_FILTER_DIR_PATH)
else if (menu_type == MENU_FILTER_DIR_PATH)
snprintf(title, sizeof(title), "FILTER DIR %s", dir);
else if (menu_type == RGUI_DSP_FILTER_DIR_PATH)
else if (menu_type == MENU_DSP_FILTER_DIR_PATH)
snprintf(title, sizeof(title), "DSP_FILTER DIR %s", dir);
else if (menu_type == RGUI_SAVESTATE_DIR_PATH)
else if (menu_type == MENU_SAVESTATE_DIR_PATH)
snprintf(title, sizeof(title), "SAVESTATE DIR %s", dir);
#ifdef HAVE_DYNAMIC
else if (menu_type == RGUI_LIBRETRO_DIR_PATH)
else if (menu_type == MENU_LIBRETRO_DIR_PATH)
snprintf(title, sizeof(title), "LIBRETRO DIR %s", dir);
#endif
else if (menu_type == RGUI_CONFIG_DIR_PATH)
else if (menu_type == MENU_CONFIG_DIR_PATH)
snprintf(title, sizeof(title), "CONFIG DIR %s", dir);
else if (menu_type == RGUI_SAVEFILE_DIR_PATH)
else if (menu_type == MENU_SAVEFILE_DIR_PATH)
snprintf(title, sizeof(title), "SAVEFILE DIR %s", dir);
#ifdef HAVE_OVERLAY
else if (menu_type == RGUI_OVERLAY_DIR_PATH)
else if (menu_type == MENU_OVERLAY_DIR_PATH)
snprintf(title, sizeof(title), "OVERLAY DIR %s", dir);
#endif
else if (menu_type == RGUI_SYSTEM_DIR_PATH)
else if (menu_type == MENU_SYSTEM_DIR_PATH)
snprintf(title, sizeof(title), "SYSTEM DIR %s", dir);
else if (menu_type == RGUI_ASSETS_DIR_PATH)
else if (menu_type == MENU_ASSETS_DIR_PATH)
snprintf(title, sizeof(title), "ASSETS DIR %s", dir);
else
{
@ -552,25 +552,25 @@ static void rmenu_xui_render(void)
char type_str[256];
unsigned w = 19;
if (menu_type == RGUI_SETTINGS_INPUT_OPTIONS || menu_type == RGUI_SETTINGS_CUSTOM_BIND)
if (menu_type == MENU_SETTINGS_INPUT_OPTIONS || menu_type == MENU_SETTINGS_CUSTOM_BIND)
w = 21;
else if (menu_type == RGUI_SETTINGS_PATH_OPTIONS)
else if (menu_type == MENU_SETTINGS_PATH_OPTIONS)
w = 24;
if (type >= RGUI_SETTINGS_SHADER_FILTER &&
type <= RGUI_SETTINGS_SHADER_LAST)
if (type >= MENU_SETTINGS_SHADER_FILTER &&
type <= MENU_SETTINGS_SHADER_LAST)
{
// HACK. Work around that we're using the menu_type as dir type to propagate state correctly.
if ((menu_type_is == RGUI_SETTINGS_SHADER_OPTIONS)
&& (menu_type_is == RGUI_SETTINGS_SHADER_OPTIONS))
if ((menu_type_is == MENU_SETTINGS_SHADER_OPTIONS)
&& (menu_type_is == MENU_SETTINGS_SHADER_OPTIONS))
{
type = RGUI_FILE_DIRECTORY;
type = MENU_FILE_DIRECTORY;
strlcpy(type_str, "(DIR)", sizeof(type_str));
w = 5;
}
else if (type == RGUI_SETTINGS_SHADER_OPTIONS || type == RGUI_SETTINGS_SHADER_PRESET)
else if (type == MENU_SETTINGS_SHADER_OPTIONS || type == MENU_SETTINGS_SHADER_PRESET)
strlcpy(type_str, "...", sizeof(type_str));
else if (type == RGUI_SETTINGS_SHADER_FILTER)
else if (type == MENU_SETTINGS_SHADER_FILTER)
snprintf(type_str, sizeof(type_str), "%s",
g_settings.video.smooth ? "Linear" : "Nearest");
else if (driver.menu_ctx && driver.menu_ctx->backend && driver.menu_ctx->backend->shader_manager_get_str)
@ -578,9 +578,9 @@ static void rmenu_xui_render(void)
}
else
// Pretty-print libretro cores from menu.
if (menu_type == RGUI_SETTINGS_CORE || menu_type == RGUI_SETTINGS_DEFERRED_CORE)
if (menu_type == MENU_SETTINGS_CORE || menu_type == MENU_SETTINGS_DEFERRED_CORE)
{
if (type == RGUI_FILE_PLAIN)
if (type == MENU_FILE_PLAIN)
{
strlcpy(type_str, "(CORE)", sizeof(type_str));
file_list_get_alt_at_offset(driver.menu->selection_buf, i, &path);
@ -589,25 +589,25 @@ static void rmenu_xui_render(void)
else
{
strlcpy(type_str, "(DIR)", sizeof(type_str));
type = RGUI_FILE_DIRECTORY;
type = MENU_FILE_DIRECTORY;
w = 5;
}
}
else if (menu_type == RGUI_SETTINGS_CONFIG ||
else if (menu_type == MENU_SETTINGS_CONFIG ||
#ifdef HAVE_OVERLAY
menu_type == RGUI_SETTINGS_OVERLAY_PRESET ||
menu_type == MENU_SETTINGS_OVERLAY_PRESET ||
#endif
menu_type == RGUI_SETTINGS_VIDEO_SOFTFILTER ||
menu_type == RGUI_SETTINGS_AUDIO_DSP_FILTER ||
menu_type == RGUI_SETTINGS_DISK_APPEND ||
menu_type_is == RGUI_FILE_DIRECTORY)
menu_type == MENU_SETTINGS_VIDEO_SOFTFILTER ||
menu_type == MENU_SETTINGS_AUDIO_DSP_FILTER ||
menu_type == MENU_SETTINGS_DISK_APPEND ||
menu_type_is == MENU_FILE_DIRECTORY)
{
if (type == RGUI_FILE_PLAIN)
if (type == MENU_FILE_PLAIN)
{
strlcpy(type_str, "(FILE)", sizeof(type_str));
w = 6;
}
else if (type == RGUI_FILE_USE_DIRECTORY)
else if (type == MENU_FILE_USE_DIRECTORY)
{
*type_str = '\0';
w = 0;
@ -615,18 +615,18 @@ static void rmenu_xui_render(void)
else
{
strlcpy(type_str, "(DIR)", sizeof(type_str));
type = RGUI_FILE_DIRECTORY;
type = MENU_FILE_DIRECTORY;
w = 5;
}
}
else if (menu_type == RGUI_SETTINGS_OPEN_HISTORY)
else if (menu_type == MENU_SETTINGS_OPEN_HISTORY)
{
*type_str = '\0';
w = 0;
}
else if (type >= RGUI_SETTINGS_CORE_OPTION_START)
else if (type >= MENU_SETTINGS_CORE_OPTION_START)
strlcpy(type_str,
core_option_get_val(g_extern.system.core_options, type - RGUI_SETTINGS_CORE_OPTION_START),
core_option_get_val(g_extern.system.core_options, type - MENU_SETTINGS_CORE_OPTION_START),
sizeof(type_str));
else if (driver.menu_ctx && driver.menu_ctx->backend && driver.menu_ctx->backend->setting_set_label)
driver.menu_ctx->backend->setting_set_label(type_str, sizeof(type_str), &w, type);
@ -639,7 +639,7 @@ static void rmenu_xui_render(void)
strlcpy(type_str_buf, type_str, sizeof(type_str_buf));
#if 0
if ((type == RGUI_FILE_PLAIN || type == RGUI_FILE_DIRECTORY))
if ((type == MENU_FILE_PLAIN || type == MENU_FILE_DIRECTORY))
menu_ticker_line(entry_title_buf, RXUI_TERM_WIDTH - (w + 1 + 2), g_extern.frame_count / 15, path, selected);
else
menu_ticker_line(type_str_buf, w, g_extern.frame_count / 15, type_str, selected);

View File

@ -14,8 +14,8 @@
* If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef RGUI_LIST_H__
#define RGUI_LIST_H__
#ifndef MENU_LIST_H__
#define MENU_LIST_H__
#ifdef __cplusplus
extern "C" {

View File

@ -135,13 +135,13 @@ void load_menu_game_prepare(void)
driver.menu->info.library_name ? driver.menu->info.library_name : "");
}
// redraw RGUI frame
// redraw menu frame
driver.menu->old_input_state = driver.menu->trigger_state = 0;
driver.menu->do_held = false;
driver.menu->msg_force = true;
if (driver.menu_ctx && driver.menu_ctx->backend && driver.menu_ctx->backend->iterate)
driver.menu_ctx->backend->iterate(RGUI_ACTION_NOOP);
driver.menu_ctx->backend->iterate(MENU_ACTION_NOOP);
// Draw frame for loading message
if (driver.video_data && driver.video_poke && driver.video_poke->set_texture_enable)
@ -207,7 +207,7 @@ static void menu_init_history(void *data)
".retroarch-game-history.txt", sizeof(history_path));
}
RARCH_LOG("[RGUI]: Opening history: %s.\n", history_path);
RARCH_LOG("[Menu]: Opening history: %s.\n", history_path);
rgui->history = rom_history_init(history_path, g_settings.game_history_size);
}
}
@ -325,13 +325,13 @@ void *menu_init(const void *data)
#ifdef HAVE_SHADER_MANAGER
rgui->shader = (struct gfx_shader*)calloc(1, sizeof(struct gfx_shader));
#endif
file_list_push(rgui->menu_stack, "", RGUI_SETTINGS, 0);
file_list_push(rgui->menu_stack, "", MENU_SETTINGS, 0);
menu_clear_navigation(rgui);
rgui->push_start_screen = g_settings.rgui_show_start_screen;
g_settings.rgui_show_start_screen = false;
if (menu_ctx && menu_ctx->backend && menu_ctx->backend->entries_init)
menu_ctx->backend->entries_init(rgui, RGUI_SETTINGS);
menu_ctx->backend->entries_init(rgui, MENU_SETTINGS);
rgui->trigger_state = 0;
rgui->old_input_state = 0;
@ -520,29 +520,29 @@ bool menu_iterate(void)
if (driver.block_input)
driver.menu->trigger_state = 0;
action = RGUI_ACTION_NOOP;
action = MENU_ACTION_NOOP;
// don't run anything first frame, only capture held inputs for old_input_state
if (driver.menu->trigger_state & (1ULL << RETRO_DEVICE_ID_JOYPAD_UP))
action = RGUI_ACTION_UP;
action = MENU_ACTION_UP;
else if (driver.menu->trigger_state & (1ULL << RETRO_DEVICE_ID_JOYPAD_DOWN))
action = RGUI_ACTION_DOWN;
action = MENU_ACTION_DOWN;
else if (driver.menu->trigger_state & (1ULL << RETRO_DEVICE_ID_JOYPAD_LEFT))
action = RGUI_ACTION_LEFT;
action = MENU_ACTION_LEFT;
else if (driver.menu->trigger_state & (1ULL << RETRO_DEVICE_ID_JOYPAD_RIGHT))
action = RGUI_ACTION_RIGHT;
action = MENU_ACTION_RIGHT;
else if (driver.menu->trigger_state & (1ULL << RETRO_DEVICE_ID_JOYPAD_L))
action = RGUI_ACTION_SCROLL_UP;
action = MENU_ACTION_SCROLL_UP;
else if (driver.menu->trigger_state & (1ULL << RETRO_DEVICE_ID_JOYPAD_R))
action = RGUI_ACTION_SCROLL_DOWN;
action = MENU_ACTION_SCROLL_DOWN;
else if (driver.menu->trigger_state & (1ULL << RETRO_DEVICE_ID_JOYPAD_B))
action = RGUI_ACTION_CANCEL;
action = MENU_ACTION_CANCEL;
else if (driver.menu->trigger_state & (1ULL << RETRO_DEVICE_ID_JOYPAD_A))
action = RGUI_ACTION_OK;
action = MENU_ACTION_OK;
else if (driver.menu->trigger_state & (1ULL << RETRO_DEVICE_ID_JOYPAD_START))
action = RGUI_ACTION_START;
action = MENU_ACTION_START;
else if (driver.menu->trigger_state & (1ULL << RETRO_DEVICE_ID_JOYPAD_SELECT))
action = RGUI_ACTION_SELECT;
action = MENU_ACTION_SELECT;
if (driver.menu_ctx && driver.menu_ctx->backend && driver.menu_ctx->backend->iterate)
input_entry_ret = driver.menu_ctx->backend->iterate(action);
@ -573,7 +573,7 @@ bool menu_iterate(void)
{
unsigned type = 0;
file_list_get_last(driver.menu->menu_stack, NULL, &type);
while (type != RGUI_SETTINGS)
while (type != MENU_SETTINGS)
{
file_list_pop(driver.menu->menu_stack, &driver.menu->selection_ptr);
file_list_get_last(driver.menu->menu_stack, NULL, &type);
@ -710,7 +710,7 @@ static inline bool menu_list_elem_is_dir(file_list_t *buf, unsigned offset)
const char *path = NULL;
unsigned type = 0;
file_list_get_at_offset(buf, offset, &path, &type);
return type != RGUI_FILE_PLAIN;
return type != MENU_FILE_PLAIN;
}
void menu_build_scroll_indices(void *data)

View File

@ -51,12 +51,12 @@
#define GFX_MAX_SHADERS 16
#endif
#define RGUI_SETTINGS_CORE_INFO_NONE 0xffff
#define RGUI_SETTINGS_CORE_OPTION_NONE 0xffff
#define RGUI_SETTINGS_CORE_OPTION_START 0x10000
#define MENU_SETTINGS_CORE_INFO_NONE 0xffff
#define MENU_SETTINGS_CORE_OPTION_NONE 0xffff
#define MENU_SETTINGS_CORE_OPTION_START 0x10000
#define RGUI_KEYBOARD_BIND_TIMEOUT_SECONDS 5
#define MENU_KEYBOARD_BIND_TIMEOUT_SECONDS 5
#ifdef __cplusplus
extern "C" {
@ -64,32 +64,32 @@ extern "C" {
typedef enum
{
RGUI_FILE_PLAIN,
RGUI_FILE_DIRECTORY,
RGUI_FILE_DEVICE,
RGUI_FILE_USE_DIRECTORY,
RGUI_SETTINGS,
RGUI_INFO_SCREEN,
RGUI_START_SCREEN,
MENU_FILE_PLAIN,
MENU_FILE_DIRECTORY,
MENU_FILE_DEVICE,
MENU_FILE_USE_DIRECTORY,
MENU_SETTINGS,
MENU_INFO_SCREEN,
MENU_START_SCREEN,
} rgui_file_type_t;
typedef enum
{
RGUI_ACTION_UP,
RGUI_ACTION_DOWN,
RGUI_ACTION_LEFT,
RGUI_ACTION_RIGHT,
RGUI_ACTION_OK,
RGUI_ACTION_CANCEL,
RGUI_ACTION_REFRESH,
RGUI_ACTION_SELECT,
RGUI_ACTION_START,
RGUI_ACTION_MESSAGE,
RGUI_ACTION_SCROLL_DOWN,
RGUI_ACTION_SCROLL_UP,
RGUI_ACTION_MAPPING_PREVIOUS,
RGUI_ACTION_MAPPING_NEXT,
RGUI_ACTION_NOOP
MENU_ACTION_UP,
MENU_ACTION_DOWN,
MENU_ACTION_LEFT,
MENU_ACTION_RIGHT,
MENU_ACTION_OK,
MENU_ACTION_CANCEL,
MENU_ACTION_REFRESH,
MENU_ACTION_SELECT,
MENU_ACTION_START,
MENU_ACTION_MESSAGE,
MENU_ACTION_SCROLL_DOWN,
MENU_ACTION_SCROLL_UP,
MENU_ACTION_MAPPING_PREVIOUS,
MENU_ACTION_MAPPING_NEXT,
MENU_ACTION_NOOP
} rgui_action_t;
void menu_poll_bind_get_rested_axes(void *data);

View File

@ -166,11 +166,11 @@ void menu_poll_bind_state(void *data)
input_joypad_poll(joypad);
for (i = 0; i < MAX_PLAYERS; i++)
{
for (b = 0; b < RGUI_MAX_BUTTONS; b++)
for (b = 0; b < MENU_MAX_BUTTONS; b++)
state->state[i].buttons[b] = input_joypad_button_raw(joypad, i, b);
for (a = 0; a < RGUI_MAX_AXES; a++)
for (a = 0; a < MENU_MAX_AXES; a++)
state->state[i].axes[a] = input_joypad_axis_raw(joypad, i, a);
for (h = 0; h < RGUI_MAX_HATS; h++)
for (h = 0; h < MENU_MAX_HATS; h++)
{
state->state[i].hats[h] |= input_joypad_hat_raw(joypad, i, HAT_UP_MASK, h) ? HAT_UP_MASK : 0;
state->state[i].hats[h] |= input_joypad_hat_raw(joypad, i, HAT_DOWN_MASK, h) ? HAT_DOWN_MASK : 0;
@ -199,7 +199,7 @@ void menu_poll_bind_get_rested_axes(void *data)
}
for (i = 0; i < MAX_PLAYERS; i++)
for (a = 0; a < RGUI_MAX_AXES; a++)
for (a = 0; a < MENU_MAX_AXES; a++)
state->axis_state[i].rested_axes[a] = input_joypad_axis_raw(joypad, i, a);
}
@ -209,7 +209,7 @@ static bool menu_poll_find_trigger_pad(struct rgui_bind_state *state, struct rgu
const struct rgui_bind_state_port *n = (const struct rgui_bind_state_port*)&new_state->state[p];
const struct rgui_bind_state_port *o = (const struct rgui_bind_state_port*)&state->state[p];
for (b = 0; b < RGUI_MAX_BUTTONS; b++)
for (b = 0; b < MENU_MAX_BUTTONS; b++)
{
if (n->buttons[b] && !o->buttons[b])
{
@ -220,7 +220,7 @@ static bool menu_poll_find_trigger_pad(struct rgui_bind_state *state, struct rgu
}
// Axes are a bit tricky ...
for (a = 0; a < RGUI_MAX_AXES; a++)
for (a = 0; a < MENU_MAX_AXES; a++)
{
int locked_distance = abs(n->axes[a] - new_state->axis_state[p].locked_axes[a]);
int rested_distance = abs(n->axes[a] - new_state->axis_state[p].rested_axes[a]);
@ -241,7 +241,7 @@ static bool menu_poll_find_trigger_pad(struct rgui_bind_state *state, struct rgu
new_state->axis_state[p].locked_axes[a] = 0;
}
for (h = 0; h < RGUI_MAX_HATS; h++)
for (h = 0; h < MENU_MAX_HATS; h++)
{
uint16_t trigged = n->hats[h] & (~o->hats[h]);
uint16_t sane_trigger = 0;
@ -296,7 +296,7 @@ bool menu_custom_bind_keyboard_cb(void *data, unsigned code)
rgui->binds.target->key = (enum retro_key)code;
rgui->binds.begin++;
rgui->binds.target++;
rgui->binds.timeout_end = rarch_get_time_usec() + RGUI_KEYBOARD_BIND_TIMEOUT_SECONDS * 1000000;
rgui->binds.timeout_end = rarch_get_time_usec() + MENU_KEYBOARD_BIND_TIMEOUT_SECONDS * 1000000;
return rgui->binds.begin <= rgui->binds.last;
}