mirror of
https://github.com/libretro/RetroArch
synced 2025-03-30 07:20:36 +00:00
(Menu) More replacement of namespace prefix 'rgui' with 'menu'
This commit is contained in:
parent
639e6dbe33
commit
966db762cf
@ -534,8 +534,8 @@ static const bool stdin_cmd_enable = false;
|
||||
// Number of entries that will be kept in content history file.
|
||||
static const unsigned game_history_size = 100;
|
||||
|
||||
// Show RGUI start-up screen on boot.
|
||||
static const bool rgui_show_start_screen = true;
|
||||
// Show Menu start-up screen on boot.
|
||||
static const bool menu_show_start_screen = true;
|
||||
|
||||
// Log level for libretro cores (GET_LOG_INTERFACE).
|
||||
static const unsigned libretro_log_level = 0;
|
||||
|
2
driver.c
2
driver.c
@ -512,7 +512,7 @@ static void init_menu(void)
|
||||
return;
|
||||
|
||||
find_menu_driver();
|
||||
if (!(driver.menu = (rgui_handle_t*)menu_init(driver.menu_ctx)))
|
||||
if (!(driver.menu = (menu_handle_t*)menu_init(driver.menu_ctx)))
|
||||
{
|
||||
RARCH_ERR("Cannot initialize menu.\n");
|
||||
rarch_fail(1, "init_menu()");
|
||||
|
16
driver.h
16
driver.h
@ -467,14 +467,14 @@ typedef struct menu_ctx_driver
|
||||
#define MAX_PLAYERS 8
|
||||
#endif
|
||||
|
||||
struct rgui_bind_state_port
|
||||
struct menu_bind_state_port
|
||||
{
|
||||
bool buttons[MENU_MAX_BUTTONS];
|
||||
int16_t axes[MENU_MAX_AXES];
|
||||
uint16_t hats[MENU_MAX_HATS];
|
||||
};
|
||||
|
||||
struct rgui_bind_axis_state
|
||||
struct menu_bind_axis_state
|
||||
{
|
||||
// Default axis state.
|
||||
int16_t rested_axes[MENU_MAX_AXES];
|
||||
@ -482,15 +482,15 @@ struct rgui_bind_axis_state
|
||||
int16_t locked_axes[MENU_MAX_AXES];
|
||||
};
|
||||
|
||||
struct rgui_bind_state
|
||||
struct menu_bind_state
|
||||
{
|
||||
struct retro_keybind *target;
|
||||
int64_t timeout_end; // For keyboard binding.
|
||||
unsigned begin;
|
||||
unsigned last;
|
||||
unsigned player;
|
||||
struct rgui_bind_state_port state[MAX_PLAYERS];
|
||||
struct rgui_bind_axis_state axis_state[MAX_PLAYERS];
|
||||
struct menu_bind_state_port state[MAX_PLAYERS];
|
||||
struct menu_bind_axis_state axis_state[MAX_PLAYERS];
|
||||
bool skip;
|
||||
};
|
||||
|
||||
@ -545,7 +545,7 @@ typedef struct
|
||||
void *history;
|
||||
retro_time_t last_time; // Used to throttle RGUI in case VSync is broken.
|
||||
|
||||
struct rgui_bind_state binds;
|
||||
struct menu_bind_state binds;
|
||||
struct
|
||||
{
|
||||
const char **buffer;
|
||||
@ -558,7 +558,7 @@ typedef struct
|
||||
retro_time_t delta;
|
||||
retro_time_t target_msec;
|
||||
retro_time_t sleep_msec;
|
||||
} rgui_handle_t;
|
||||
} menu_handle_t;
|
||||
|
||||
enum rarch_display_type
|
||||
{
|
||||
@ -590,7 +590,7 @@ typedef struct driver
|
||||
void *video_data;
|
||||
void *input_data;
|
||||
#ifdef HAVE_MENU
|
||||
rgui_handle_t *menu;
|
||||
menu_handle_t *menu;
|
||||
const menu_ctx_driver_t *menu_ctx;
|
||||
#endif
|
||||
|
||||
|
@ -46,17 +46,17 @@
|
||||
#ifdef HAVE_SHADER_MANAGER
|
||||
static inline struct gfx_shader *shader_manager_get_current_shader(void *data, unsigned type)
|
||||
{
|
||||
rgui_handle_t *rgui = (rgui_handle_t*)data;
|
||||
menu_handle_t *menu = (menu_handle_t*)data;
|
||||
struct gfx_shader *shader = NULL;
|
||||
|
||||
if (!rgui)
|
||||
if (!menu)
|
||||
{
|
||||
RARCH_ERR("Cannot get current shader, menu handle is not initialized.\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (type == MENU_SETTINGS_SHADER_PRESET_PARAMETERS)
|
||||
shader = (struct gfx_shader *)rgui->shader;
|
||||
shader = (struct gfx_shader *)menu->shader;
|
||||
|
||||
if (!shader && driver.video_poke && driver.video_data && driver.video_poke->get_current_shader)
|
||||
shader = driver.video_poke->get_current_shader(driver.video_data);
|
||||
@ -69,9 +69,9 @@ static void menu_common_entries_init(void *data, unsigned menu_type)
|
||||
{
|
||||
unsigned i, last;
|
||||
char tmp[256];
|
||||
rgui_handle_t *rgui = (rgui_handle_t*)data;
|
||||
menu_handle_t *menu = (menu_handle_t*)data;
|
||||
|
||||
if (!rgui)
|
||||
if (!menu)
|
||||
return;
|
||||
|
||||
switch (menu_type)
|
||||
@ -80,35 +80,35 @@ static void menu_common_entries_init(void *data, unsigned menu_type)
|
||||
case MENU_SETTINGS_SHADER_PARAMETERS:
|
||||
case MENU_SETTINGS_SHADER_PRESET_PARAMETERS:
|
||||
{
|
||||
file_list_clear(rgui->selection_buf);
|
||||
file_list_clear(menu->selection_buf);
|
||||
|
||||
struct gfx_shader *shader = (struct gfx_shader*)shader_manager_get_current_shader(rgui, menu_type);
|
||||
struct gfx_shader *shader = (struct gfx_shader*)shader_manager_get_current_shader(menu, menu_type);
|
||||
if (shader)
|
||||
for (i = 0; i < shader->num_parameters; i++)
|
||||
file_list_push(rgui->selection_buf, shader->parameters[i].desc, MENU_SETTINGS_SHADER_PARAMETER_0 + i, 0);
|
||||
rgui->parameter_shader = shader;
|
||||
file_list_push(menu->selection_buf, shader->parameters[i].desc, MENU_SETTINGS_SHADER_PARAMETER_0 + i, 0);
|
||||
menu->parameter_shader = shader;
|
||||
break;
|
||||
}
|
||||
case MENU_SETTINGS_SHADER_OPTIONS:
|
||||
{
|
||||
struct gfx_shader *shader = (struct gfx_shader*)rgui->shader;
|
||||
struct gfx_shader *shader = (struct gfx_shader*)menu->shader;
|
||||
|
||||
if (!shader)
|
||||
return;
|
||||
|
||||
file_list_clear(rgui->selection_buf);
|
||||
file_list_push(rgui->selection_buf, "Apply Shader Changes",
|
||||
file_list_clear(menu->selection_buf);
|
||||
file_list_push(menu->selection_buf, "Apply Shader Changes",
|
||||
MENU_SETTINGS_SHADER_APPLY, 0);
|
||||
file_list_push(rgui->selection_buf, "Default Filter", MENU_SETTINGS_SHADER_FILTER, 0);
|
||||
file_list_push(rgui->selection_buf, "Load Shader Preset",
|
||||
file_list_push(menu->selection_buf, "Default Filter", MENU_SETTINGS_SHADER_FILTER, 0);
|
||||
file_list_push(menu->selection_buf, "Load Shader Preset",
|
||||
MENU_SETTINGS_SHADER_PRESET, 0);
|
||||
file_list_push(rgui->selection_buf, "Save As Shader Preset",
|
||||
file_list_push(menu->selection_buf, "Save As Shader Preset",
|
||||
MENU_SETTINGS_SHADER_PRESET_SAVE, 0);
|
||||
file_list_push(rgui->selection_buf, "Parameters (Current)",
|
||||
file_list_push(menu->selection_buf, "Parameters (Current)",
|
||||
MENU_SETTINGS_SHADER_PARAMETERS, 0);
|
||||
file_list_push(rgui->selection_buf, "Parameters (RGUI)",
|
||||
file_list_push(menu->selection_buf, "Parameters (RGUI)",
|
||||
MENU_SETTINGS_SHADER_PRESET_PARAMETERS, 0);
|
||||
file_list_push(rgui->selection_buf, "Shader Passes",
|
||||
file_list_push(menu->selection_buf, "Shader Passes",
|
||||
MENU_SETTINGS_SHADER_PASSES, 0);
|
||||
|
||||
for (i = 0; i < shader->passes; i++)
|
||||
@ -116,99 +116,99 @@ static void menu_common_entries_init(void *data, unsigned menu_type)
|
||||
char buf[64];
|
||||
|
||||
snprintf(buf, sizeof(buf), "Shader #%u", i);
|
||||
file_list_push(rgui->selection_buf, buf,
|
||||
file_list_push(menu->selection_buf, buf,
|
||||
MENU_SETTINGS_SHADER_0 + 3 * i, 0);
|
||||
|
||||
snprintf(buf, sizeof(buf), "Shader #%u Filter", i);
|
||||
file_list_push(rgui->selection_buf, buf,
|
||||
file_list_push(menu->selection_buf, buf,
|
||||
MENU_SETTINGS_SHADER_0_FILTER + 3 * i, 0);
|
||||
|
||||
snprintf(buf, sizeof(buf), "Shader #%u Scale", i);
|
||||
file_list_push(rgui->selection_buf, buf,
|
||||
file_list_push(menu->selection_buf, buf,
|
||||
MENU_SETTINGS_SHADER_0_SCALE + 3 * i, 0);
|
||||
}
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
case MENU_SETTINGS_GENERAL_OPTIONS:
|
||||
file_list_clear(rgui->selection_buf);
|
||||
file_list_push(rgui->selection_buf, "Libretro Logging Level", MENU_SETTINGS_LIBRETRO_LOG_LEVEL, 0);
|
||||
file_list_push(rgui->selection_buf, "Logging Verbosity", MENU_SETTINGS_LOGGING_VERBOSITY, 0);
|
||||
file_list_push(rgui->selection_buf, "Performance Counters", MENU_SETTINGS_PERFORMANCE_COUNTERS_ENABLE, 0);
|
||||
file_list_push(rgui->selection_buf, "Configuration Save On Exit", MENU_SETTINGS_CONFIG_SAVE_ON_EXIT, 0);
|
||||
file_list_push(rgui->selection_buf, "Configuration Per-Core", MENU_SETTINGS_PER_CORE_CONFIG, 0);
|
||||
file_list_clear(menu->selection_buf);
|
||||
file_list_push(menu->selection_buf, "Libretro Logging Level", MENU_SETTINGS_LIBRETRO_LOG_LEVEL, 0);
|
||||
file_list_push(menu->selection_buf, "Logging Verbosity", MENU_SETTINGS_LOGGING_VERBOSITY, 0);
|
||||
file_list_push(menu->selection_buf, "Performance Counters", MENU_SETTINGS_PERFORMANCE_COUNTERS_ENABLE, 0);
|
||||
file_list_push(menu->selection_buf, "Configuration Save On Exit", MENU_SETTINGS_CONFIG_SAVE_ON_EXIT, 0);
|
||||
file_list_push(menu->selection_buf, "Configuration Per-Core", MENU_SETTINGS_PER_CORE_CONFIG, 0);
|
||||
#ifdef HAVE_SCREENSHOTS
|
||||
file_list_push(rgui->selection_buf, "GPU Screenshots", MENU_SETTINGS_GPU_SCREENSHOT, 0);
|
||||
file_list_push(menu->selection_buf, "GPU Screenshots", MENU_SETTINGS_GPU_SCREENSHOT, 0);
|
||||
#endif
|
||||
file_list_push(rgui->selection_buf, "Load Dummy On Core Shutdown", MENU_SETTINGS_LOAD_DUMMY_ON_CORE_SHUTDOWN, 0);
|
||||
file_list_push(rgui->selection_buf, "Show Framerate", MENU_SETTINGS_DEBUG_TEXT, 0);
|
||||
file_list_push(rgui->selection_buf, "Maximum Run Speed", MENU_SETTINGS_FASTFORWARD_RATIO, 0);
|
||||
file_list_push(rgui->selection_buf, "Slow-Motion Ratio", MENU_SETTINGS_SLOWMOTION_RATIO, 0);
|
||||
file_list_push(rgui->selection_buf, "Rewind", MENU_SETTINGS_REWIND_ENABLE, 0);
|
||||
file_list_push(rgui->selection_buf, "Rewind Granularity", MENU_SETTINGS_REWIND_GRANULARITY, 0);
|
||||
file_list_push(rgui->selection_buf, "SRAM Block Overwrite", MENU_SETTINGS_BLOCK_SRAM_OVERWRITE, 0);
|
||||
file_list_push(menu->selection_buf, "Load Dummy On Core Shutdown", MENU_SETTINGS_LOAD_DUMMY_ON_CORE_SHUTDOWN, 0);
|
||||
file_list_push(menu->selection_buf, "Show Framerate", MENU_SETTINGS_DEBUG_TEXT, 0);
|
||||
file_list_push(menu->selection_buf, "Maximum Run Speed", MENU_SETTINGS_FASTFORWARD_RATIO, 0);
|
||||
file_list_push(menu->selection_buf, "Slow-Motion Ratio", MENU_SETTINGS_SLOWMOTION_RATIO, 0);
|
||||
file_list_push(menu->selection_buf, "Rewind", MENU_SETTINGS_REWIND_ENABLE, 0);
|
||||
file_list_push(menu->selection_buf, "Rewind Granularity", MENU_SETTINGS_REWIND_GRANULARITY, 0);
|
||||
file_list_push(menu->selection_buf, "SRAM Block Overwrite", MENU_SETTINGS_BLOCK_SRAM_OVERWRITE, 0);
|
||||
#if defined(HAVE_THREADS)
|
||||
file_list_push(rgui->selection_buf, "SRAM Autosave", MENU_SETTINGS_SRAM_AUTOSAVE, 0);
|
||||
file_list_push(menu->selection_buf, "SRAM Autosave", MENU_SETTINGS_SRAM_AUTOSAVE, 0);
|
||||
#endif
|
||||
file_list_push(rgui->selection_buf, "Window Compositing", MENU_SETTINGS_WINDOW_COMPOSITING_ENABLE, 0);
|
||||
file_list_push(rgui->selection_buf, "Window Unfocus Pause", MENU_SETTINGS_PAUSE_IF_WINDOW_FOCUS_LOST, 0);
|
||||
file_list_push(rgui->selection_buf, "Savestate Autosave On Exit", MENU_SETTINGS_SAVESTATE_AUTO_SAVE, 0);
|
||||
file_list_push(rgui->selection_buf, "Savestate Autoload", MENU_SETTINGS_SAVESTATE_AUTO_LOAD, 0);
|
||||
file_list_push(menu->selection_buf, "Window Compositing", MENU_SETTINGS_WINDOW_COMPOSITING_ENABLE, 0);
|
||||
file_list_push(menu->selection_buf, "Window Unfocus Pause", MENU_SETTINGS_PAUSE_IF_WINDOW_FOCUS_LOST, 0);
|
||||
file_list_push(menu->selection_buf, "Savestate Autosave On Exit", MENU_SETTINGS_SAVESTATE_AUTO_SAVE, 0);
|
||||
file_list_push(menu->selection_buf, "Savestate Autoload", MENU_SETTINGS_SAVESTATE_AUTO_LOAD, 0);
|
||||
break;
|
||||
case MENU_SETTINGS_VIDEO_OPTIONS:
|
||||
file_list_clear(rgui->selection_buf);
|
||||
file_list_clear(menu->selection_buf);
|
||||
#if defined(GEKKO) || defined(__CELLOS_LV2__)
|
||||
file_list_push(rgui->selection_buf, "Screen Resolution", MENU_SETTINGS_VIDEO_RESOLUTION, 0);
|
||||
file_list_push(menu->selection_buf, "Screen Resolution", MENU_SETTINGS_VIDEO_RESOLUTION, 0);
|
||||
#endif
|
||||
file_list_push(rgui->selection_buf, "Soft Filter", MENU_SETTINGS_VIDEO_SOFTFILTER, 0);
|
||||
file_list_push(menu->selection_buf, "Soft Filter", MENU_SETTINGS_VIDEO_SOFTFILTER, 0);
|
||||
#if defined(__CELLOS_LV2__)
|
||||
file_list_push(rgui->selection_buf, "PAL60 Mode", MENU_SETTINGS_VIDEO_PAL60, 0);
|
||||
file_list_push(menu->selection_buf, "PAL60 Mode", MENU_SETTINGS_VIDEO_PAL60, 0);
|
||||
#endif
|
||||
#ifndef HAVE_SHADER_MANAGER
|
||||
file_list_push(rgui->selection_buf, "Default Filter", MENU_SETTINGS_VIDEO_FILTER, 0);
|
||||
file_list_push(menu->selection_buf, "Default Filter", MENU_SETTINGS_VIDEO_FILTER, 0);
|
||||
#endif
|
||||
#ifdef HW_RVL
|
||||
file_list_push(rgui->selection_buf, "VI Trap filtering", MENU_SETTINGS_VIDEO_SOFT_FILTER, 0);
|
||||
file_list_push(menu->selection_buf, "VI Trap filtering", MENU_SETTINGS_VIDEO_SOFT_FILTER, 0);
|
||||
#endif
|
||||
#if defined(HW_RVL) || defined(_XBOX360)
|
||||
file_list_push(rgui->selection_buf, "Gamma", MENU_SETTINGS_VIDEO_GAMMA, 0);
|
||||
file_list_push(menu->selection_buf, "Gamma", MENU_SETTINGS_VIDEO_GAMMA, 0);
|
||||
#endif
|
||||
#ifdef _XBOX1
|
||||
file_list_push(rgui->selection_buf, "Soft filtering", MENU_SETTINGS_SOFT_DISPLAY_FILTER, 0);
|
||||
file_list_push(rgui->selection_buf, "Flicker filtering", MENU_SETTINGS_FLICKER_FILTER, 0);
|
||||
file_list_push(menu->selection_buf, "Soft filtering", MENU_SETTINGS_SOFT_DISPLAY_FILTER, 0);
|
||||
file_list_push(menu->selection_buf, "Flicker filtering", MENU_SETTINGS_FLICKER_FILTER, 0);
|
||||
#endif
|
||||
file_list_push(rgui->selection_buf, "Integer Scale", MENU_SETTINGS_VIDEO_INTEGER_SCALE, 0);
|
||||
file_list_push(rgui->selection_buf, "Aspect Ratio", MENU_SETTINGS_VIDEO_ASPECT_RATIO, 0);
|
||||
file_list_push(rgui->selection_buf, "Custom Ratio", MENU_SETTINGS_CUSTOM_VIEWPORT, 0);
|
||||
file_list_push(menu->selection_buf, "Integer Scale", MENU_SETTINGS_VIDEO_INTEGER_SCALE, 0);
|
||||
file_list_push(menu->selection_buf, "Aspect Ratio", MENU_SETTINGS_VIDEO_ASPECT_RATIO, 0);
|
||||
file_list_push(menu->selection_buf, "Custom Ratio", MENU_SETTINGS_CUSTOM_VIEWPORT, 0);
|
||||
#if !defined(RARCH_CONSOLE) && !defined(RARCH_MOBILE)
|
||||
file_list_push(rgui->selection_buf, "Toggle Fullscreen", MENU_SETTINGS_TOGGLE_FULLSCREEN, 0);
|
||||
file_list_push(menu->selection_buf, "Toggle Fullscreen", MENU_SETTINGS_TOGGLE_FULLSCREEN, 0);
|
||||
#endif
|
||||
file_list_push(rgui->selection_buf, "Rotation", MENU_SETTINGS_VIDEO_ROTATION, 0);
|
||||
file_list_push(rgui->selection_buf, "VSync", MENU_SETTINGS_VIDEO_VSYNC, 0);
|
||||
file_list_push(rgui->selection_buf, "Hard GPU Sync", MENU_SETTINGS_VIDEO_HARD_SYNC, 0);
|
||||
file_list_push(rgui->selection_buf, "Hard GPU Sync Frames", MENU_SETTINGS_VIDEO_HARD_SYNC_FRAMES, 0);
|
||||
file_list_push(menu->selection_buf, "Rotation", MENU_SETTINGS_VIDEO_ROTATION, 0);
|
||||
file_list_push(menu->selection_buf, "VSync", MENU_SETTINGS_VIDEO_VSYNC, 0);
|
||||
file_list_push(menu->selection_buf, "Hard GPU Sync", MENU_SETTINGS_VIDEO_HARD_SYNC, 0);
|
||||
file_list_push(menu->selection_buf, "Hard GPU Sync Frames", MENU_SETTINGS_VIDEO_HARD_SYNC_FRAMES, 0);
|
||||
#if !defined(RARCH_MOBILE)
|
||||
file_list_push(rgui->selection_buf, "Black Frame Insertion", MENU_SETTINGS_VIDEO_BLACK_FRAME_INSERTION, 0);
|
||||
file_list_push(menu->selection_buf, "Black Frame Insertion", MENU_SETTINGS_VIDEO_BLACK_FRAME_INSERTION, 0);
|
||||
#endif
|
||||
file_list_push(rgui->selection_buf, "VSync Swap Interval", MENU_SETTINGS_VIDEO_SWAP_INTERVAL, 0);
|
||||
file_list_push(menu->selection_buf, "VSync Swap Interval", MENU_SETTINGS_VIDEO_SWAP_INTERVAL, 0);
|
||||
#if defined(HAVE_THREADS) && !defined(GEKKO)
|
||||
file_list_push(rgui->selection_buf, "Threaded Driver", MENU_SETTINGS_VIDEO_THREADED, 0);
|
||||
file_list_push(menu->selection_buf, "Threaded Driver", MENU_SETTINGS_VIDEO_THREADED, 0);
|
||||
#endif
|
||||
#if !defined(RARCH_CONSOLE) && !defined(RARCH_MOBILE)
|
||||
file_list_push(rgui->selection_buf, "Windowed Scale (X)", MENU_SETTINGS_VIDEO_WINDOW_SCALE_X, 0);
|
||||
file_list_push(rgui->selection_buf, "Windowed Scale (Y)", MENU_SETTINGS_VIDEO_WINDOW_SCALE_Y, 0);
|
||||
file_list_push(menu->selection_buf, "Windowed Scale (X)", MENU_SETTINGS_VIDEO_WINDOW_SCALE_X, 0);
|
||||
file_list_push(menu->selection_buf, "Windowed Scale (Y)", MENU_SETTINGS_VIDEO_WINDOW_SCALE_Y, 0);
|
||||
#endif
|
||||
file_list_push(rgui->selection_buf, "Crop Overscan (reload)", MENU_SETTINGS_VIDEO_CROP_OVERSCAN, 0);
|
||||
file_list_push(rgui->selection_buf, "Monitor Index", MENU_SETTINGS_VIDEO_MONITOR_INDEX, 0);
|
||||
file_list_push(rgui->selection_buf, "Estimated Monitor FPS", MENU_SETTINGS_VIDEO_REFRESH_RATE_AUTO, 0);
|
||||
file_list_push(menu->selection_buf, "Crop Overscan (reload)", MENU_SETTINGS_VIDEO_CROP_OVERSCAN, 0);
|
||||
file_list_push(menu->selection_buf, "Monitor Index", MENU_SETTINGS_VIDEO_MONITOR_INDEX, 0);
|
||||
file_list_push(menu->selection_buf, "Estimated Monitor FPS", MENU_SETTINGS_VIDEO_REFRESH_RATE_AUTO, 0);
|
||||
break;
|
||||
case MENU_SETTINGS_FONT_OPTIONS:
|
||||
file_list_clear(rgui->selection_buf);
|
||||
file_list_push(rgui->selection_buf, "OSD Font Enable", MENU_SETTINGS_FONT_ENABLE, 0);
|
||||
file_list_push(rgui->selection_buf, "OSD Font Size", MENU_SETTINGS_FONT_SIZE, 0);
|
||||
file_list_clear(menu->selection_buf);
|
||||
file_list_push(menu->selection_buf, "OSD Font Enable", MENU_SETTINGS_FONT_ENABLE, 0);
|
||||
file_list_push(menu->selection_buf, "OSD Font Size", MENU_SETTINGS_FONT_SIZE, 0);
|
||||
break;
|
||||
case MENU_SETTINGS_CORE_OPTIONS:
|
||||
file_list_clear(rgui->selection_buf);
|
||||
file_list_clear(menu->selection_buf);
|
||||
|
||||
if (g_extern.system.core_options)
|
||||
{
|
||||
@ -216,62 +216,62 @@ static void menu_common_entries_init(void *data, unsigned menu_type)
|
||||
|
||||
opts = core_option_size(g_extern.system.core_options);
|
||||
for (i = 0; i < opts; i++)
|
||||
file_list_push(rgui->selection_buf,
|
||||
file_list_push(menu->selection_buf,
|
||||
core_option_get_desc(g_extern.system.core_options, i), MENU_SETTINGS_CORE_OPTION_START + i, 0);
|
||||
}
|
||||
else
|
||||
file_list_push(rgui->selection_buf, "No options available.", MENU_SETTINGS_CORE_OPTION_NONE, 0);
|
||||
file_list_push(menu->selection_buf, "No options available.", MENU_SETTINGS_CORE_OPTION_NONE, 0);
|
||||
break;
|
||||
case MENU_SETTINGS_CORE_INFO:
|
||||
{
|
||||
core_info_t *info = (core_info_t*)rgui->core_info_current;
|
||||
file_list_clear(rgui->selection_buf);
|
||||
core_info_t *info = (core_info_t*)menu->core_info_current;
|
||||
file_list_clear(menu->selection_buf);
|
||||
|
||||
if (info->data)
|
||||
{
|
||||
snprintf(tmp, sizeof(tmp), "Core name: %s",
|
||||
info->display_name ? info->display_name : "");
|
||||
file_list_push(rgui->selection_buf, tmp, MENU_SETTINGS_CORE_INFO_NONE, 0);
|
||||
file_list_push(menu->selection_buf, tmp, MENU_SETTINGS_CORE_INFO_NONE, 0);
|
||||
|
||||
if (info->authors_list)
|
||||
{
|
||||
strlcpy(tmp, "Authors: ", sizeof(tmp));
|
||||
string_list_join_concat(tmp, sizeof(tmp), info->authors_list, ", ");
|
||||
file_list_push(rgui->selection_buf, tmp, MENU_SETTINGS_CORE_INFO_NONE, 0);
|
||||
file_list_push(menu->selection_buf, tmp, MENU_SETTINGS_CORE_INFO_NONE, 0);
|
||||
}
|
||||
|
||||
if (info->permissions_list)
|
||||
{
|
||||
strlcpy(tmp, "Permissions: ", sizeof(tmp));
|
||||
string_list_join_concat(tmp, sizeof(tmp), info->permissions_list, ", ");
|
||||
file_list_push(rgui->selection_buf, tmp, MENU_SETTINGS_CORE_INFO_NONE, 0);
|
||||
file_list_push(menu->selection_buf, tmp, MENU_SETTINGS_CORE_INFO_NONE, 0);
|
||||
}
|
||||
|
||||
if (info->supported_extensions_list)
|
||||
{
|
||||
strlcpy(tmp, "Supported extensions: ", sizeof(tmp));
|
||||
string_list_join_concat(tmp, sizeof(tmp), info->supported_extensions_list, ", ");
|
||||
file_list_push(rgui->selection_buf, tmp, MENU_SETTINGS_CORE_INFO_NONE, 0);
|
||||
file_list_push(menu->selection_buf, tmp, MENU_SETTINGS_CORE_INFO_NONE, 0);
|
||||
}
|
||||
|
||||
if (info->firmware_count > 0)
|
||||
{
|
||||
core_info_list_update_missing_firmware(rgui->core_info, info->path,
|
||||
core_info_list_update_missing_firmware(menu->core_info, info->path,
|
||||
g_settings.system_directory);
|
||||
|
||||
file_list_push(rgui->selection_buf, "Firmware: ", MENU_SETTINGS_CORE_INFO_NONE, 0);
|
||||
file_list_push(menu->selection_buf, "Firmware: ", MENU_SETTINGS_CORE_INFO_NONE, 0);
|
||||
for (i = 0; i < info->firmware_count; i++)
|
||||
{
|
||||
if (info->firmware[i].desc)
|
||||
{
|
||||
snprintf(tmp, sizeof(tmp), " name: %s",
|
||||
info->firmware[i].desc ? info->firmware[i].desc : "");
|
||||
file_list_push(rgui->selection_buf, tmp, MENU_SETTINGS_CORE_INFO_NONE, 0);
|
||||
file_list_push(menu->selection_buf, tmp, MENU_SETTINGS_CORE_INFO_NONE, 0);
|
||||
|
||||
snprintf(tmp, sizeof(tmp), " status: %s, %s",
|
||||
info->firmware[i].missing ? "missing" : "present",
|
||||
info->firmware[i].optional ? "optional" : "required");
|
||||
file_list_push(rgui->selection_buf, tmp, MENU_SETTINGS_CORE_INFO_NONE, 0);
|
||||
file_list_push(menu->selection_buf, tmp, MENU_SETTINGS_CORE_INFO_NONE, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -279,159 +279,159 @@ static void menu_common_entries_init(void *data, unsigned menu_type)
|
||||
if (info->notes)
|
||||
{
|
||||
snprintf(tmp, sizeof(tmp), "Core notes: ");
|
||||
file_list_push(rgui->selection_buf, tmp, MENU_SETTINGS_CORE_INFO_NONE, 0);
|
||||
file_list_push(menu->selection_buf, tmp, MENU_SETTINGS_CORE_INFO_NONE, 0);
|
||||
|
||||
for (i = 0; i < info->note_list->size; i++)
|
||||
{
|
||||
snprintf(tmp, sizeof(tmp), " %s", info->note_list->elems[i].data);
|
||||
file_list_push(rgui->selection_buf, tmp, MENU_SETTINGS_CORE_INFO_NONE, 0);
|
||||
file_list_push(menu->selection_buf, tmp, MENU_SETTINGS_CORE_INFO_NONE, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
file_list_push(rgui->selection_buf, "No information available.", MENU_SETTINGS_CORE_OPTION_NONE, 0);
|
||||
file_list_push(menu->selection_buf, "No information available.", MENU_SETTINGS_CORE_OPTION_NONE, 0);
|
||||
}
|
||||
break;
|
||||
case MENU_SETTINGS_OPTIONS:
|
||||
file_list_clear(rgui->selection_buf);
|
||||
file_list_push(rgui->selection_buf, "General Options", MENU_SETTINGS_GENERAL_OPTIONS, 0);
|
||||
file_list_push(rgui->selection_buf, "Video Options", MENU_SETTINGS_VIDEO_OPTIONS, 0);
|
||||
file_list_clear(menu->selection_buf);
|
||||
file_list_push(menu->selection_buf, "General Options", MENU_SETTINGS_GENERAL_OPTIONS, 0);
|
||||
file_list_push(menu->selection_buf, "Video Options", MENU_SETTINGS_VIDEO_OPTIONS, 0);
|
||||
#ifdef HAVE_SHADER_MANAGER
|
||||
file_list_push(rgui->selection_buf, "Shader Options", MENU_SETTINGS_SHADER_OPTIONS, 0);
|
||||
file_list_push(menu->selection_buf, "Shader Options", MENU_SETTINGS_SHADER_OPTIONS, 0);
|
||||
#endif
|
||||
file_list_push(rgui->selection_buf, "Font Options", MENU_SETTINGS_FONT_OPTIONS, 0);
|
||||
file_list_push(rgui->selection_buf, "Audio Options", MENU_SETTINGS_AUDIO_OPTIONS, 0);
|
||||
file_list_push(rgui->selection_buf, "Input Options", MENU_SETTINGS_INPUT_OPTIONS, 0);
|
||||
file_list_push(menu->selection_buf, "Font Options", MENU_SETTINGS_FONT_OPTIONS, 0);
|
||||
file_list_push(menu->selection_buf, "Audio Options", MENU_SETTINGS_AUDIO_OPTIONS, 0);
|
||||
file_list_push(menu->selection_buf, "Input Options", MENU_SETTINGS_INPUT_OPTIONS, 0);
|
||||
#ifdef HAVE_OVERLAY
|
||||
file_list_push(rgui->selection_buf, "Overlay Options", MENU_SETTINGS_OVERLAY_OPTIONS, 0);
|
||||
file_list_push(menu->selection_buf, "Overlay Options", MENU_SETTINGS_OVERLAY_OPTIONS, 0);
|
||||
#endif
|
||||
#ifdef HAVE_NETPLAY
|
||||
file_list_push(rgui->selection_buf, "Netplay Options", MENU_SETTINGS_NETPLAY_OPTIONS, 0);
|
||||
file_list_push(menu->selection_buf, "Netplay Options", MENU_SETTINGS_NETPLAY_OPTIONS, 0);
|
||||
#endif
|
||||
file_list_push(rgui->selection_buf, "Path Options", MENU_SETTINGS_PATH_OPTIONS, 0);
|
||||
file_list_push(menu->selection_buf, "Path Options", MENU_SETTINGS_PATH_OPTIONS, 0);
|
||||
if (g_extern.main_is_init && !g_extern.libretro_dummy)
|
||||
{
|
||||
if (g_extern.system.disk_control.get_num_images)
|
||||
file_list_push(rgui->selection_buf, "Disk Options", MENU_SETTINGS_DISK_OPTIONS, 0);
|
||||
file_list_push(menu->selection_buf, "Disk Options", MENU_SETTINGS_DISK_OPTIONS, 0);
|
||||
}
|
||||
file_list_push(rgui->selection_buf, "Privacy Options", MENU_SETTINGS_PRIVACY_OPTIONS, 0);
|
||||
file_list_push(menu->selection_buf, "Privacy Options", MENU_SETTINGS_PRIVACY_OPTIONS, 0);
|
||||
break;
|
||||
case MENU_SETTINGS_PRIVACY_OPTIONS:
|
||||
file_list_clear(rgui->selection_buf);
|
||||
file_list_clear(menu->selection_buf);
|
||||
#ifdef HAVE_CAMERA
|
||||
file_list_push(rgui->selection_buf, "Allow Camera", MENU_SETTINGS_PRIVACY_CAMERA_ALLOW, 0);
|
||||
file_list_push(menu->selection_buf, "Allow Camera", MENU_SETTINGS_PRIVACY_CAMERA_ALLOW, 0);
|
||||
#endif
|
||||
#ifdef HAVE_LOCATION
|
||||
file_list_push(rgui->selection_buf, "Allow Location Services", MENU_SETTINGS_PRIVACY_LOCATION_ALLOW, 0);
|
||||
file_list_push(menu->selection_buf, "Allow Location Services", MENU_SETTINGS_PRIVACY_LOCATION_ALLOW, 0);
|
||||
#endif
|
||||
break;
|
||||
case MENU_SETTINGS_DISK_OPTIONS:
|
||||
file_list_clear(rgui->selection_buf);
|
||||
file_list_push(rgui->selection_buf, "Disk Index", MENU_SETTINGS_DISK_INDEX, 0);
|
||||
file_list_push(rgui->selection_buf, "Disk Image Append", MENU_SETTINGS_DISK_APPEND, 0);
|
||||
file_list_clear(menu->selection_buf);
|
||||
file_list_push(menu->selection_buf, "Disk Index", MENU_SETTINGS_DISK_INDEX, 0);
|
||||
file_list_push(menu->selection_buf, "Disk Image Append", MENU_SETTINGS_DISK_APPEND, 0);
|
||||
break;
|
||||
case MENU_SETTINGS_OVERLAY_OPTIONS:
|
||||
file_list_clear(rgui->selection_buf);
|
||||
file_list_push(rgui->selection_buf, "Overlay Preset", MENU_SETTINGS_OVERLAY_PRESET, 0);
|
||||
file_list_push(rgui->selection_buf, "Overlay Opacity", MENU_SETTINGS_OVERLAY_OPACITY, 0);
|
||||
file_list_push(rgui->selection_buf, "Overlay Scale", MENU_SETTINGS_OVERLAY_SCALE, 0);
|
||||
file_list_clear(menu->selection_buf);
|
||||
file_list_push(menu->selection_buf, "Overlay Preset", MENU_SETTINGS_OVERLAY_PRESET, 0);
|
||||
file_list_push(menu->selection_buf, "Overlay Opacity", MENU_SETTINGS_OVERLAY_OPACITY, 0);
|
||||
file_list_push(menu->selection_buf, "Overlay Scale", MENU_SETTINGS_OVERLAY_SCALE, 0);
|
||||
break;
|
||||
#ifdef HAVE_NETPLAY
|
||||
case MENU_SETTINGS_NETPLAY_OPTIONS:
|
||||
file_list_clear(rgui->selection_buf);
|
||||
file_list_push(rgui->selection_buf, "Netplay Enable", MENU_SETTINGS_NETPLAY_ENABLE, 0);
|
||||
file_list_push(rgui->selection_buf, "Netplay Mode", MENU_SETTINGS_NETPLAY_MODE, 0);
|
||||
file_list_push(rgui->selection_buf, "Spectator Mode Enable", MENU_SETTINGS_NETPLAY_SPECTATOR_MODE_ENABLE, 0);
|
||||
file_list_push(rgui->selection_buf, "Host IP Address", MENU_SETTINGS_NETPLAY_HOST_IP_ADDRESS, 0);
|
||||
file_list_push(rgui->selection_buf, "TCP/UDP Port", MENU_SETTINGS_NETPLAY_TCP_UDP_PORT, 0);
|
||||
file_list_push(rgui->selection_buf, "Delay Frames", MENU_SETTINGS_NETPLAY_DELAY_FRAMES, 0);
|
||||
file_list_push(rgui->selection_buf, "Nickname", MENU_SETTINGS_NETPLAY_NICKNAME, 0);
|
||||
file_list_clear(menu->selection_buf);
|
||||
file_list_push(menu->selection_buf, "Netplay Enable", MENU_SETTINGS_NETPLAY_ENABLE, 0);
|
||||
file_list_push(menu->selection_buf, "Netplay Mode", MENU_SETTINGS_NETPLAY_MODE, 0);
|
||||
file_list_push(menu->selection_buf, "Spectator Mode Enable", MENU_SETTINGS_NETPLAY_SPECTATOR_MODE_ENABLE, 0);
|
||||
file_list_push(menu->selection_buf, "Host IP Address", MENU_SETTINGS_NETPLAY_HOST_IP_ADDRESS, 0);
|
||||
file_list_push(menu->selection_buf, "TCP/UDP Port", MENU_SETTINGS_NETPLAY_TCP_UDP_PORT, 0);
|
||||
file_list_push(menu->selection_buf, "Delay Frames", MENU_SETTINGS_NETPLAY_DELAY_FRAMES, 0);
|
||||
file_list_push(menu->selection_buf, "Nickname", MENU_SETTINGS_NETPLAY_NICKNAME, 0);
|
||||
break;
|
||||
#endif
|
||||
case MENU_SETTINGS_PATH_OPTIONS:
|
||||
file_list_clear(rgui->selection_buf);
|
||||
file_list_push(rgui->selection_buf, "Browser Directory", MENU_BROWSER_DIR_PATH, 0);
|
||||
file_list_push(rgui->selection_buf, "Content Directory", MENU_CONTENT_DIR_PATH, 0);
|
||||
file_list_push(rgui->selection_buf, "Assets Directory", MENU_ASSETS_DIR_PATH, 0);
|
||||
file_list_clear(menu->selection_buf);
|
||||
file_list_push(menu->selection_buf, "Browser Directory", MENU_BROWSER_DIR_PATH, 0);
|
||||
file_list_push(menu->selection_buf, "Content Directory", MENU_CONTENT_DIR_PATH, 0);
|
||||
file_list_push(menu->selection_buf, "Assets Directory", MENU_ASSETS_DIR_PATH, 0);
|
||||
#ifdef HAVE_DYNAMIC
|
||||
file_list_push(rgui->selection_buf, "Config Directory", MENU_CONFIG_DIR_PATH, 0);
|
||||
file_list_push(menu->selection_buf, "Config Directory", MENU_CONFIG_DIR_PATH, 0);
|
||||
#endif
|
||||
file_list_push(rgui->selection_buf, "Core Directory", MENU_LIBRETRO_DIR_PATH, 0);
|
||||
file_list_push(rgui->selection_buf, "Core Info Directory", MENU_LIBRETRO_INFO_DIR_PATH, 0);
|
||||
file_list_push(menu->selection_buf, "Core Directory", MENU_LIBRETRO_DIR_PATH, 0);
|
||||
file_list_push(menu->selection_buf, "Core Info Directory", MENU_LIBRETRO_INFO_DIR_PATH, 0);
|
||||
#ifdef HAVE_DYLIB
|
||||
file_list_push(rgui->selection_buf, "Soft Filter Directory", MENU_FILTER_DIR_PATH, 0);
|
||||
file_list_push(menu->selection_buf, "Soft Filter Directory", MENU_FILTER_DIR_PATH, 0);
|
||||
#endif
|
||||
file_list_push(rgui->selection_buf, "DSP Filter Directory", MENU_DSP_FILTER_DIR_PATH, 0);
|
||||
file_list_push(menu->selection_buf, "DSP Filter Directory", MENU_DSP_FILTER_DIR_PATH, 0);
|
||||
#ifdef HAVE_SHADER_MANAGER
|
||||
file_list_push(rgui->selection_buf, "Shader Directory", MENU_SHADER_DIR_PATH, 0);
|
||||
file_list_push(menu->selection_buf, "Shader Directory", MENU_SHADER_DIR_PATH, 0);
|
||||
#endif
|
||||
file_list_push(rgui->selection_buf, "Savestate Directory", MENU_SAVESTATE_DIR_PATH, 0);
|
||||
file_list_push(rgui->selection_buf, "Savefile Directory", MENU_SAVEFILE_DIR_PATH, 0);
|
||||
file_list_push(menu->selection_buf, "Savestate Directory", MENU_SAVESTATE_DIR_PATH, 0);
|
||||
file_list_push(menu->selection_buf, "Savefile Directory", MENU_SAVEFILE_DIR_PATH, 0);
|
||||
#ifdef HAVE_OVERLAY
|
||||
file_list_push(rgui->selection_buf, "Overlay Directory", MENU_OVERLAY_DIR_PATH, 0);
|
||||
file_list_push(menu->selection_buf, "Overlay Directory", MENU_OVERLAY_DIR_PATH, 0);
|
||||
#endif
|
||||
file_list_push(rgui->selection_buf, "System Directory", MENU_SYSTEM_DIR_PATH, 0);
|
||||
file_list_push(menu->selection_buf, "System Directory", MENU_SYSTEM_DIR_PATH, 0);
|
||||
#ifdef HAVE_SCREENSHOTS
|
||||
file_list_push(rgui->selection_buf, "Screenshot Directory", MENU_SCREENSHOT_DIR_PATH, 0);
|
||||
file_list_push(menu->selection_buf, "Screenshot Directory", MENU_SCREENSHOT_DIR_PATH, 0);
|
||||
#endif
|
||||
file_list_push(rgui->selection_buf, "Autoconfig Directory", MENU_AUTOCONFIG_DIR_PATH, 0);
|
||||
file_list_push(menu->selection_buf, "Autoconfig Directory", MENU_AUTOCONFIG_DIR_PATH, 0);
|
||||
break;
|
||||
case MENU_SETTINGS_INPUT_OPTIONS:
|
||||
file_list_clear(rgui->selection_buf);
|
||||
file_list_push(rgui->selection_buf, "Player", MENU_SETTINGS_BIND_PLAYER, 0);
|
||||
file_list_push(rgui->selection_buf, "Device", MENU_SETTINGS_BIND_DEVICE, 0);
|
||||
file_list_push(rgui->selection_buf, "Device Type", MENU_SETTINGS_BIND_DEVICE_TYPE, 0);
|
||||
file_list_push(rgui->selection_buf, "Analog D-pad Mode", MENU_SETTINGS_BIND_ANALOG_MODE, 0);
|
||||
file_list_push(rgui->selection_buf, "Input Axis Threshold", MENU_SETTINGS_INPUT_AXIS_THRESHOLD, 0);
|
||||
file_list_push(rgui->selection_buf, "Autodetect Enable", MENU_SETTINGS_DEVICE_AUTODETECT_ENABLE, 0);
|
||||
file_list_clear(menu->selection_buf);
|
||||
file_list_push(menu->selection_buf, "Player", MENU_SETTINGS_BIND_PLAYER, 0);
|
||||
file_list_push(menu->selection_buf, "Device", MENU_SETTINGS_BIND_DEVICE, 0);
|
||||
file_list_push(menu->selection_buf, "Device Type", MENU_SETTINGS_BIND_DEVICE_TYPE, 0);
|
||||
file_list_push(menu->selection_buf, "Analog D-pad Mode", MENU_SETTINGS_BIND_ANALOG_MODE, 0);
|
||||
file_list_push(menu->selection_buf, "Input Axis Threshold", MENU_SETTINGS_INPUT_AXIS_THRESHOLD, 0);
|
||||
file_list_push(menu->selection_buf, "Autodetect Enable", MENU_SETTINGS_DEVICE_AUTODETECT_ENABLE, 0);
|
||||
|
||||
file_list_push(rgui->selection_buf, "Bind Mode", MENU_SETTINGS_CUSTOM_BIND_MODE, 0);
|
||||
file_list_push(rgui->selection_buf, "Configure All (RetroPad)", MENU_SETTINGS_CUSTOM_BIND_ALL, 0);
|
||||
file_list_push(rgui->selection_buf, "Default All (RetroPad)", MENU_SETTINGS_CUSTOM_BIND_DEFAULT_ALL, 0);
|
||||
file_list_push(menu->selection_buf, "Bind Mode", MENU_SETTINGS_CUSTOM_BIND_MODE, 0);
|
||||
file_list_push(menu->selection_buf, "Configure All (RetroPad)", MENU_SETTINGS_CUSTOM_BIND_ALL, 0);
|
||||
file_list_push(menu->selection_buf, "Default All (RetroPad)", MENU_SETTINGS_CUSTOM_BIND_DEFAULT_ALL, 0);
|
||||
#ifdef HAVE_OSK
|
||||
file_list_push(rgui->selection_buf, "Onscreen Keyboard Enable", MENU_SETTINGS_ONSCREEN_KEYBOARD_ENABLE, 0);
|
||||
file_list_push(menu->selection_buf, "Onscreen Keyboard Enable", MENU_SETTINGS_ONSCREEN_KEYBOARD_ENABLE, 0);
|
||||
#endif
|
||||
last = (driver.input && driver.input->set_keybinds && !driver.input->get_joypad_driver) ? (MENU_SETTINGS_BIND_BEGIN + RETRO_DEVICE_ID_JOYPAD_R3) : MENU_SETTINGS_BIND_ALL_LAST;
|
||||
for (i = MENU_SETTINGS_BIND_BEGIN; i <= last; i++)
|
||||
file_list_push(rgui->selection_buf, input_config_bind_map[i - MENU_SETTINGS_BIND_BEGIN].desc, i, 0);
|
||||
file_list_push(menu->selection_buf, input_config_bind_map[i - MENU_SETTINGS_BIND_BEGIN].desc, i, 0);
|
||||
break;
|
||||
case MENU_SETTINGS_AUDIO_OPTIONS:
|
||||
file_list_clear(rgui->selection_buf);
|
||||
file_list_push(rgui->selection_buf, "DSP Filter", MENU_SETTINGS_AUDIO_DSP_FILTER, 0);
|
||||
file_list_push(rgui->selection_buf, "Audio Mute", MENU_SETTINGS_AUDIO_MUTE, 0);
|
||||
file_list_push(rgui->selection_buf, "Rate Control Delta", MENU_SETTINGS_AUDIO_CONTROL_RATE_DELTA, 0);
|
||||
file_list_clear(menu->selection_buf);
|
||||
file_list_push(menu->selection_buf, "DSP Filter", MENU_SETTINGS_AUDIO_DSP_FILTER, 0);
|
||||
file_list_push(menu->selection_buf, "Audio Mute", MENU_SETTINGS_AUDIO_MUTE, 0);
|
||||
file_list_push(menu->selection_buf, "Rate Control Delta", MENU_SETTINGS_AUDIO_CONTROL_RATE_DELTA, 0);
|
||||
#ifdef __CELLOS_LV2__
|
||||
file_list_push(rgui->selection_buf, "System BGM Control", MENU_SETTINGS_CUSTOM_BGM_CONTROL_ENABLE, 0);
|
||||
file_list_push(menu->selection_buf, "System BGM Control", MENU_SETTINGS_CUSTOM_BGM_CONTROL_ENABLE, 0);
|
||||
#endif
|
||||
#ifdef _XBOX1
|
||||
file_list_push(rgui->selection_buf, "Volume Effect", MENU_SETTINGS_AUDIO_DSP_EFFECT, 0);
|
||||
file_list_push(menu->selection_buf, "Volume Effect", MENU_SETTINGS_AUDIO_DSP_EFFECT, 0);
|
||||
#endif
|
||||
file_list_push(rgui->selection_buf, "Volume Level", MENU_SETTINGS_AUDIO_VOLUME, 0);
|
||||
file_list_push(menu->selection_buf, "Volume Level", MENU_SETTINGS_AUDIO_VOLUME, 0);
|
||||
break;
|
||||
case MENU_SETTINGS_DRIVERS:
|
||||
file_list_clear(rgui->selection_buf);
|
||||
file_list_push(rgui->selection_buf, "Video Driver", MENU_SETTINGS_DRIVER_VIDEO, 0);
|
||||
file_list_push(rgui->selection_buf, "Audio Driver", MENU_SETTINGS_DRIVER_AUDIO, 0);
|
||||
file_list_push(rgui->selection_buf, "Audio Device", MENU_SETTINGS_DRIVER_AUDIO_DEVICE, 0);
|
||||
file_list_push(rgui->selection_buf, "Audio Resampler", MENU_SETTINGS_DRIVER_AUDIO_RESAMPLER, 0);
|
||||
file_list_push(rgui->selection_buf, "Input Driver", MENU_SETTINGS_DRIVER_INPUT, 0);
|
||||
file_list_clear(menu->selection_buf);
|
||||
file_list_push(menu->selection_buf, "Video Driver", MENU_SETTINGS_DRIVER_VIDEO, 0);
|
||||
file_list_push(menu->selection_buf, "Audio Driver", MENU_SETTINGS_DRIVER_AUDIO, 0);
|
||||
file_list_push(menu->selection_buf, "Audio Device", MENU_SETTINGS_DRIVER_AUDIO_DEVICE, 0);
|
||||
file_list_push(menu->selection_buf, "Audio Resampler", MENU_SETTINGS_DRIVER_AUDIO_RESAMPLER, 0);
|
||||
file_list_push(menu->selection_buf, "Input Driver", MENU_SETTINGS_DRIVER_INPUT, 0);
|
||||
#ifdef HAVE_CAMERA
|
||||
file_list_push(rgui->selection_buf, "Camera Driver", MENU_SETTINGS_DRIVER_CAMERA, 0);
|
||||
file_list_push(menu->selection_buf, "Camera Driver", MENU_SETTINGS_DRIVER_CAMERA, 0);
|
||||
#endif
|
||||
#ifdef HAVE_LOCATION
|
||||
file_list_push(rgui->selection_buf, "Location Driver", MENU_SETTINGS_DRIVER_LOCATION, 0);
|
||||
file_list_push(menu->selection_buf, "Location Driver", MENU_SETTINGS_DRIVER_LOCATION, 0);
|
||||
#endif
|
||||
#ifdef HAVE_MENU
|
||||
file_list_push(rgui->selection_buf, "Menu Driver", MENU_SETTINGS_DRIVER_MENU, 0);
|
||||
file_list_push(menu->selection_buf, "Menu Driver", MENU_SETTINGS_DRIVER_MENU, 0);
|
||||
#endif
|
||||
break;
|
||||
case MENU_SETTINGS_PERFORMANCE_COUNTERS:
|
||||
file_list_clear(rgui->selection_buf);
|
||||
file_list_push(rgui->selection_buf, "Frontend Counters", MENU_SETTINGS_PERFORMANCE_COUNTERS_FRONTEND, 0);
|
||||
file_list_push(rgui->selection_buf, "Core Counters", MENU_SETTINGS_PERFORMANCE_COUNTERS_LIBRETRO, 0);
|
||||
file_list_clear(menu->selection_buf);
|
||||
file_list_push(menu->selection_buf, "Frontend Counters", MENU_SETTINGS_PERFORMANCE_COUNTERS_FRONTEND, 0);
|
||||
file_list_push(menu->selection_buf, "Core Counters", MENU_SETTINGS_PERFORMANCE_COUNTERS_LIBRETRO, 0);
|
||||
break;
|
||||
case MENU_SETTINGS_PERFORMANCE_COUNTERS_LIBRETRO:
|
||||
file_list_clear(rgui->selection_buf);
|
||||
file_list_clear(menu->selection_buf);
|
||||
{
|
||||
const struct retro_perf_counter **counters = (const struct retro_perf_counter**)perf_counters_libretro;
|
||||
unsigned num = perf_ptr_libretro;
|
||||
@ -441,11 +441,11 @@ static void menu_common_entries_init(void *data, unsigned menu_type)
|
||||
|
||||
for (i = 0; i < num; i++)
|
||||
if (counters[i] && counters[i]->ident)
|
||||
file_list_push(rgui->selection_buf, counters[i]->ident, MENU_SETTINGS_LIBRETRO_PERF_COUNTERS_BEGIN + i, 0);
|
||||
file_list_push(menu->selection_buf, counters[i]->ident, MENU_SETTINGS_LIBRETRO_PERF_COUNTERS_BEGIN + i, 0);
|
||||
}
|
||||
break;
|
||||
case MENU_SETTINGS_PERFORMANCE_COUNTERS_FRONTEND:
|
||||
file_list_clear(rgui->selection_buf);
|
||||
file_list_clear(menu->selection_buf);
|
||||
{
|
||||
const struct retro_perf_counter **counters = (const struct retro_perf_counter**)perf_counters_rarch;
|
||||
unsigned num = perf_ptr_rarch;
|
||||
@ -455,60 +455,60 @@ static void menu_common_entries_init(void *data, unsigned menu_type)
|
||||
|
||||
for (i = 0; i < num; i++)
|
||||
if (counters[i] && counters[i]->ident)
|
||||
file_list_push(rgui->selection_buf, counters[i]->ident, MENU_SETTINGS_PERF_COUNTERS_BEGIN + i, 0);
|
||||
file_list_push(menu->selection_buf, counters[i]->ident, MENU_SETTINGS_PERF_COUNTERS_BEGIN + i, 0);
|
||||
}
|
||||
break;
|
||||
case MENU_SETTINGS:
|
||||
file_list_clear(rgui->selection_buf);
|
||||
file_list_clear(menu->selection_buf);
|
||||
|
||||
#if defined(HAVE_DYNAMIC) || defined(HAVE_LIBRETRO_MANAGEMENT)
|
||||
file_list_push(rgui->selection_buf, "Core", MENU_SETTINGS_CORE, 0);
|
||||
file_list_push(menu->selection_buf, "Core", MENU_SETTINGS_CORE, 0);
|
||||
#endif
|
||||
if (rgui->history)
|
||||
file_list_push(rgui->selection_buf, "Load Content (History)", MENU_SETTINGS_OPEN_HISTORY, 0);
|
||||
if (menu->history)
|
||||
file_list_push(menu->selection_buf, "Load Content (History)", MENU_SETTINGS_OPEN_HISTORY, 0);
|
||||
|
||||
if (rgui->core_info && core_info_list_num_info_files(rgui->core_info))
|
||||
file_list_push(rgui->selection_buf, "Load Content (Detect Core)", MENU_SETTINGS_OPEN_FILEBROWSER_DEFERRED_CORE, 0);
|
||||
if (menu->core_info && core_info_list_num_info_files(menu->core_info))
|
||||
file_list_push(menu->selection_buf, "Load Content (Detect Core)", MENU_SETTINGS_OPEN_FILEBROWSER_DEFERRED_CORE, 0);
|
||||
|
||||
if (rgui->info.library_name || g_extern.system.info.library_name)
|
||||
if (menu->info.library_name || g_extern.system.info.library_name)
|
||||
{
|
||||
char load_game_core_msg[64];
|
||||
snprintf(load_game_core_msg, sizeof(load_game_core_msg), "Load Content (%s)",
|
||||
rgui->info.library_name ? rgui->info.library_name : g_extern.system.info.library_name);
|
||||
file_list_push(rgui->selection_buf, load_game_core_msg, MENU_SETTINGS_OPEN_FILEBROWSER, 0);
|
||||
menu->info.library_name ? menu->info.library_name : g_extern.system.info.library_name);
|
||||
file_list_push(menu->selection_buf, load_game_core_msg, MENU_SETTINGS_OPEN_FILEBROWSER, 0);
|
||||
}
|
||||
|
||||
file_list_push(rgui->selection_buf, "Core Options", MENU_SETTINGS_CORE_OPTIONS, 0);
|
||||
file_list_push(rgui->selection_buf, "Core Information", MENU_SETTINGS_CORE_INFO, 0);
|
||||
file_list_push(rgui->selection_buf, "Settings", MENU_SETTINGS_OPTIONS, 0);
|
||||
file_list_push(rgui->selection_buf, "Drivers", MENU_SETTINGS_DRIVERS, 0);
|
||||
file_list_push(menu->selection_buf, "Core Options", MENU_SETTINGS_CORE_OPTIONS, 0);
|
||||
file_list_push(menu->selection_buf, "Core Information", MENU_SETTINGS_CORE_INFO, 0);
|
||||
file_list_push(menu->selection_buf, "Settings", MENU_SETTINGS_OPTIONS, 0);
|
||||
file_list_push(menu->selection_buf, "Drivers", MENU_SETTINGS_DRIVERS, 0);
|
||||
|
||||
if (g_extern.perfcnt_enable)
|
||||
file_list_push(rgui->selection_buf, "Performance Counters", MENU_SETTINGS_PERFORMANCE_COUNTERS, 0);
|
||||
file_list_push(menu->selection_buf, "Performance Counters", MENU_SETTINGS_PERFORMANCE_COUNTERS, 0);
|
||||
|
||||
if (g_extern.main_is_init && !g_extern.libretro_dummy)
|
||||
{
|
||||
file_list_push(rgui->selection_buf, "Save State", MENU_SETTINGS_SAVESTATE_SAVE, 0);
|
||||
file_list_push(rgui->selection_buf, "Load State", MENU_SETTINGS_SAVESTATE_LOAD, 0);
|
||||
file_list_push(menu->selection_buf, "Save State", MENU_SETTINGS_SAVESTATE_SAVE, 0);
|
||||
file_list_push(menu->selection_buf, "Load State", MENU_SETTINGS_SAVESTATE_LOAD, 0);
|
||||
#ifdef HAVE_SCREENSHOTS
|
||||
file_list_push(rgui->selection_buf, "Take Screenshot", MENU_SETTINGS_SCREENSHOT, 0);
|
||||
file_list_push(menu->selection_buf, "Take Screenshot", MENU_SETTINGS_SCREENSHOT, 0);
|
||||
#endif
|
||||
file_list_push(rgui->selection_buf, "Resume Content", MENU_SETTINGS_RESUME_GAME, 0);
|
||||
file_list_push(rgui->selection_buf, "Restart Content", MENU_SETTINGS_RESTART_GAME, 0);
|
||||
file_list_push(menu->selection_buf, "Resume Content", MENU_SETTINGS_RESUME_GAME, 0);
|
||||
file_list_push(menu->selection_buf, "Restart Content", MENU_SETTINGS_RESTART_GAME, 0);
|
||||
|
||||
}
|
||||
#ifndef HAVE_DYNAMIC
|
||||
file_list_push(rgui->selection_buf, "Restart RetroArch", MENU_SETTINGS_RESTART_EMULATOR, 0);
|
||||
file_list_push(menu->selection_buf, "Restart RetroArch", MENU_SETTINGS_RESTART_EMULATOR, 0);
|
||||
#endif
|
||||
file_list_push(rgui->selection_buf, "RetroArch Config", MENU_SETTINGS_CONFIG, 0);
|
||||
file_list_push(rgui->selection_buf, "Save New Config", MENU_SETTINGS_SAVE_CONFIG, 0);
|
||||
file_list_push(rgui->selection_buf, "Help", MENU_START_SCREEN, 0);
|
||||
file_list_push(rgui->selection_buf, "Quit RetroArch", MENU_SETTINGS_QUIT_RARCH, 0);
|
||||
file_list_push(menu->selection_buf, "RetroArch Config", MENU_SETTINGS_CONFIG, 0);
|
||||
file_list_push(menu->selection_buf, "Save New Config", MENU_SETTINGS_SAVE_CONFIG, 0);
|
||||
file_list_push(menu->selection_buf, "Help", MENU_START_SCREEN, 0);
|
||||
file_list_push(menu->selection_buf, "Quit RetroArch", MENU_SETTINGS_QUIT_RARCH, 0);
|
||||
break;
|
||||
}
|
||||
|
||||
if (driver.menu_ctx && driver.menu_ctx->populate_entries)
|
||||
driver.menu_ctx->populate_entries(rgui, menu_type);
|
||||
driver.menu_ctx->populate_entries(menu, menu_type);
|
||||
}
|
||||
|
||||
static int menu_info_screen_iterate(unsigned action)
|
||||
@ -861,7 +861,7 @@ static int menu_info_screen_iterate(unsigned action)
|
||||
" \n"
|
||||
"When you apply shaders, the menu shader \n"
|
||||
"settings are saved to a temporary file (either \n"
|
||||
"rgui.cgp or rgui.glslp) and loaded. The file \n"
|
||||
"menu.cgp or menu.glslp) and loaded. The file \n"
|
||||
"persists after RetroArch exits. The file is \n"
|
||||
"saved to Shader Directory."
|
||||
);
|
||||
@ -1581,9 +1581,9 @@ static int menu_settings_iterate(unsigned action)
|
||||
if (type == MENU_SETTINGS_CORE)
|
||||
label = g_settings.libretro_directory;
|
||||
else if (type == MENU_SETTINGS_CONFIG)
|
||||
label = g_settings.rgui_config_directory;
|
||||
label = g_settings.menu_config_directory;
|
||||
else if (type == MENU_SETTINGS_DISK_APPEND)
|
||||
label = g_settings.rgui_content_directory;
|
||||
label = g_settings.menu_content_directory;
|
||||
|
||||
const char *dir = NULL;
|
||||
unsigned menu_type = 0;
|
||||
@ -1630,7 +1630,7 @@ static int menu_settings_iterate(unsigned action)
|
||||
&& action == MENU_ACTION_OK)
|
||||
{
|
||||
driver.menu->defer_core = type == MENU_SETTINGS_OPEN_FILEBROWSER_DEFERRED_CORE;
|
||||
file_list_push(driver.menu->menu_stack, g_settings.rgui_content_directory, MENU_FILE_DIRECTORY, driver.menu->selection_ptr);
|
||||
file_list_push(driver.menu->menu_stack, g_settings.menu_content_directory, MENU_FILE_DIRECTORY, driver.menu->selection_ptr);
|
||||
menu_clear_navigation(driver.menu);
|
||||
driver.menu->need_refresh = true;
|
||||
}
|
||||
@ -2160,7 +2160,7 @@ static void menu_parse_and_resolve(unsigned menu_type)
|
||||
static int menu_custom_bind_iterate(void *data, unsigned action)
|
||||
{
|
||||
char msg[256];
|
||||
rgui_handle_t *rgui = (rgui_handle_t*)data;
|
||||
menu_handle_t *menu = (menu_handle_t*)data;
|
||||
|
||||
(void)action; // Have to ignore action here. Only bind that should work here is Quit RetroArch or something like that.
|
||||
(void)msg;
|
||||
@ -2168,34 +2168,34 @@ static int menu_custom_bind_iterate(void *data, unsigned action)
|
||||
if (driver.video_data && driver.menu_ctx && driver.menu_ctx->render)
|
||||
driver.menu_ctx->render();
|
||||
|
||||
snprintf(msg, sizeof(msg), "[%s]\npress joypad\n(RETURN to skip)", input_config_bind_map[rgui->binds.begin - MENU_SETTINGS_BIND_BEGIN].desc);
|
||||
snprintf(msg, sizeof(msg), "[%s]\npress joypad\n(RETURN to skip)", input_config_bind_map[menu->binds.begin - MENU_SETTINGS_BIND_BEGIN].desc);
|
||||
|
||||
if (driver.video_data && driver.menu_ctx && driver.menu_ctx->render_messagebox)
|
||||
driver.menu_ctx->render_messagebox(msg);
|
||||
|
||||
struct rgui_bind_state binds = rgui->binds;
|
||||
struct menu_bind_state binds = menu->binds;
|
||||
menu_poll_bind_state(&binds);
|
||||
|
||||
if ((binds.skip && !rgui->binds.skip) || menu_poll_find_trigger(&rgui->binds, &binds))
|
||||
if ((binds.skip && !menu->binds.skip) || menu_poll_find_trigger(&menu->binds, &binds))
|
||||
{
|
||||
binds.begin++;
|
||||
if (binds.begin <= binds.last)
|
||||
binds.target++;
|
||||
else
|
||||
file_list_pop(rgui->menu_stack, &rgui->selection_ptr);
|
||||
file_list_pop(menu->menu_stack, &menu->selection_ptr);
|
||||
|
||||
// Avoid new binds triggering things right away.
|
||||
rgui->trigger_state = 0;
|
||||
rgui->old_input_state = -1ULL;
|
||||
menu->trigger_state = 0;
|
||||
menu->old_input_state = -1ULL;
|
||||
}
|
||||
rgui->binds = binds;
|
||||
menu->binds = binds;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int menu_custom_bind_iterate_keyboard(void *data, unsigned action)
|
||||
{
|
||||
char msg[256];
|
||||
rgui_handle_t *rgui = (rgui_handle_t*)data;
|
||||
menu_handle_t *menu = (menu_handle_t*)data;
|
||||
|
||||
(void)action; // Have to ignore action here.
|
||||
(void)msg;
|
||||
@ -2204,10 +2204,10 @@ static int menu_custom_bind_iterate_keyboard(void *data, unsigned action)
|
||||
driver.menu_ctx->render();
|
||||
|
||||
int64_t current = rarch_get_time_usec();
|
||||
int timeout = (rgui->binds.timeout_end - current) / 1000000;
|
||||
int timeout = (menu->binds.timeout_end - current) / 1000000;
|
||||
|
||||
snprintf(msg, sizeof(msg), "[%s]\npress keyboard\n(timeout %d seconds)",
|
||||
input_config_bind_map[rgui->binds.begin - MENU_SETTINGS_BIND_BEGIN].desc, timeout);
|
||||
input_config_bind_map[menu->binds.begin - MENU_SETTINGS_BIND_BEGIN].desc, timeout);
|
||||
|
||||
if (driver.video_data && driver.menu_ctx && driver.menu_ctx->render_messagebox)
|
||||
driver.menu_ctx->render_messagebox(msg);
|
||||
@ -2215,21 +2215,21 @@ static int menu_custom_bind_iterate_keyboard(void *data, unsigned action)
|
||||
bool timed_out = false;
|
||||
if (timeout <= 0)
|
||||
{
|
||||
rgui->binds.begin++;
|
||||
rgui->binds.target->key = RETROK_UNKNOWN; // Could be unsafe, but whatever.
|
||||
rgui->binds.target++;
|
||||
rgui->binds.timeout_end = rarch_get_time_usec() + MENU_KEYBOARD_BIND_TIMEOUT_SECONDS * 1000000;
|
||||
menu->binds.begin++;
|
||||
menu->binds.target->key = RETROK_UNKNOWN; // Could be unsafe, but whatever.
|
||||
menu->binds.target++;
|
||||
menu->binds.timeout_end = rarch_get_time_usec() + MENU_KEYBOARD_BIND_TIMEOUT_SECONDS * 1000000;
|
||||
timed_out = true;
|
||||
}
|
||||
|
||||
// binds.begin is updated in keyboard_press callback.
|
||||
if (rgui->binds.begin > rgui->binds.last)
|
||||
if (menu->binds.begin > menu->binds.last)
|
||||
{
|
||||
file_list_pop(rgui->menu_stack, &rgui->selection_ptr);
|
||||
file_list_pop(menu->menu_stack, &menu->selection_ptr);
|
||||
|
||||
// Avoid new binds triggering things right away.
|
||||
rgui->trigger_state = 0;
|
||||
rgui->old_input_state = -1ULL;
|
||||
menu->trigger_state = 0;
|
||||
menu->old_input_state = -1ULL;
|
||||
|
||||
// We won't be getting any key events, so just cancel early.
|
||||
if (timed_out)
|
||||
@ -2499,7 +2499,7 @@ static int menu_common_iterate(unsigned action)
|
||||
}
|
||||
else if (menu_type == MENU_BROWSER_DIR_PATH)
|
||||
{
|
||||
strlcpy(g_settings.rgui_content_directory, dir, sizeof(g_settings.rgui_content_directory));
|
||||
strlcpy(g_settings.menu_content_directory, dir, sizeof(g_settings.menu_content_directory));
|
||||
menu_flush_stack_type(MENU_SETTINGS_PATH_OPTIONS);
|
||||
}
|
||||
else if (menu_type == MENU_CONTENT_DIR_PATH)
|
||||
@ -2562,7 +2562,7 @@ static int menu_common_iterate(unsigned action)
|
||||
#ifdef HAVE_DYNAMIC
|
||||
else if (menu_type == MENU_CONFIG_DIR_PATH)
|
||||
{
|
||||
strlcpy(g_settings.rgui_config_directory, dir, sizeof(g_settings.rgui_config_directory));
|
||||
strlcpy(g_settings.menu_config_directory, dir, sizeof(g_settings.menu_config_directory));
|
||||
menu_flush_stack_type(MENU_SETTINGS_PATH_OPTIONS);
|
||||
}
|
||||
#endif
|
||||
@ -2674,8 +2674,8 @@ static int menu_common_iterate(unsigned action)
|
||||
|
||||
static void menu_common_shader_manager_init(void *data)
|
||||
{
|
||||
rgui_handle_t *rgui = (rgui_handle_t*)data;
|
||||
if (!rgui)
|
||||
menu_handle_t *menu = (menu_handle_t*)data;
|
||||
if (!menu)
|
||||
return;
|
||||
|
||||
#ifdef HAVE_SHADER_MANAGER
|
||||
@ -2687,20 +2687,20 @@ static void menu_common_shader_manager_init(void *data)
|
||||
else if (*g_extern.config_path)
|
||||
config_path = g_extern.config_path;
|
||||
|
||||
// In a multi-config setting, we can't have conflicts on rgui.cgp/rgui.glslp.
|
||||
// In a multi-config setting, we can't have conflicts on menu.cgp/menu.glslp.
|
||||
if (config_path)
|
||||
{
|
||||
fill_pathname_base(rgui->default_glslp, config_path, sizeof(rgui->default_glslp));
|
||||
path_remove_extension(rgui->default_glslp);
|
||||
strlcat(rgui->default_glslp, ".glslp", sizeof(rgui->default_glslp));
|
||||
fill_pathname_base(rgui->default_cgp, config_path, sizeof(rgui->default_cgp));
|
||||
path_remove_extension(rgui->default_cgp);
|
||||
strlcat(rgui->default_cgp, ".cgp", sizeof(rgui->default_cgp));
|
||||
fill_pathname_base(menu->default_glslp, config_path, sizeof(menu->default_glslp));
|
||||
path_remove_extension(menu->default_glslp);
|
||||
strlcat(menu->default_glslp, ".glslp", sizeof(menu->default_glslp));
|
||||
fill_pathname_base(menu->default_cgp, config_path, sizeof(menu->default_cgp));
|
||||
path_remove_extension(menu->default_cgp);
|
||||
strlcat(menu->default_cgp, ".cgp", sizeof(menu->default_cgp));
|
||||
}
|
||||
else
|
||||
{
|
||||
strlcpy(rgui->default_glslp, "rgui.glslp", sizeof(rgui->default_glslp));
|
||||
strlcpy(rgui->default_cgp, "rgui.cgp", sizeof(rgui->default_cgp));
|
||||
strlcpy(menu->default_glslp, "menu.glslp", sizeof(menu->default_glslp));
|
||||
strlcpy(menu->default_cgp, "menu.cgp", sizeof(menu->default_cgp));
|
||||
}
|
||||
|
||||
char cgp_path[PATH_MAX];
|
||||
@ -2711,17 +2711,17 @@ static void menu_common_shader_manager_init(void *data)
|
||||
conf = config_file_new(g_settings.video.shader_path);
|
||||
if (conf)
|
||||
{
|
||||
if (gfx_shader_read_conf_cgp(conf, rgui->shader))
|
||||
if (gfx_shader_read_conf_cgp(conf, menu->shader))
|
||||
{
|
||||
gfx_shader_resolve_relative(rgui->shader, g_settings.video.shader_path);
|
||||
gfx_shader_resolve_parameters(conf, rgui->shader);
|
||||
gfx_shader_resolve_relative(menu->shader, g_settings.video.shader_path);
|
||||
gfx_shader_resolve_parameters(conf, menu->shader);
|
||||
}
|
||||
config_file_free(conf);
|
||||
}
|
||||
}
|
||||
else if (strcmp(ext, "glsl") == 0 || strcmp(ext, "cg") == 0)
|
||||
{
|
||||
struct gfx_shader *shader = (struct gfx_shader*)rgui->shader;
|
||||
struct gfx_shader *shader = (struct gfx_shader*)menu->shader;
|
||||
|
||||
strlcpy(shader->pass[0].source.path, g_settings.video.shader_path,
|
||||
sizeof(shader->pass[0].source.path));
|
||||
@ -2732,21 +2732,21 @@ static void menu_common_shader_manager_init(void *data)
|
||||
const char *shader_dir = *g_settings.video.shader_dir ?
|
||||
g_settings.video.shader_dir : g_settings.system_directory;
|
||||
|
||||
fill_pathname_join(cgp_path, shader_dir, "rgui.glslp", sizeof(cgp_path));
|
||||
fill_pathname_join(cgp_path, shader_dir, "menu.glslp", sizeof(cgp_path));
|
||||
conf = config_file_new(cgp_path);
|
||||
|
||||
if (!conf)
|
||||
{
|
||||
fill_pathname_join(cgp_path, shader_dir, "rgui.cgp", sizeof(cgp_path));
|
||||
fill_pathname_join(cgp_path, shader_dir, "menu.cgp", sizeof(cgp_path));
|
||||
conf = config_file_new(cgp_path);
|
||||
}
|
||||
|
||||
if (conf)
|
||||
{
|
||||
if (gfx_shader_read_conf_cgp(conf, rgui->shader))
|
||||
if (gfx_shader_read_conf_cgp(conf, menu->shader))
|
||||
{
|
||||
gfx_shader_resolve_relative(rgui->shader, cgp_path);
|
||||
gfx_shader_resolve_parameters(conf, rgui->shader);
|
||||
gfx_shader_resolve_relative(menu->shader, cgp_path);
|
||||
gfx_shader_resolve_parameters(conf, menu->shader);
|
||||
}
|
||||
config_file_free(conf);
|
||||
}
|
||||
@ -2807,7 +2807,7 @@ static void menu_common_shader_manager_get_str(void *data, char *type_str, size_
|
||||
*type_str = '\0';
|
||||
else if (type >= MENU_SETTINGS_SHADER_PARAMETER_0 && type <= MENU_SETTINGS_SHADER_PARAMETER_LAST)
|
||||
{
|
||||
// rgui->parameter_shader here.
|
||||
// menu->parameter_shader here.
|
||||
if (shader)
|
||||
{
|
||||
const struct gfx_shader_parameter *param = (const struct gfx_shader_parameter*)&shader->parameters[type - MENU_SETTINGS_SHADER_PARAMETER_0];
|
||||
@ -2911,7 +2911,7 @@ static void menu_common_shader_manager_save_preset(const char *basename, bool ap
|
||||
char cgp_path[PATH_MAX];
|
||||
const char *dirs[] = {
|
||||
g_settings.video.shader_dir,
|
||||
g_settings.rgui_config_directory,
|
||||
g_settings.menu_config_directory,
|
||||
config_directory,
|
||||
};
|
||||
|
||||
@ -3212,7 +3212,7 @@ static int menu_common_core_setting_toggle(unsigned setting, unsigned action)
|
||||
#ifdef GEKKO
|
||||
#define MAX_GAMMA_SETTING 2
|
||||
|
||||
static unsigned rgui_gx_resolutions[GX_RESOLUTIONS_LAST][2] = {
|
||||
static unsigned menu_gx_resolutions[GX_RESOLUTIONS_LAST][2] = {
|
||||
{ 512, 192 },
|
||||
{ 598, 200 },
|
||||
{ 640, 200 },
|
||||
@ -3253,7 +3253,7 @@ static unsigned rgui_gx_resolutions[GX_RESOLUTIONS_LAST][2] = {
|
||||
{ 640, 480 },
|
||||
};
|
||||
|
||||
static unsigned rgui_current_gx_resolution = GX_RESOLUTIONS_640_480;
|
||||
static unsigned menu_current_gx_resolution = GX_RESOLUTIONS_640_480;
|
||||
#else
|
||||
#define MAX_GAMMA_SETTING 1
|
||||
#endif
|
||||
@ -4117,7 +4117,7 @@ static int menu_common_setting_set(unsigned setting, unsigned action)
|
||||
break;
|
||||
case MENU_BROWSER_DIR_PATH:
|
||||
if (action == MENU_ACTION_START)
|
||||
*g_settings.rgui_content_directory = '\0';
|
||||
*g_settings.menu_content_directory = '\0';
|
||||
break;
|
||||
case MENU_CONTENT_DIR_PATH:
|
||||
if (action == MENU_ACTION_START)
|
||||
@ -4165,7 +4165,7 @@ static int menu_common_setting_set(unsigned setting, unsigned action)
|
||||
break;
|
||||
case MENU_CONFIG_DIR_PATH:
|
||||
if (action == MENU_ACTION_START)
|
||||
*g_settings.rgui_config_directory = '\0';
|
||||
*g_settings.menu_config_directory = '\0';
|
||||
break;
|
||||
case MENU_FILTER_DIR_PATH:
|
||||
if (action == MENU_ACTION_START)
|
||||
@ -4350,27 +4350,27 @@ static int menu_common_setting_set(unsigned setting, unsigned action)
|
||||
case MENU_SETTINGS_VIDEO_RESOLUTION:
|
||||
if (action == MENU_ACTION_LEFT)
|
||||
{
|
||||
if (rgui_current_gx_resolution > 0)
|
||||
rgui_current_gx_resolution--;
|
||||
if (menu_current_gx_resolution > 0)
|
||||
menu_current_gx_resolution--;
|
||||
}
|
||||
else if (action == MENU_ACTION_RIGHT)
|
||||
{
|
||||
if (rgui_current_gx_resolution < GX_RESOLUTIONS_LAST - 1)
|
||||
if (menu_current_gx_resolution < GX_RESOLUTIONS_LAST - 1)
|
||||
{
|
||||
#ifdef HW_RVL
|
||||
if ((rgui_current_gx_resolution + 1) > GX_RESOLUTIONS_640_480)
|
||||
if ((menu_current_gx_resolution + 1) > GX_RESOLUTIONS_640_480)
|
||||
if (CONF_GetVideo() != CONF_VIDEO_PAL)
|
||||
return 0;
|
||||
#endif
|
||||
|
||||
rgui_current_gx_resolution++;
|
||||
menu_current_gx_resolution++;
|
||||
}
|
||||
}
|
||||
else if (action == MENU_ACTION_OK)
|
||||
{
|
||||
if (driver.video_data)
|
||||
gx_set_video_mode(driver.video_data, rgui_gx_resolutions[rgui_current_gx_resolution][0],
|
||||
rgui_gx_resolutions[rgui_current_gx_resolution][1]);
|
||||
gx_set_video_mode(driver.video_data, menu_gx_resolutions[menu_current_gx_resolution][0],
|
||||
menu_gx_resolutions[menu_current_gx_resolution][1]);
|
||||
}
|
||||
break;
|
||||
#elif defined(__CELLOS_LV2__)
|
||||
@ -5187,7 +5187,7 @@ static void menu_common_setting_set_label(char *type_str, size_t type_str_size,
|
||||
snprintf(type_str, type_str_size, (g_settings.fps_show) ? "ON" : "OFF");
|
||||
break;
|
||||
case MENU_BROWSER_DIR_PATH:
|
||||
strlcpy(type_str, *g_settings.rgui_content_directory ? g_settings.rgui_content_directory : "<default>", type_str_size);
|
||||
strlcpy(type_str, *g_settings.menu_content_directory ? g_settings.menu_content_directory : "<default>", type_str_size);
|
||||
break;
|
||||
case MENU_CONTENT_DIR_PATH:
|
||||
strlcpy(type_str, *g_settings.content_directory ? g_settings.content_directory : "<default>", type_str_size);
|
||||
@ -5218,7 +5218,7 @@ static void menu_common_setting_set_label(char *type_str, size_t type_str_size,
|
||||
strlcpy(type_str, *g_settings.libretro_info_path ? g_settings.libretro_info_path : "<Core dir>", type_str_size);
|
||||
break;
|
||||
case MENU_CONFIG_DIR_PATH:
|
||||
strlcpy(type_str, *g_settings.rgui_config_directory ? g_settings.rgui_config_directory : "<default>", type_str_size);
|
||||
strlcpy(type_str, *g_settings.menu_config_directory ? g_settings.menu_config_directory : "<default>", type_str_size);
|
||||
break;
|
||||
case MENU_FILTER_DIR_PATH:
|
||||
strlcpy(type_str, *g_settings.video.filter_dir ? g_settings.video.filter_dir : "<default>", type_str_size);
|
||||
|
@ -193,7 +193,7 @@ typedef enum
|
||||
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;
|
||||
} menu_settings_t;
|
||||
|
||||
#ifdef GEKKO
|
||||
enum
|
||||
|
@ -773,10 +773,10 @@ static void lakka_context_reset(void *data)
|
||||
{
|
||||
int i, j, k;
|
||||
char path[256], dirpath[256];;
|
||||
rgui_handle_t *rgui = (rgui_handle_t*)data;
|
||||
menu_handle_t *menu = (menu_handle_t*)data;
|
||||
gl_t *gl = (gl_t*)driver.video_data;
|
||||
|
||||
if (!rgui)
|
||||
if (!menu)
|
||||
return;
|
||||
|
||||
gl_font_init_first(&font_driver, &font, gl,
|
||||
@ -811,7 +811,7 @@ static void lakka_context_reset(void *data)
|
||||
fill_pathname_join(dirpath, g_settings.assets_directory, "lakka", sizeof(dirpath));
|
||||
fill_pathname_slash(dirpath, sizeof(dirpath));
|
||||
|
||||
info_list = (core_info_list_t*)rgui->core_info;
|
||||
info_list = (core_info_list_t*)menu->core_info;
|
||||
info = NULL;
|
||||
|
||||
if (info_list)
|
||||
@ -935,10 +935,10 @@ static void lakka_init_items(int i, menu_category_t *category, core_info_t *info
|
||||
|
||||
static void lakka_free(void *data)
|
||||
{
|
||||
rgui_handle_t *rgui = (rgui_handle_t*)data;
|
||||
menu_handle_t *menu = (menu_handle_t*)data;
|
||||
|
||||
if (rgui->alloc_font)
|
||||
free((uint8_t*)rgui->font);
|
||||
if (menu->alloc_font)
|
||||
free((uint8_t*)menu->font);
|
||||
}
|
||||
|
||||
static int lakka_input_postprocess(uint64_t old_state)
|
||||
@ -961,29 +961,29 @@ static int lakka_input_postprocess(uint64_t old_state)
|
||||
static void lakka_init_core_info(void *data)
|
||||
{
|
||||
core_info_list_t *core;
|
||||
rgui_handle_t *rgui = (rgui_handle_t*)data;
|
||||
menu_handle_t *menu = (menu_handle_t*)data;
|
||||
|
||||
core_info_list_free(rgui->core_info);
|
||||
rgui->core_info = NULL;
|
||||
core_info_list_free(menu->core_info);
|
||||
menu->core_info = NULL;
|
||||
|
||||
rgui->core_info = (core_info_list_t*)core_info_list_new(*g_settings.libretro_directory ? g_settings.libretro_directory : "/usr/lib/libretro");
|
||||
menu->core_info = (core_info_list_t*)core_info_list_new(*g_settings.libretro_directory ? g_settings.libretro_directory : "/usr/lib/libretro");
|
||||
|
||||
if (rgui->core_info)
|
||||
if (menu->core_info)
|
||||
{
|
||||
core = (core_info_list_t*)rgui->core_info;
|
||||
num_categories = rgui->core_info ? core->count + 1 : 1;
|
||||
core = (core_info_list_t*)menu->core_info;
|
||||
num_categories = menu->core_info ? core->count + 1 : 1;
|
||||
}
|
||||
}
|
||||
|
||||
static void *lakka_init(void)
|
||||
{
|
||||
int i, j;
|
||||
rgui_handle_t *rgui = (rgui_handle_t*)calloc(1, sizeof(*rgui));
|
||||
menu_handle_t *menu = (menu_handle_t*)calloc(1, sizeof(*menu));
|
||||
gl_t *gl = (gl_t*)driver.video_data;
|
||||
if (!rgui || !gl)
|
||||
if (!menu || !gl)
|
||||
return NULL;
|
||||
|
||||
lakka_init_core_info(rgui);
|
||||
lakka_init_core_info(menu);
|
||||
categories = (menu_category_t*)calloc(num_categories, sizeof(menu_category_t));
|
||||
|
||||
lakka_init_settings();
|
||||
@ -994,7 +994,7 @@ static void *lakka_init(void)
|
||||
core_info_list_t *info_list;
|
||||
menu_category_t *category = (menu_category_t*)&categories[i];
|
||||
|
||||
info_list = (core_info_list_t*)rgui->core_info;
|
||||
info_list = (core_info_list_t*)menu->core_info;
|
||||
info = NULL;
|
||||
|
||||
if (info_list)
|
||||
@ -1011,7 +1011,7 @@ static void *lakka_init(void)
|
||||
lakka_init_items(i, category, info, g_settings.content_directory);
|
||||
}
|
||||
|
||||
return rgui;
|
||||
return menu;
|
||||
}
|
||||
|
||||
const menu_ctx_driver_t menu_ctx_lakka = {
|
||||
|
@ -141,11 +141,11 @@ static void blit_line(int x, int y, const char *message, bool green)
|
||||
}
|
||||
}
|
||||
|
||||
static void init_font(rgui_handle_t *rgui, const uint8_t *font_bmp_buf)
|
||||
static void init_font(menu_handle_t *menu, const uint8_t *font_bmp_buf)
|
||||
{
|
||||
unsigned i;
|
||||
uint8_t *font = (uint8_t *) calloc(1, FONT_OFFSET(256));
|
||||
rgui->alloc_font = true;
|
||||
menu->alloc_font = true;
|
||||
for (i = 0; i < 256; i++)
|
||||
{
|
||||
unsigned y = i / 16;
|
||||
@ -154,21 +154,21 @@ static void init_font(rgui_handle_t *rgui, const uint8_t *font_bmp_buf)
|
||||
font_bmp_buf + 54 + 3 * (256 * (255 - 16 * y) + 16 * x));
|
||||
}
|
||||
|
||||
rgui->font = font;
|
||||
menu->font = font;
|
||||
}
|
||||
|
||||
static bool rguidisp_init_font(void *data)
|
||||
{
|
||||
rgui_handle_t *rgui = (rgui_handle_t*)data;
|
||||
menu_handle_t *menu = (menu_handle_t*)data;
|
||||
|
||||
const uint8_t *font_bmp_buf = NULL;
|
||||
const uint8_t *font_bin_buf = bitmap_bin;
|
||||
bool ret = true;
|
||||
|
||||
if (font_bmp_buf)
|
||||
init_font(rgui, font_bmp_buf);
|
||||
init_font(menu, font_bmp_buf);
|
||||
else if (font_bin_buf)
|
||||
rgui->font = font_bin_buf;
|
||||
menu->font = font_bin_buf;
|
||||
else
|
||||
ret = false;
|
||||
|
||||
@ -592,19 +592,19 @@ static void *rgui_init(void)
|
||||
uint16_t *framebuf = menu_framebuf;
|
||||
size_t framebuf_pitch;
|
||||
|
||||
rgui_handle_t *rgui = (rgui_handle_t*)calloc(1, sizeof(*rgui));
|
||||
menu_handle_t *menu = (menu_handle_t*)calloc(1, sizeof(*menu));
|
||||
|
||||
if (!rgui)
|
||||
if (!menu)
|
||||
return NULL;
|
||||
|
||||
rgui->frame_buf = framebuf;
|
||||
rgui->width = 320;
|
||||
rgui->height = 240;
|
||||
framebuf_pitch = rgui->width * sizeof(uint16_t);
|
||||
menu->frame_buf = framebuf;
|
||||
menu->width = 320;
|
||||
menu->height = 240;
|
||||
framebuf_pitch = menu->width * sizeof(uint16_t);
|
||||
|
||||
rgui->frame_buf_pitch = framebuf_pitch;
|
||||
menu->frame_buf_pitch = framebuf_pitch;
|
||||
|
||||
bool ret = rguidisp_init_font(rgui);
|
||||
bool ret = rguidisp_init_font(menu);
|
||||
|
||||
if (!ret)
|
||||
{
|
||||
@ -615,15 +615,15 @@ static void *rgui_init(void)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return rgui;
|
||||
return menu;
|
||||
}
|
||||
|
||||
static void rgui_free(void *data)
|
||||
{
|
||||
rgui_handle_t *rgui = (rgui_handle_t*)data;
|
||||
menu_handle_t *menu = (menu_handle_t*)data;
|
||||
|
||||
if (rgui->alloc_font)
|
||||
free((uint8_t*)rgui->font);
|
||||
if (menu->alloc_font)
|
||||
free((uint8_t*)menu->font);
|
||||
}
|
||||
|
||||
static int rgui_input_postprocess(uint64_t old_state)
|
||||
@ -645,21 +645,21 @@ static int rgui_input_postprocess(uint64_t old_state)
|
||||
|
||||
void rgui_set_texture(void *data)
|
||||
{
|
||||
rgui_handle_t *rgui = (rgui_handle_t*)data;
|
||||
menu_handle_t *menu = (menu_handle_t*)data;
|
||||
|
||||
if (driver.video_data && driver.video_poke && driver.video_poke->set_texture_frame)
|
||||
driver.video_poke->set_texture_frame(driver.video_data, menu_framebuf,
|
||||
false, rgui->width, rgui->height, 1.0f);
|
||||
false, menu->width, menu->height, 1.0f);
|
||||
}
|
||||
|
||||
static void rgui_init_core_info(void *data)
|
||||
{
|
||||
rgui_handle_t *rgui = (rgui_handle_t*)data;
|
||||
menu_handle_t *menu = (menu_handle_t*)data;
|
||||
|
||||
core_info_list_free(rgui->core_info);
|
||||
rgui->core_info = NULL;
|
||||
core_info_list_free(menu->core_info);
|
||||
menu->core_info = NULL;
|
||||
if (*g_settings.libretro_directory)
|
||||
rgui->core_info = core_info_list_new(g_settings.libretro_directory);
|
||||
menu->core_info = core_info_list_new(g_settings.libretro_directory);
|
||||
}
|
||||
|
||||
const menu_ctx_driver_t menu_ctx_rgui = {
|
||||
|
@ -118,9 +118,9 @@ static void rmenu_render(void)
|
||||
{
|
||||
size_t begin, end;
|
||||
struct font_params font_parms;
|
||||
rgui_handle_t *rgui = (rgui_handle_t*)driver.menu;
|
||||
menu_handle_t *menu = (menu_handle_t*)driver.menu;
|
||||
|
||||
if (!rgui)
|
||||
if (!menu)
|
||||
return;
|
||||
|
||||
if (!render_normal)
|
||||
@ -129,18 +129,18 @@ static void rmenu_render(void)
|
||||
return;
|
||||
}
|
||||
|
||||
if (rgui->need_refresh &&
|
||||
if (menu->need_refresh &&
|
||||
(g_extern.lifecycle_state & (1ULL << MODE_MENU))
|
||||
&& !rgui->msg_force)
|
||||
&& !menu->msg_force)
|
||||
return;
|
||||
|
||||
if (!rgui->selection_buf)
|
||||
if (!menu->selection_buf)
|
||||
return;
|
||||
|
||||
begin = (rgui->selection_ptr >= (ENTRIES_HEIGHT / 2)) ? (rgui->selection_ptr - (ENTRIES_HEIGHT / 2)) : 0;
|
||||
end = ((rgui->selection_ptr + ENTRIES_HEIGHT) <= file_list_get_size(rgui->selection_buf)) ? rgui->selection_ptr + ENTRIES_HEIGHT : file_list_get_size(rgui->selection_buf);
|
||||
begin = (menu->selection_ptr >= (ENTRIES_HEIGHT / 2)) ? (menu->selection_ptr - (ENTRIES_HEIGHT / 2)) : 0;
|
||||
end = ((menu->selection_ptr + ENTRIES_HEIGHT) <= file_list_get_size(menu->selection_buf)) ? menu->selection_ptr + ENTRIES_HEIGHT : file_list_get_size(menu->selection_buf);
|
||||
|
||||
if (file_list_get_size(rgui->selection_buf) <= ENTRIES_HEIGHT)
|
||||
if (file_list_get_size(menu->selection_buf) <= ENTRIES_HEIGHT)
|
||||
begin = 0;
|
||||
|
||||
if (end - begin > ENTRIES_HEIGHT)
|
||||
@ -152,7 +152,7 @@ static void rmenu_render(void)
|
||||
const char *dir = NULL;
|
||||
unsigned menu_type = 0;
|
||||
unsigned menu_type_is = 0;
|
||||
file_list_get_last(rgui->menu_stack, &dir, &menu_type);
|
||||
file_list_get_last(menu->menu_stack, &dir, &menu_type);
|
||||
|
||||
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);
|
||||
@ -267,11 +267,11 @@ static void rmenu_render(void)
|
||||
snprintf(title, sizeof(title), "ASSETS DIR %s", dir);
|
||||
else
|
||||
{
|
||||
if (rgui->defer_core)
|
||||
if (menu->defer_core)
|
||||
snprintf(title, sizeof(title), "CONTENT %s", dir);
|
||||
else
|
||||
{
|
||||
const char *core_name = rgui->info.library_name;
|
||||
const char *core_name = menu->info.library_name;
|
||||
if (!core_name)
|
||||
core_name = g_extern.system.info.library_name;
|
||||
if (!core_name)
|
||||
@ -292,13 +292,13 @@ static void rmenu_render(void)
|
||||
driver.video_poke->set_osd_msg(driver.video_data, title_buf, &font_parms);
|
||||
|
||||
char title_msg[64];
|
||||
const char *core_name = rgui->info.library_name;
|
||||
const char *core_name = menu->info.library_name;
|
||||
if (!core_name)
|
||||
core_name = g_extern.system.info.library_name;
|
||||
if (!core_name)
|
||||
core_name = "No Core";
|
||||
|
||||
const char *core_version = rgui->info.library_version;
|
||||
const char *core_version = menu->info.library_version;
|
||||
if (!core_version)
|
||||
core_version = g_extern.system.info.library_version;
|
||||
if (!core_version)
|
||||
@ -322,7 +322,7 @@ static void rmenu_render(void)
|
||||
{
|
||||
const char *path = 0;
|
||||
unsigned type = 0;
|
||||
file_list_get_at_offset(rgui->selection_buf, i, &path, &type);
|
||||
file_list_get_at_offset(menu->selection_buf, i, &path, &type);
|
||||
char message[256];
|
||||
char type_str[256];
|
||||
|
||||
@ -352,9 +352,9 @@ static void rmenu_render(void)
|
||||
else if (driver.menu_ctx && driver.menu_ctx->backend && driver.menu_ctx->backend->shader_manager_get_str)
|
||||
{
|
||||
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);
|
||||
driver.menu_ctx->backend->shader_manager_get_str(menu->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);
|
||||
driver.menu_ctx->backend->shader_manager_get_str(menu->shader, type_str, sizeof(type_str), type);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -365,7 +365,7 @@ static void rmenu_render(void)
|
||||
if (type == MENU_FILE_PLAIN)
|
||||
{
|
||||
strlcpy(type_str, "(CORE)", sizeof(type_str));
|
||||
file_list_get_alt_at_offset(rgui->selection_buf, i, &path);
|
||||
file_list_get_alt_at_offset(menu->selection_buf, i, &path);
|
||||
w = 6;
|
||||
}
|
||||
else
|
||||
@ -415,7 +415,7 @@ static void rmenu_render(void)
|
||||
|
||||
char entry_title_buf[256];
|
||||
char type_str_buf[64];
|
||||
bool selected = i == rgui->selection_ptr;
|
||||
bool selected = i == menu->selection_ptr;
|
||||
|
||||
strlcpy(entry_title_buf, path, sizeof(entry_title_buf));
|
||||
strlcpy(type_str_buf, type_str, sizeof(type_str_buf));
|
||||
@ -427,7 +427,7 @@ static void rmenu_render(void)
|
||||
|
||||
snprintf(message, sizeof(message), "%c %s", selected ? '>' : ' ', entry_title_buf);
|
||||
|
||||
//blit_line(rgui, x, y, message, selected);
|
||||
//blit_line(menu, x, y, message, selected);
|
||||
font_parms.x = POSITION_EDGE_MIN + POSITION_OFFSET;
|
||||
font_parms.y = POSITION_EDGE_MIN + POSITION_RENDER_OFFSET + (POSITION_OFFSET * j);
|
||||
font_parms.scale = FONT_SIZE_NORMAL;
|
||||
@ -445,7 +445,7 @@ static void rmenu_render(void)
|
||||
|
||||
void rmenu_set_texture(void *data)
|
||||
{
|
||||
rgui_handle_t *rgui = (rgui_handle_t*)data;
|
||||
menu_handle_t *menu = (menu_handle_t*)data;
|
||||
|
||||
if (menu_texture_inited)
|
||||
return;
|
||||
@ -453,34 +453,34 @@ void rmenu_set_texture(void *data)
|
||||
if (driver.video_data && driver.video_poke && driver.video_poke->set_texture_enable && menu_texture && menu_texture->pixels)
|
||||
{
|
||||
driver.video_poke->set_texture_frame(driver.video_data, menu_texture->pixels,
|
||||
true, rgui->width, rgui->height, 1.0f);
|
||||
true, menu->width, menu->height, 1.0f);
|
||||
menu_texture_inited = true;
|
||||
}
|
||||
}
|
||||
|
||||
static void rmenu_context_reset(void *data)
|
||||
{
|
||||
rgui_handle_t *rgui = (rgui_handle_t*)data;
|
||||
menu_handle_t *menu = (menu_handle_t*)data;
|
||||
|
||||
if (!rgui)
|
||||
if (!menu)
|
||||
return;
|
||||
|
||||
texture_image_load(driver.video_data, g_extern.menu_texture_path, menu_texture);
|
||||
rgui->width = menu_texture->width;
|
||||
rgui->height = menu_texture->height;
|
||||
menu->width = menu_texture->width;
|
||||
menu->height = menu_texture->height;
|
||||
|
||||
menu_texture_inited = false;
|
||||
}
|
||||
|
||||
static void *rmenu_init(void)
|
||||
{
|
||||
rgui_handle_t *rgui = (rgui_handle_t*)calloc(1, sizeof(*rgui));
|
||||
menu_handle_t *menu = (menu_handle_t*)calloc(1, sizeof(*menu));
|
||||
|
||||
if (!rgui)
|
||||
if (!menu)
|
||||
return NULL;
|
||||
|
||||
menu_texture = (struct texture_image*)calloc(1, sizeof(*menu_texture));
|
||||
return rgui;
|
||||
return menu;
|
||||
}
|
||||
|
||||
static void rmenu_context_destroy(void *data)
|
||||
@ -494,10 +494,10 @@ static void rmenu_free(void *data)
|
||||
|
||||
static int rmenu_input_postprocess(uint64_t old_state)
|
||||
{
|
||||
rgui_handle_t *rgui = (rgui_handle_t*)driver.menu;
|
||||
menu_handle_t *menu = (menu_handle_t*)driver.menu;
|
||||
int ret = 0;
|
||||
|
||||
if ((rgui->trigger_state & (1ULL << RARCH_MENU_TOGGLE)) &&
|
||||
if ((menu->trigger_state & (1ULL << RARCH_MENU_TOGGLE)) &&
|
||||
g_extern.main_is_init &&
|
||||
!g_extern.libretro_dummy)
|
||||
{
|
||||
@ -510,12 +510,12 @@ static int rmenu_input_postprocess(uint64_t old_state)
|
||||
|
||||
static void rmenu_init_core_info(void *data)
|
||||
{
|
||||
rgui_handle_t *rgui = (rgui_handle_t*)data;
|
||||
menu_handle_t *menu = (menu_handle_t*)data;
|
||||
|
||||
core_info_list_free(rgui->core_info);
|
||||
rgui->core_info = NULL;
|
||||
core_info_list_free(menu->core_info);
|
||||
menu->core_info = NULL;
|
||||
if (*g_settings.libretro_directory)
|
||||
rgui->core_info = core_info_list_new(g_settings.libretro_directory);
|
||||
menu->core_info = core_info_list_new(g_settings.libretro_directory);
|
||||
}
|
||||
|
||||
const menu_ctx_driver_t menu_ctx_rmenu = {
|
||||
|
@ -155,9 +155,9 @@ static void* rmenu_xui_init(void)
|
||||
HRESULT hr;
|
||||
TypefaceDescriptor typeface = {0};
|
||||
|
||||
rgui_handle_t *rgui = (rgui_handle_t*)calloc(1, sizeof(*rgui));
|
||||
menu_handle_t *menu = (menu_handle_t*)calloc(1, sizeof(*menu));
|
||||
|
||||
if (!rgui)
|
||||
if (!menu)
|
||||
return NULL;
|
||||
|
||||
d3d_video_t *d3d= (d3d_video_t*)driver.video_data;
|
||||
@ -227,10 +227,10 @@ static void* rmenu_xui_init(void)
|
||||
|
||||
xui_msg_queue = msg_queue_new(16);
|
||||
|
||||
return rgui;
|
||||
return menu;
|
||||
|
||||
error:
|
||||
free(rgui);
|
||||
free(menu);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -668,20 +668,20 @@ static void rmenu_xui_render(void)
|
||||
|
||||
static void rmenu_xui_populate_entries(void *data, unsigned i)
|
||||
{
|
||||
rgui_handle_t *rgui = (rgui_handle_t*)data;
|
||||
XuiListSetCurSelVisible(m_menulist, rgui->selection_ptr);
|
||||
menu_handle_t *menu = (menu_handle_t*)data;
|
||||
XuiListSetCurSelVisible(m_menulist, menu->selection_ptr);
|
||||
}
|
||||
|
||||
static void rmenu_xui_navigation_clear(void *data)
|
||||
{
|
||||
rgui_handle_t *rgui = (rgui_handle_t*)data;
|
||||
XuiListSetCurSelVisible(m_menulist, rgui->selection_ptr);
|
||||
menu_handle_t *menu = (menu_handle_t*)data;
|
||||
XuiListSetCurSelVisible(m_menulist, menu->selection_ptr);
|
||||
}
|
||||
|
||||
static void rmenu_xui_navigation_set_visible(void *data)
|
||||
{
|
||||
rgui_handle_t *rgui = (rgui_handle_t*)data;
|
||||
XuiListSetCurSelVisible(m_menulist, rgui->selection_ptr);
|
||||
menu_handle_t *menu = (menu_handle_t*)data;
|
||||
XuiListSetCurSelVisible(m_menulist, menu->selection_ptr);
|
||||
}
|
||||
|
||||
static void rmenu_xui_navigation_alphabet(void *data, size_t *ptr_out)
|
||||
@ -722,12 +722,12 @@ static void rmenu_xui_list_set_selection(void *data)
|
||||
|
||||
static void rmenu_xui_init_core_info(void *data)
|
||||
{
|
||||
rgui_handle_t *rgui = (rgui_handle_t*)data;
|
||||
menu_handle_t *menu = (menu_handle_t*)data;
|
||||
|
||||
core_info_list_free(rgui->core_info);
|
||||
rgui->core_info = NULL;
|
||||
core_info_list_free(menu->core_info);
|
||||
menu->core_info = NULL;
|
||||
if (*g_settings.libretro_directory)
|
||||
rgui->core_info = core_info_list_new(g_settings.libretro_directory);
|
||||
menu->core_info = core_info_list_new(g_settings.libretro_directory);
|
||||
}
|
||||
|
||||
const menu_ctx_driver_t menu_ctx_rmenu_xui = {
|
||||
|
@ -18,20 +18,20 @@
|
||||
|
||||
void menu_update_system_info(void *data, bool *load_no_rom)
|
||||
{
|
||||
rgui_handle_t *rgui = (rgui_handle_t*)data;
|
||||
menu_handle_t *menu = (menu_handle_t*)data;
|
||||
|
||||
#ifdef HAVE_DYNAMIC
|
||||
libretro_free_system_info(&rgui->info);
|
||||
libretro_free_system_info(&menu->info);
|
||||
if (*g_settings.libretro)
|
||||
{
|
||||
libretro_get_system_info(g_settings.libretro, &rgui->info, load_no_rom);
|
||||
libretro_get_system_info(g_settings.libretro, &menu->info, load_no_rom);
|
||||
#endif
|
||||
// Keep track of info for the currently selected core.
|
||||
if (rgui->core_info)
|
||||
if (menu->core_info)
|
||||
{
|
||||
if (core_info_list_get_info(rgui->core_info, rgui->core_info_current, g_settings.libretro))
|
||||
if (core_info_list_get_info(menu->core_info, menu->core_info_current, g_settings.libretro))
|
||||
{
|
||||
const core_info_t *info = (const core_info_t*)rgui->core_info_current;
|
||||
const core_info_t *info = (const core_info_t*)menu->core_info_current;
|
||||
|
||||
RARCH_LOG("[Core Info]:\n");
|
||||
if (info->display_name)
|
||||
@ -185,15 +185,15 @@ void load_menu_game_history(unsigned game_index)
|
||||
|
||||
static void menu_init_history(void *data)
|
||||
{
|
||||
rgui_handle_t *rgui = (rgui_handle_t*)data;
|
||||
menu_handle_t *menu = (menu_handle_t*)data;
|
||||
|
||||
if (!rgui)
|
||||
if (!menu)
|
||||
return;
|
||||
|
||||
if (rgui->history)
|
||||
if (menu->history)
|
||||
{
|
||||
rom_history_free(rgui->history);
|
||||
rgui->history = NULL;
|
||||
rom_history_free(menu->history);
|
||||
menu->history = NULL;
|
||||
}
|
||||
|
||||
if (*g_extern.config_path)
|
||||
@ -208,27 +208,27 @@ static void menu_init_history(void *data)
|
||||
}
|
||||
|
||||
RARCH_LOG("[Menu]: Opening history: %s.\n", history_path);
|
||||
rgui->history = rom_history_init(history_path, g_settings.game_history_size);
|
||||
menu->history = rom_history_init(history_path, g_settings.game_history_size);
|
||||
}
|
||||
}
|
||||
|
||||
static void menu_update_libretro_info(void *data)
|
||||
{
|
||||
rgui_handle_t *rgui = (rgui_handle_t*)data;
|
||||
menu_handle_t *menu = (menu_handle_t*)data;
|
||||
|
||||
if (!rgui)
|
||||
if (!menu)
|
||||
return;
|
||||
|
||||
#ifndef HAVE_DYNAMIC
|
||||
retro_get_system_info(&rgui->info);
|
||||
retro_get_system_info(&menu->info);
|
||||
#endif
|
||||
|
||||
core_info_list_free(rgui->core_info);
|
||||
rgui->core_info = NULL;
|
||||
core_info_list_free(menu->core_info);
|
||||
menu->core_info = NULL;
|
||||
if (*g_settings.libretro_directory)
|
||||
rgui->core_info = core_info_list_new(g_settings.libretro_directory);
|
||||
menu->core_info = core_info_list_new(g_settings.libretro_directory);
|
||||
|
||||
menu_update_system_info(rgui, NULL);
|
||||
menu_update_system_info(menu, NULL);
|
||||
}
|
||||
|
||||
void load_menu_game_prepare_dummy(void)
|
||||
@ -306,78 +306,78 @@ bool load_menu_game(void)
|
||||
|
||||
void *menu_init(const void *data)
|
||||
{
|
||||
rgui_handle_t *rgui;
|
||||
menu_handle_t *menu;
|
||||
menu_ctx_driver_t *menu_ctx = (menu_ctx_driver_t*)data;
|
||||
|
||||
if (!menu_ctx)
|
||||
return NULL;
|
||||
|
||||
rgui = (rgui_handle_t*)menu_ctx->init();
|
||||
menu = (menu_handle_t*)menu_ctx->init();
|
||||
|
||||
if (!rgui)
|
||||
if (!menu)
|
||||
return NULL;
|
||||
|
||||
strlcpy(g_settings.menu.driver, menu_ctx->ident, sizeof(g_settings.menu.driver));
|
||||
|
||||
rgui->menu_stack = (file_list_t*)calloc(1, sizeof(file_list_t));
|
||||
rgui->selection_buf = (file_list_t*)calloc(1, sizeof(file_list_t));
|
||||
rgui->core_info_current = (core_info_t*)calloc(1, sizeof(core_info_t));
|
||||
menu->menu_stack = (file_list_t*)calloc(1, sizeof(file_list_t));
|
||||
menu->selection_buf = (file_list_t*)calloc(1, sizeof(file_list_t));
|
||||
menu->core_info_current = (core_info_t*)calloc(1, sizeof(core_info_t));
|
||||
#ifdef HAVE_SHADER_MANAGER
|
||||
rgui->shader = (struct gfx_shader*)calloc(1, sizeof(struct gfx_shader));
|
||||
menu->shader = (struct gfx_shader*)calloc(1, sizeof(struct gfx_shader));
|
||||
#endif
|
||||
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;
|
||||
file_list_push(menu->menu_stack, "", MENU_SETTINGS, 0);
|
||||
menu_clear_navigation(menu);
|
||||
menu->push_start_screen = g_settings.menu_show_start_screen;
|
||||
g_settings.menu_show_start_screen = false;
|
||||
|
||||
if (menu_ctx && menu_ctx->backend && menu_ctx->backend->entries_init)
|
||||
menu_ctx->backend->entries_init(rgui, MENU_SETTINGS);
|
||||
menu_ctx->backend->entries_init(menu, MENU_SETTINGS);
|
||||
|
||||
rgui->trigger_state = 0;
|
||||
rgui->old_input_state = 0;
|
||||
rgui->do_held = false;
|
||||
rgui->frame_buf_show = true;
|
||||
rgui->current_pad = 0;
|
||||
menu->trigger_state = 0;
|
||||
menu->old_input_state = 0;
|
||||
menu->do_held = false;
|
||||
menu->frame_buf_show = true;
|
||||
menu->current_pad = 0;
|
||||
|
||||
menu_update_libretro_info(rgui);
|
||||
menu_update_libretro_info(menu);
|
||||
|
||||
if (menu_ctx && menu_ctx->backend && menu_ctx->backend->shader_manager_init)
|
||||
menu_ctx->backend->shader_manager_init(rgui);
|
||||
menu_ctx->backend->shader_manager_init(menu);
|
||||
|
||||
menu_init_history(rgui);
|
||||
rgui->last_time = rarch_get_time_usec();
|
||||
menu_init_history(menu);
|
||||
menu->last_time = rarch_get_time_usec();
|
||||
|
||||
return rgui;
|
||||
return menu;
|
||||
}
|
||||
|
||||
void menu_free(void *data)
|
||||
{
|
||||
rgui_handle_t *rgui = (rgui_handle_t*)data;
|
||||
menu_handle_t *menu = (menu_handle_t*)data;
|
||||
|
||||
if (!rgui)
|
||||
if (!menu)
|
||||
return;
|
||||
|
||||
#ifdef HAVE_SHADER_MANAGER
|
||||
if (rgui->shader)
|
||||
free(rgui->shader);
|
||||
rgui->shader = NULL;
|
||||
if (menu->shader)
|
||||
free(menu->shader);
|
||||
menu->shader = NULL;
|
||||
#endif
|
||||
|
||||
if (driver.menu_ctx && driver.menu_ctx->free)
|
||||
driver.menu_ctx->free(rgui);
|
||||
driver.menu_ctx->free(menu);
|
||||
|
||||
#ifdef HAVE_DYNAMIC
|
||||
libretro_free_system_info(&rgui->info);
|
||||
libretro_free_system_info(&menu->info);
|
||||
#endif
|
||||
|
||||
file_list_free(rgui->menu_stack);
|
||||
file_list_free(rgui->selection_buf);
|
||||
file_list_free(menu->menu_stack);
|
||||
file_list_free(menu->selection_buf);
|
||||
|
||||
rom_history_free(rgui->history);
|
||||
core_info_list_free(rgui->core_info);
|
||||
rom_history_free(menu->history);
|
||||
core_info_list_free(menu->core_info);
|
||||
|
||||
if (rgui->core_info_current)
|
||||
free(rgui->core_info_current);
|
||||
if (menu->core_info_current)
|
||||
free(menu->core_info_current);
|
||||
|
||||
free(data);
|
||||
}
|
||||
@ -619,8 +619,8 @@ bool menu_save_new_config(void)
|
||||
char config_dir[PATH_MAX];
|
||||
*config_dir = '\0';
|
||||
|
||||
if (*g_settings.rgui_config_directory)
|
||||
strlcpy(config_dir, g_settings.rgui_config_directory, sizeof(config_dir));
|
||||
if (*g_settings.menu_config_directory)
|
||||
strlcpy(config_dir, g_settings.menu_config_directory, sizeof(config_dir));
|
||||
else if (*g_extern.config_path) // Fallback
|
||||
fill_pathname_basedir(config_dir, g_extern.config_path, sizeof(config_dir));
|
||||
else
|
||||
|
@ -71,7 +71,7 @@ typedef enum
|
||||
MENU_SETTINGS,
|
||||
MENU_INFO_SCREEN,
|
||||
MENU_START_SCREEN,
|
||||
} rgui_file_type_t;
|
||||
} menu_file_type_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
@ -90,7 +90,7 @@ typedef enum
|
||||
MENU_ACTION_MAPPING_PREVIOUS,
|
||||
MENU_ACTION_MAPPING_NEXT,
|
||||
MENU_ACTION_NOOP
|
||||
} rgui_action_t;
|
||||
} menu_action_t;
|
||||
|
||||
void menu_poll_bind_get_rested_axes(void *data);
|
||||
void menu_poll_bind_state(void *data);
|
||||
|
@ -30,71 +30,71 @@
|
||||
|
||||
void menu_key_start_line(void *data, const char *label, input_keyboard_line_complete_t cb)
|
||||
{
|
||||
rgui_handle_t *rgui = (rgui_handle_t*)data;
|
||||
menu_handle_t *menu = (menu_handle_t*)data;
|
||||
|
||||
if (!rgui)
|
||||
if (!menu)
|
||||
return;
|
||||
|
||||
rgui->keyboard.display = true;
|
||||
rgui->keyboard.label = label;
|
||||
rgui->keyboard.buffer = input_keyboard_start_line(rgui, cb);
|
||||
menu->keyboard.display = true;
|
||||
menu->keyboard.label = label;
|
||||
menu->keyboard.buffer = input_keyboard_start_line(menu, cb);
|
||||
}
|
||||
|
||||
static void menu_key_end_line(void *data)
|
||||
{
|
||||
rgui_handle_t *rgui = (rgui_handle_t*)data;
|
||||
menu_handle_t *menu = (menu_handle_t*)data;
|
||||
|
||||
if (!rgui)
|
||||
if (!menu)
|
||||
return;
|
||||
|
||||
rgui->keyboard.display = false;
|
||||
rgui->keyboard.label = NULL;
|
||||
rgui->old_input_state = -1ULL; // Avoid triggering states on pressing return.
|
||||
menu->keyboard.display = false;
|
||||
menu->keyboard.label = NULL;
|
||||
menu->old_input_state = -1ULL; // Avoid triggering states on pressing return.
|
||||
}
|
||||
|
||||
static void menu_search_callback(void *userdata, const char *str)
|
||||
{
|
||||
rgui_handle_t *rgui = (rgui_handle_t*)userdata;
|
||||
menu_handle_t *menu = (menu_handle_t*)userdata;
|
||||
|
||||
if (str && *str)
|
||||
file_list_search(rgui->selection_buf, str, &rgui->selection_ptr);
|
||||
menu_key_end_line(rgui);
|
||||
file_list_search(menu->selection_buf, str, &menu->selection_ptr);
|
||||
menu_key_end_line(menu);
|
||||
}
|
||||
|
||||
#ifdef HAVE_NETPLAY
|
||||
void netplay_port_callback(void *userdata, const char *str)
|
||||
{
|
||||
rgui_handle_t *rgui = (rgui_handle_t*)userdata;
|
||||
menu_handle_t *menu = (menu_handle_t*)userdata;
|
||||
|
||||
if (str && *str)
|
||||
g_extern.netplay_port = strtoul(str, NULL, 0);
|
||||
menu_key_end_line(rgui);
|
||||
menu_key_end_line(menu);
|
||||
}
|
||||
|
||||
void netplay_ipaddress_callback(void *userdata, const char *str)
|
||||
{
|
||||
rgui_handle_t *rgui = (rgui_handle_t*)userdata;
|
||||
menu_handle_t *menu = (menu_handle_t*)userdata;
|
||||
|
||||
if (str && *str)
|
||||
strlcpy(g_extern.netplay_server, str, sizeof(g_extern.netplay_server));
|
||||
menu_key_end_line(rgui);
|
||||
menu_key_end_line(menu);
|
||||
}
|
||||
|
||||
void netplay_nickname_callback(void *userdata, const char *str)
|
||||
{
|
||||
rgui_handle_t *rgui = (rgui_handle_t*)userdata;
|
||||
menu_handle_t *menu = (menu_handle_t*)userdata;
|
||||
|
||||
if (str && *str)
|
||||
strlcpy(g_extern.netplay_nick, str, sizeof(g_extern.netplay_nick));
|
||||
menu_key_end_line(rgui);
|
||||
menu_key_end_line(menu);
|
||||
}
|
||||
#endif
|
||||
|
||||
void audio_device_callback(void *userdata, const char *str)
|
||||
{
|
||||
rgui_handle_t *rgui = (rgui_handle_t*)userdata;
|
||||
menu_handle_t *menu = (menu_handle_t*)userdata;
|
||||
|
||||
if (!rgui)
|
||||
if (!menu)
|
||||
{
|
||||
RARCH_ERR("Cannot invoke audio device setting callback, menu handle is not initialized.\n");
|
||||
return;
|
||||
@ -102,15 +102,15 @@ void audio_device_callback(void *userdata, const char *str)
|
||||
|
||||
if (str && *str)
|
||||
strlcpy(g_settings.audio.device, str, sizeof(g_settings.audio.device));
|
||||
menu_key_end_line(rgui);
|
||||
menu_key_end_line(menu);
|
||||
}
|
||||
|
||||
#ifdef HAVE_SHADER_MANAGER
|
||||
void preset_filename_callback(void *userdata, const char *str)
|
||||
{
|
||||
rgui_handle_t *rgui = (rgui_handle_t*)userdata;
|
||||
menu_handle_t *menu = (menu_handle_t*)userdata;
|
||||
|
||||
if (!rgui)
|
||||
if (!menu)
|
||||
{
|
||||
RARCH_ERR("Cannot invoke preset setting callback, menu handle is not initialized.\n");
|
||||
return;
|
||||
@ -118,7 +118,7 @@ void preset_filename_callback(void *userdata, const char *str)
|
||||
|
||||
if (driver.menu_ctx && driver.menu_ctx->backend && driver.menu_ctx->backend->shader_manager_save_preset)
|
||||
driver.menu_ctx->backend->shader_manager_save_preset(str && *str ? str : NULL, false);
|
||||
menu_key_end_line(rgui);
|
||||
menu_key_end_line(menu);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -144,7 +144,7 @@ void menu_key_event(bool down, unsigned keycode, uint32_t character, uint16_t mo
|
||||
|
||||
void menu_poll_bind_state(void *data)
|
||||
{
|
||||
struct rgui_bind_state *state = (struct rgui_bind_state*)data;
|
||||
struct menu_bind_state *state = (struct menu_bind_state*)data;
|
||||
|
||||
if (!state)
|
||||
return;
|
||||
@ -184,7 +184,7 @@ void menu_poll_bind_get_rested_axes(void *data)
|
||||
{
|
||||
unsigned i, a;
|
||||
const rarch_joypad_driver_t *joypad = NULL;
|
||||
struct rgui_bind_state *state = (struct rgui_bind_state*)data;
|
||||
struct menu_bind_state *state = (struct menu_bind_state*)data;
|
||||
|
||||
if (!state)
|
||||
return;
|
||||
@ -203,11 +203,11 @@ void menu_poll_bind_get_rested_axes(void *data)
|
||||
state->axis_state[i].rested_axes[a] = input_joypad_axis_raw(joypad, i, a);
|
||||
}
|
||||
|
||||
static bool menu_poll_find_trigger_pad(struct rgui_bind_state *state, struct rgui_bind_state *new_state, unsigned p)
|
||||
static bool menu_poll_find_trigger_pad(struct menu_bind_state *state, struct menu_bind_state *new_state, unsigned p)
|
||||
{
|
||||
unsigned a, b, h;
|
||||
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];
|
||||
const struct menu_bind_state_port *n = (const struct menu_bind_state_port*)&new_state->state[p];
|
||||
const struct menu_bind_state_port *o = (const struct menu_bind_state_port*)&state->state[p];
|
||||
|
||||
for (b = 0; b < MENU_MAX_BUTTONS; b++)
|
||||
{
|
||||
@ -268,9 +268,9 @@ static bool menu_poll_find_trigger_pad(struct rgui_bind_state *state, struct rgu
|
||||
bool menu_poll_find_trigger(void *data1, void *data2)
|
||||
{
|
||||
unsigned i;
|
||||
struct rgui_bind_state *state, *new_state;
|
||||
state = (struct rgui_bind_state*)data1;
|
||||
new_state = (struct rgui_bind_state*)data2;
|
||||
struct menu_bind_state *state, *new_state;
|
||||
state = (struct menu_bind_state*)data1;
|
||||
new_state = (struct menu_bind_state*)data2;
|
||||
|
||||
if (!state || !new_state)
|
||||
return false;
|
||||
@ -288,16 +288,16 @@ bool menu_poll_find_trigger(void *data1, void *data2)
|
||||
|
||||
bool menu_custom_bind_keyboard_cb(void *data, unsigned code)
|
||||
{
|
||||
rgui_handle_t *rgui = (rgui_handle_t*)data;
|
||||
menu_handle_t *menu = (menu_handle_t*)data;
|
||||
|
||||
if (!rgui)
|
||||
if (!menu)
|
||||
return false;
|
||||
|
||||
rgui->binds.target->key = (enum retro_key)code;
|
||||
rgui->binds.begin++;
|
||||
rgui->binds.target++;
|
||||
rgui->binds.timeout_end = rarch_get_time_usec() + MENU_KEYBOARD_BIND_TIMEOUT_SECONDS * 1000000;
|
||||
return rgui->binds.begin <= rgui->binds.last;
|
||||
menu->binds.target->key = (enum retro_key)code;
|
||||
menu->binds.begin++;
|
||||
menu->binds.target++;
|
||||
menu->binds.timeout_end = rarch_get_time_usec() + MENU_KEYBOARD_BIND_TIMEOUT_SECONDS * 1000000;
|
||||
return menu->binds.begin <= menu->binds.last;
|
||||
}
|
||||
|
||||
uint64_t menu_input(void)
|
||||
|
@ -25,79 +25,79 @@
|
||||
|
||||
void menu_clear_navigation(void *data)
|
||||
{
|
||||
rgui_handle_t *rgui = (rgui_handle_t*)data;
|
||||
rgui->selection_ptr = 0;
|
||||
menu_handle_t *menu = (menu_handle_t*)data;
|
||||
menu->selection_ptr = 0;
|
||||
|
||||
if (driver.menu_ctx && driver.menu_ctx->navigation_clear)
|
||||
driver.menu_ctx->navigation_clear(rgui);
|
||||
driver.menu_ctx->navigation_clear(menu);
|
||||
}
|
||||
|
||||
void menu_decrement_navigation(void *data)
|
||||
{
|
||||
rgui_handle_t *rgui = (rgui_handle_t*)data;
|
||||
rgui->selection_ptr--;
|
||||
menu_handle_t *menu = (menu_handle_t*)data;
|
||||
menu->selection_ptr--;
|
||||
|
||||
if (driver.menu_ctx && driver.menu_ctx->navigation_decrement)
|
||||
driver.menu_ctx->navigation_decrement(rgui);
|
||||
driver.menu_ctx->navigation_decrement(menu);
|
||||
}
|
||||
|
||||
void menu_increment_navigation(void *data)
|
||||
{
|
||||
rgui_handle_t *rgui = (rgui_handle_t*)data;
|
||||
rgui->selection_ptr++;
|
||||
menu_handle_t *menu = (menu_handle_t*)data;
|
||||
menu->selection_ptr++;
|
||||
|
||||
if (driver.menu_ctx && driver.menu_ctx->navigation_increment)
|
||||
driver.menu_ctx->navigation_increment(rgui);
|
||||
driver.menu_ctx->navigation_increment(menu);
|
||||
}
|
||||
|
||||
void menu_set_navigation(void *data, size_t i)
|
||||
{
|
||||
rgui_handle_t *rgui = (rgui_handle_t*)data;
|
||||
rgui->selection_ptr = i;
|
||||
menu_handle_t *menu = (menu_handle_t*)data;
|
||||
menu->selection_ptr = i;
|
||||
|
||||
if (driver.menu_ctx && driver.menu_ctx->navigation_set)
|
||||
driver.menu_ctx->navigation_set(rgui);
|
||||
driver.menu_ctx->navigation_set(menu);
|
||||
}
|
||||
|
||||
void menu_set_navigation_last(void *data)
|
||||
{
|
||||
rgui_handle_t *rgui = (rgui_handle_t*)data;
|
||||
rgui->selection_ptr = file_list_get_size(rgui->selection_buf) - 1;
|
||||
menu_handle_t *menu = (menu_handle_t*)data;
|
||||
menu->selection_ptr = file_list_get_size(menu->selection_buf) - 1;
|
||||
|
||||
if (driver.menu_ctx && driver.menu_ctx->navigation_set_last)
|
||||
driver.menu_ctx->navigation_set_last(rgui);
|
||||
driver.menu_ctx->navigation_set_last(menu);
|
||||
}
|
||||
|
||||
void menu_descend_alphabet(void *data, size_t *ptr_out)
|
||||
{
|
||||
rgui_handle_t *rgui = (rgui_handle_t*)data;
|
||||
if (!rgui->scroll_indices_size)
|
||||
menu_handle_t *menu = (menu_handle_t*)data;
|
||||
if (!menu->scroll_indices_size)
|
||||
return;
|
||||
size_t ptr = *ptr_out;
|
||||
if (ptr == 0)
|
||||
return;
|
||||
size_t i = rgui->scroll_indices_size - 1;
|
||||
while (i && rgui->scroll_indices[i - 1] >= ptr)
|
||||
size_t i = menu->scroll_indices_size - 1;
|
||||
while (i && menu->scroll_indices[i - 1] >= ptr)
|
||||
i--;
|
||||
*ptr_out = rgui->scroll_indices[i - 1];
|
||||
*ptr_out = menu->scroll_indices[i - 1];
|
||||
|
||||
if (driver.menu_ctx && driver.menu_ctx->navigation_descend_alphabet)
|
||||
driver.menu_ctx->navigation_descend_alphabet(rgui, ptr_out);
|
||||
driver.menu_ctx->navigation_descend_alphabet(menu, ptr_out);
|
||||
}
|
||||
|
||||
void menu_ascend_alphabet(void *data, size_t *ptr_out)
|
||||
{
|
||||
rgui_handle_t *rgui = (rgui_handle_t*)data;
|
||||
if (!rgui->scroll_indices_size)
|
||||
menu_handle_t *menu = (menu_handle_t*)data;
|
||||
if (!menu->scroll_indices_size)
|
||||
return;
|
||||
size_t ptr = *ptr_out;
|
||||
if (ptr == rgui->scroll_indices[rgui->scroll_indices_size - 1])
|
||||
if (ptr == menu->scroll_indices[menu->scroll_indices_size - 1])
|
||||
return;
|
||||
size_t i = 0;
|
||||
while (i < rgui->scroll_indices_size - 1 && rgui->scroll_indices[i + 1] <= ptr)
|
||||
while (i < menu->scroll_indices_size - 1 && menu->scroll_indices[i + 1] <= ptr)
|
||||
i++;
|
||||
*ptr_out = rgui->scroll_indices[i + 1];
|
||||
*ptr_out = menu->scroll_indices[i + 1];
|
||||
|
||||
if (driver.menu_ctx && driver.menu_ctx->navigation_descend_alphabet)
|
||||
driver.menu_ctx->navigation_descend_alphabet(rgui, ptr_out);
|
||||
driver.menu_ctx->navigation_descend_alphabet(menu, ptr_out);
|
||||
}
|
||||
|
@ -332,9 +332,9 @@ struct settings
|
||||
char content_directory[PATH_MAX];
|
||||
char assets_directory[PATH_MAX];
|
||||
#if defined(HAVE_MENU)
|
||||
char rgui_content_directory[PATH_MAX];
|
||||
char rgui_config_directory[PATH_MAX];
|
||||
bool rgui_show_start_screen;
|
||||
char menu_content_directory[PATH_MAX];
|
||||
char menu_config_directory[PATH_MAX];
|
||||
bool menu_show_start_screen;
|
||||
#endif
|
||||
bool fps_show;
|
||||
bool load_dummy_on_core_shutdown;
|
||||
|
32
settings.c
32
settings.c
@ -339,7 +339,7 @@ void config_set_defaults(void)
|
||||
g_settings.libretro_log_level = libretro_log_level;
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
g_settings.rgui_show_start_screen = rgui_show_start_screen;
|
||||
g_settings.menu_show_start_screen = menu_show_start_screen;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LOCATION
|
||||
@ -423,8 +423,8 @@ void config_set_defaults(void)
|
||||
*g_settings.audio.filter_dir = '\0';
|
||||
*g_settings.audio.dsp_plugin = '\0';
|
||||
#ifdef HAVE_MENU
|
||||
*g_settings.rgui_content_directory = '\0';
|
||||
*g_settings.rgui_config_directory = '\0';
|
||||
*g_settings.menu_content_directory = '\0';
|
||||
*g_settings.menu_config_directory = '\0';
|
||||
#endif
|
||||
g_settings.core_specific_config = default_core_specific_config;
|
||||
|
||||
@ -526,10 +526,10 @@ static void config_load_core_specific(void)
|
||||
return;
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
if (*g_settings.rgui_config_directory)
|
||||
if (*g_settings.menu_config_directory)
|
||||
{
|
||||
path_resolve_realpath(g_settings.rgui_config_directory, sizeof(g_settings.rgui_config_directory));
|
||||
strlcpy(g_extern.core_specific_config_path, g_settings.rgui_config_directory, sizeof(g_extern.core_specific_config_path));
|
||||
path_resolve_realpath(g_settings.menu_config_directory, sizeof(g_settings.menu_config_directory));
|
||||
strlcpy(g_extern.core_specific_config_path, g_settings.menu_config_directory, sizeof(g_extern.core_specific_config_path));
|
||||
}
|
||||
else
|
||||
#endif
|
||||
@ -1027,13 +1027,13 @@ bool config_load_file(const char *path, bool set_defaults)
|
||||
if (!strcmp(g_settings.assets_directory, "default"))
|
||||
*g_settings.assets_directory = '\0';
|
||||
#ifdef HAVE_MENU
|
||||
CONFIG_GET_PATH(rgui_content_directory, "rgui_browser_directory");
|
||||
if (!strcmp(g_settings.rgui_content_directory, "default"))
|
||||
*g_settings.rgui_content_directory = '\0';
|
||||
CONFIG_GET_PATH(rgui_config_directory, "rgui_config_directory");
|
||||
if (!strcmp(g_settings.rgui_config_directory, "default"))
|
||||
*g_settings.rgui_config_directory = '\0';
|
||||
CONFIG_GET_BOOL(rgui_show_start_screen, "rgui_show_start_screen");
|
||||
CONFIG_GET_PATH(menu_content_directory, "rgui_browser_directory");
|
||||
if (!strcmp(g_settings.menu_content_directory, "default"))
|
||||
*g_settings.menu_content_directory = '\0';
|
||||
CONFIG_GET_PATH(menu_config_directory, "rgui_config_directory");
|
||||
if (!strcmp(g_settings.menu_config_directory, "default"))
|
||||
*g_settings.menu_config_directory = '\0';
|
||||
CONFIG_GET_BOOL(menu_show_start_screen, "rgui_show_start_screen");
|
||||
#endif
|
||||
CONFIG_GET_INT(libretro_log_level, "libretro_log_level");
|
||||
|
||||
@ -1422,9 +1422,9 @@ bool config_save_file(const char *path)
|
||||
config_set_path(conf, "content_directory", *g_settings.content_directory ? g_settings.content_directory : "default");
|
||||
config_set_path(conf, "assets_directory", *g_settings.assets_directory ? g_settings.assets_directory : "default");
|
||||
#ifdef HAVE_MENU
|
||||
config_set_path(conf, "rgui_browser_directory", *g_settings.rgui_content_directory ? g_settings.rgui_content_directory : "default");
|
||||
config_set_path(conf, "rgui_config_directory", *g_settings.rgui_config_directory ? g_settings.rgui_config_directory : "default");
|
||||
config_set_bool(conf, "rgui_show_start_screen", g_settings.rgui_show_start_screen);
|
||||
config_set_path(conf, "rgui_browser_directory", *g_settings.menu_content_directory ? g_settings.menu_content_directory : "default");
|
||||
config_set_path(conf, "rgui_config_directory", *g_settings.menu_config_directory ? g_settings.menu_config_directory : "default");
|
||||
config_set_bool(conf, "rgui_show_start_screen", g_settings.menu_show_start_screen);
|
||||
#endif
|
||||
|
||||
config_set_path(conf, "game_history_path", g_settings.game_history_path);
|
||||
|
@ -493,10 +493,10 @@ const rarch_setting_t* setting_data_get_list(void)
|
||||
START_GROUP("Paths")
|
||||
START_SUB_GROUP("Paths")
|
||||
#ifdef HAVE_MENU
|
||||
CONFIG_PATH(g_settings.rgui_content_directory, "rgui_browser_directory", "Content Directory", DEFAULT_ME_YO) WITH_FLAGS(SD_FLAG_ALLOW_EMPTY | SD_FLAG_PATH_DIR)
|
||||
CONFIG_PATH(g_settings.menu_content_directory, "rgui_browser_directory", "Content Directory", DEFAULT_ME_YO) WITH_FLAGS(SD_FLAG_ALLOW_EMPTY | SD_FLAG_PATH_DIR)
|
||||
CONFIG_PATH(g_settings.assets_directory, "assets_directory", "Assets Directory", DEFAULT_ME_YO) WITH_FLAGS(SD_FLAG_ALLOW_EMPTY | SD_FLAG_PATH_DIR)
|
||||
CONFIG_PATH(g_settings.rgui_config_directory, "rgui_config_directory", "Config Directory", DEFAULT_ME_YO) WITH_FLAGS(SD_FLAG_ALLOW_EMPTY | SD_FLAG_PATH_DIR)
|
||||
CONFIG_BOOL(g_settings.rgui_show_start_screen, "rgui_show_start_screen", "Show Start Screen", rgui_show_start_screen)
|
||||
CONFIG_PATH(g_settings.menu_config_directory, "rgui_config_directory", "Config Directory", DEFAULT_ME_YO) WITH_FLAGS(SD_FLAG_ALLOW_EMPTY | SD_FLAG_PATH_DIR)
|
||||
CONFIG_BOOL(g_settings.menu_show_start_screen, "rgui_show_start_screen", "Show Start Screen", menu_show_start_screen)
|
||||
#endif
|
||||
CONFIG_PATH(g_settings.libretro, "libretro_path", "Libretro Path", DEFAULT_ME_YO) WITH_FLAGS(SD_FLAG_ALLOW_EMPTY)
|
||||
CONFIG_PATH(g_settings.libretro_info_path, "libretro_info_path", "Core Info Directory", default_libretro_info_path) WITH_FLAGS(SD_FLAG_ALLOW_EMPTY | SD_FLAG_PATH_DIR)
|
||||
|
Loading…
x
Reference in New Issue
Block a user