2013-04-17 21:31:49 +00:00
|
|
|
/* RetroArch - A frontend for libretro.
|
2014-01-01 00:50:59 +00:00
|
|
|
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
|
|
|
* Copyright (C) 2011-2014 - Daniel De Matteis
|
2013-04-17 21:31:49 +00:00
|
|
|
*
|
|
|
|
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
|
|
|
* of the GNU General Public License as published by the Free Software Found-
|
|
|
|
* ation, either version 3 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
|
|
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
|
|
* PURPOSE. See the GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along with RetroArch.
|
|
|
|
* If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef MENU_COMMON_H__
|
|
|
|
#define MENU_COMMON_H__
|
|
|
|
|
2013-10-04 21:05:15 +00:00
|
|
|
#include "../../general.h"
|
|
|
|
|
2013-04-28 13:25:22 +00:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
#include "../../config.h"
|
|
|
|
#endif
|
|
|
|
|
2013-09-21 11:34:10 +00:00
|
|
|
#include "../../performance.h"
|
2014-03-01 10:53:04 +00:00
|
|
|
#include "../info/core_info.h"
|
2013-11-08 14:13:14 +00:00
|
|
|
#include "menu_context.h"
|
2013-09-21 11:34:10 +00:00
|
|
|
|
2013-04-28 13:00:37 +00:00
|
|
|
#ifdef HAVE_RGUI
|
|
|
|
#define MENU_TEXTURE_FULLSCREEN false
|
|
|
|
#else
|
|
|
|
#define MENU_TEXTURE_FULLSCREEN true
|
|
|
|
#endif
|
|
|
|
|
2014-02-11 06:48:53 +00:00
|
|
|
#include "../../boolean.h"
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
2013-04-17 21:31:49 +00:00
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2014-03-01 10:41:00 +00:00
|
|
|
#include "file_list.h"
|
2013-04-17 21:31:49 +00:00
|
|
|
|
|
|
|
#if defined(HAVE_CG) || defined(HAVE_HLSL) || defined(HAVE_GLSL)
|
|
|
|
#define HAVE_SHADER_MANAGER
|
|
|
|
#include "../../gfx/shader_parse.h"
|
|
|
|
#endif
|
|
|
|
|
2013-04-27 22:35:20 +00:00
|
|
|
#include "history.h"
|
|
|
|
|
2013-04-17 21:31:49 +00:00
|
|
|
#define RGUI_MAX_SHADERS 8
|
|
|
|
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
RGUI_FILE_PLAIN,
|
|
|
|
RGUI_FILE_DIRECTORY,
|
|
|
|
RGUI_FILE_DEVICE,
|
2013-05-21 02:17:26 +00:00
|
|
|
RGUI_FILE_USE_DIRECTORY,
|
2013-04-17 21:31:49 +00:00
|
|
|
RGUI_SETTINGS,
|
2013-10-04 12:53:47 +00:00
|
|
|
RGUI_START_SCREEN,
|
2013-04-17 21:31:49 +00:00
|
|
|
|
|
|
|
// Shader stuff
|
2014-02-25 17:09:29 +00:00
|
|
|
RGUI_SETTINGS_GENERAL_OPTIONS,
|
2013-04-27 22:32:25 +00:00
|
|
|
RGUI_SETTINGS_VIDEO_OPTIONS,
|
2013-05-08 16:17:30 +00:00
|
|
|
RGUI_SETTINGS_VIDEO_OPTIONS_FIRST,
|
2013-04-27 23:41:38 +00:00
|
|
|
RGUI_SETTINGS_VIDEO_RESOLUTION,
|
2013-11-08 02:37:06 +00:00
|
|
|
RGUI_SETTINGS_VIDEO_PAL60,
|
2013-04-27 23:41:38 +00:00
|
|
|
RGUI_SETTINGS_VIDEO_FILTER,
|
|
|
|
RGUI_SETTINGS_VIDEO_SOFT_FILTER,
|
2013-11-18 01:57:31 +00:00
|
|
|
RGUI_SETTINGS_FLICKER_FILTER,
|
|
|
|
RGUI_SETTINGS_SOFT_DISPLAY_FILTER,
|
2013-04-27 23:41:38 +00:00
|
|
|
RGUI_SETTINGS_VIDEO_GAMMA,
|
|
|
|
RGUI_SETTINGS_VIDEO_INTEGER_SCALE,
|
|
|
|
RGUI_SETTINGS_VIDEO_ASPECT_RATIO,
|
|
|
|
RGUI_SETTINGS_CUSTOM_VIEWPORT,
|
|
|
|
RGUI_SETTINGS_CUSTOM_VIEWPORT_2,
|
|
|
|
RGUI_SETTINGS_TOGGLE_FULLSCREEN,
|
2013-10-06 15:23:49 +00:00
|
|
|
RGUI_SETTINGS_VIDEO_THREADED,
|
2013-04-27 23:04:34 +00:00
|
|
|
RGUI_SETTINGS_VIDEO_ROTATION,
|
2013-05-04 20:29:22 +00:00
|
|
|
RGUI_SETTINGS_VIDEO_VSYNC,
|
|
|
|
RGUI_SETTINGS_VIDEO_HARD_SYNC,
|
2013-05-26 11:43:24 +00:00
|
|
|
RGUI_SETTINGS_VIDEO_HARD_SYNC_FRAMES,
|
2013-08-30 07:35:13 +00:00
|
|
|
RGUI_SETTINGS_VIDEO_BLACK_FRAME_INSERTION,
|
2013-09-01 11:20:10 +00:00
|
|
|
RGUI_SETTINGS_VIDEO_SWAP_INTERVAL,
|
2013-09-01 11:46:35 +00:00
|
|
|
RGUI_SETTINGS_VIDEO_WINDOW_SCALE_X,
|
|
|
|
RGUI_SETTINGS_VIDEO_WINDOW_SCALE_Y,
|
|
|
|
RGUI_SETTINGS_VIDEO_CROP_OVERSCAN,
|
2013-06-07 12:10:42 +00:00
|
|
|
RGUI_SETTINGS_VIDEO_REFRESH_RATE_AUTO,
|
2013-05-08 16:17:30 +00:00
|
|
|
RGUI_SETTINGS_VIDEO_OPTIONS_LAST,
|
2013-05-04 21:35:39 +00:00
|
|
|
RGUI_SETTINGS_SHADER_OPTIONS,
|
2013-04-17 21:31:49 +00:00
|
|
|
RGUI_SETTINGS_SHADER_FILTER,
|
|
|
|
RGUI_SETTINGS_SHADER_PRESET,
|
|
|
|
RGUI_SETTINGS_SHADER_APPLY,
|
|
|
|
RGUI_SETTINGS_SHADER_PASSES,
|
|
|
|
RGUI_SETTINGS_SHADER_0,
|
|
|
|
RGUI_SETTINGS_SHADER_0_FILTER,
|
|
|
|
RGUI_SETTINGS_SHADER_0_SCALE,
|
|
|
|
RGUI_SETTINGS_SHADER_LAST = RGUI_SETTINGS_SHADER_0_SCALE + (3 * (RGUI_MAX_SHADERS - 1)),
|
2013-11-18 01:57:31 +00:00
|
|
|
RGUI_SETTINGS_SHADER_PRESET_SAVE,
|
2013-04-17 21:31:49 +00:00
|
|
|
|
|
|
|
// settings options are done here too
|
|
|
|
RGUI_SETTINGS_OPEN_FILEBROWSER,
|
2013-10-05 15:07:56 +00:00
|
|
|
RGUI_SETTINGS_OPEN_FILEBROWSER_DEFERRED_CORE,
|
2013-04-27 22:35:20 +00:00
|
|
|
RGUI_SETTINGS_OPEN_HISTORY,
|
2013-04-17 21:31:49 +00:00
|
|
|
RGUI_SETTINGS_CORE,
|
2014-03-03 05:22:28 +00:00
|
|
|
RGUI_SETTINGS_CORE_INFO,
|
2013-10-05 15:07:56 +00:00
|
|
|
RGUI_SETTINGS_DEFERRED_CORE,
|
2013-09-15 13:36:45 +00:00
|
|
|
RGUI_SETTINGS_CONFIG,
|
2013-09-22 10:48:33 +00:00
|
|
|
RGUI_SETTINGS_SAVE_CONFIG,
|
2013-04-17 21:31:49 +00:00
|
|
|
RGUI_SETTINGS_CORE_OPTIONS,
|
2013-05-04 17:00:57 +00:00
|
|
|
RGUI_SETTINGS_AUDIO_OPTIONS,
|
|
|
|
RGUI_SETTINGS_INPUT_OPTIONS,
|
2013-05-04 19:17:47 +00:00
|
|
|
RGUI_SETTINGS_PATH_OPTIONS,
|
2014-02-25 15:40:12 +00:00
|
|
|
RGUI_SETTINGS_OVERLAY_OPTIONS,
|
2014-03-02 03:46:26 +00:00
|
|
|
RGUI_SETTINGS_NETPLAY_OPTIONS,
|
2013-05-05 20:02:30 +00:00
|
|
|
RGUI_SETTINGS_OPTIONS,
|
2013-10-30 15:05:59 +00:00
|
|
|
RGUI_SETTINGS_DRIVERS,
|
2013-04-17 21:31:49 +00:00
|
|
|
RGUI_SETTINGS_REWIND_ENABLE,
|
|
|
|
RGUI_SETTINGS_REWIND_GRANULARITY,
|
2013-05-22 13:35:28 +00:00
|
|
|
RGUI_SETTINGS_CONFIG_SAVE_ON_EXIT,
|
2014-01-01 20:02:57 +00:00
|
|
|
RGUI_SETTINGS_PER_CORE_CONFIG,
|
2013-04-29 13:56:49 +00:00
|
|
|
RGUI_SETTINGS_SRAM_AUTOSAVE,
|
2013-04-17 21:31:49 +00:00
|
|
|
RGUI_SETTINGS_SAVESTATE_SAVE,
|
|
|
|
RGUI_SETTINGS_SAVESTATE_LOAD,
|
2013-05-04 17:26:34 +00:00
|
|
|
RGUI_SETTINGS_DISK_OPTIONS,
|
2013-04-27 11:29:01 +00:00
|
|
|
RGUI_SETTINGS_DISK_INDEX,
|
2013-04-27 13:14:59 +00:00
|
|
|
RGUI_SETTINGS_DISK_APPEND,
|
2013-10-30 15:05:59 +00:00
|
|
|
RGUI_SETTINGS_DRIVER_VIDEO,
|
|
|
|
RGUI_SETTINGS_DRIVER_AUDIO,
|
2014-03-02 11:25:38 +00:00
|
|
|
RGUI_SETTINGS_DRIVER_AUDIO_DEVICE,
|
2014-02-25 02:23:50 +00:00
|
|
|
RGUI_SETTINGS_DRIVER_AUDIO_RESAMPLER,
|
2013-10-30 15:05:59 +00:00
|
|
|
RGUI_SETTINGS_DRIVER_INPUT,
|
2013-11-11 14:39:46 +00:00
|
|
|
RGUI_SETTINGS_DRIVER_CAMERA,
|
2013-12-19 00:51:51 +00:00
|
|
|
RGUI_SETTINGS_DRIVER_LOCATION,
|
2014-01-27 00:32:05 +00:00
|
|
|
RGUI_SETTINGS_DRIVER_MENU,
|
2013-04-17 21:31:49 +00:00
|
|
|
RGUI_SETTINGS_SCREENSHOT,
|
2013-09-16 21:10:15 +00:00
|
|
|
RGUI_SETTINGS_GPU_SCREENSHOT,
|
2014-02-15 10:12:34 +00:00
|
|
|
RGUI_SETTINGS_SAVESTATE_AUTO_SAVE,
|
|
|
|
RGUI_SETTINGS_SAVESTATE_AUTO_LOAD,
|
|
|
|
RGUI_SETTINGS_BLOCK_SRAM_OVERWRITE,
|
2014-02-25 17:47:53 +00:00
|
|
|
RGUI_SETTINGS_WINDOW_COMPOSITING_ENABLE,
|
2014-02-25 17:23:20 +00:00
|
|
|
RGUI_SETTINGS_PAUSE_IF_WINDOW_FOCUS_LOST,
|
2013-09-16 21:30:42 +00:00
|
|
|
RGUI_SCREENSHOT_DIR_PATH,
|
2013-05-04 19:17:47 +00:00
|
|
|
RGUI_BROWSER_DIR_PATH,
|
2013-05-04 20:29:22 +00:00
|
|
|
RGUI_SHADER_DIR_PATH,
|
2013-05-04 19:17:47 +00:00
|
|
|
RGUI_SAVESTATE_DIR_PATH,
|
|
|
|
RGUI_SAVEFILE_DIR_PATH,
|
2013-09-12 20:00:59 +00:00
|
|
|
RGUI_LIBRETRO_DIR_PATH,
|
2013-10-10 22:36:08 +00:00
|
|
|
RGUI_LIBRETRO_INFO_DIR_PATH,
|
2013-09-15 14:15:38 +00:00
|
|
|
RGUI_CONFIG_DIR_PATH,
|
2013-05-22 20:31:16 +00:00
|
|
|
RGUI_OVERLAY_DIR_PATH,
|
2013-05-04 19:17:47 +00:00
|
|
|
RGUI_SYSTEM_DIR_PATH,
|
2013-04-17 21:31:49 +00:00
|
|
|
RGUI_SETTINGS_RESTART_GAME,
|
|
|
|
RGUI_SETTINGS_AUDIO_MUTE,
|
2013-05-04 20:47:14 +00:00
|
|
|
RGUI_SETTINGS_AUDIO_CONTROL_RATE_DELTA,
|
2014-03-05 02:40:55 +00:00
|
|
|
RGUI_SETTINGS_AUDIO_DSP_EFFECT,
|
2013-12-29 11:01:23 +00:00
|
|
|
RGUI_SETTINGS_AUDIO_VOLUME,
|
2013-11-18 18:50:47 +00:00
|
|
|
RGUI_SETTINGS_CUSTOM_BGM_CONTROL_ENABLE,
|
2013-04-17 21:31:49 +00:00
|
|
|
RGUI_SETTINGS_ZIP_EXTRACT,
|
|
|
|
RGUI_SETTINGS_DEBUG_TEXT,
|
|
|
|
RGUI_SETTINGS_RESTART_EMULATOR,
|
|
|
|
RGUI_SETTINGS_RESUME_GAME,
|
|
|
|
RGUI_SETTINGS_QUIT_RARCH,
|
|
|
|
|
2014-03-02 03:46:26 +00:00
|
|
|
RGUI_SETTINGS_NETPLAY_ENABLE,
|
|
|
|
RGUI_SETTINGS_NETPLAY_MODE,
|
|
|
|
RGUI_SETTINGS_NETPLAY_SPECTATOR_MODE_ENABLE,
|
|
|
|
RGUI_SETTINGS_NETPLAY_HOST_IP_ADDRESS,
|
|
|
|
RGUI_SETTINGS_NETPLAY_TCP_UDP_PORT,
|
|
|
|
RGUI_SETTINGS_NETPLAY_DELAY_FRAMES,
|
|
|
|
RGUI_SETTINGS_NETPLAY_NICKNAME,
|
|
|
|
|
2013-05-17 21:13:09 +00:00
|
|
|
RGUI_SETTINGS_OVERLAY_PRESET,
|
2013-05-17 21:26:11 +00:00
|
|
|
RGUI_SETTINGS_OVERLAY_OPACITY,
|
2013-05-17 21:37:48 +00:00
|
|
|
RGUI_SETTINGS_OVERLAY_SCALE,
|
2013-05-04 15:01:10 +00:00
|
|
|
RGUI_SETTINGS_BIND_PLAYER,
|
2013-04-17 21:31:49 +00:00
|
|
|
RGUI_SETTINGS_BIND_DEVICE,
|
2013-04-27 10:32:03 +00:00
|
|
|
RGUI_SETTINGS_BIND_DEVICE_TYPE,
|
2014-01-08 16:31:14 +00:00
|
|
|
RGUI_SETTINGS_BIND_ANALOG_MODE,
|
2013-12-12 21:10:11 +00:00
|
|
|
RGUI_SETTINGS_DEVICE_AUTODETECT_ENABLE,
|
2013-09-29 15:58:46 +00:00
|
|
|
|
|
|
|
// Match up with libretro order for simplicity.
|
2013-09-29 18:40:04 +00:00
|
|
|
RGUI_SETTINGS_BIND_BEGIN,
|
|
|
|
RGUI_SETTINGS_BIND_B = RGUI_SETTINGS_BIND_BEGIN,
|
2013-09-29 15:58:46 +00:00
|
|
|
RGUI_SETTINGS_BIND_Y,
|
|
|
|
RGUI_SETTINGS_BIND_SELECT,
|
|
|
|
RGUI_SETTINGS_BIND_START,
|
2013-04-17 21:31:49 +00:00
|
|
|
RGUI_SETTINGS_BIND_UP,
|
|
|
|
RGUI_SETTINGS_BIND_DOWN,
|
|
|
|
RGUI_SETTINGS_BIND_LEFT,
|
|
|
|
RGUI_SETTINGS_BIND_RIGHT,
|
|
|
|
RGUI_SETTINGS_BIND_A,
|
|
|
|
RGUI_SETTINGS_BIND_X,
|
|
|
|
RGUI_SETTINGS_BIND_L,
|
|
|
|
RGUI_SETTINGS_BIND_R,
|
|
|
|
RGUI_SETTINGS_BIND_L2,
|
|
|
|
RGUI_SETTINGS_BIND_R2,
|
|
|
|
RGUI_SETTINGS_BIND_L3,
|
|
|
|
RGUI_SETTINGS_BIND_R3,
|
2013-09-29 18:40:04 +00:00
|
|
|
RGUI_SETTINGS_BIND_ANALOG_LEFT_X_PLUS,
|
|
|
|
RGUI_SETTINGS_BIND_ANALOG_LEFT_X_MINUS,
|
|
|
|
RGUI_SETTINGS_BIND_ANALOG_LEFT_Y_PLUS,
|
|
|
|
RGUI_SETTINGS_BIND_ANALOG_LEFT_Y_MINUS,
|
|
|
|
RGUI_SETTINGS_BIND_ANALOG_RIGHT_X_PLUS,
|
|
|
|
RGUI_SETTINGS_BIND_ANALOG_RIGHT_X_MINUS,
|
|
|
|
RGUI_SETTINGS_BIND_ANALOG_RIGHT_Y_PLUS,
|
|
|
|
RGUI_SETTINGS_BIND_ANALOG_RIGHT_Y_MINUS,
|
2014-02-27 04:25:33 +00:00
|
|
|
|
2014-02-27 07:10:09 +00:00
|
|
|
RGUI_SETTINGS_BIND_TURBO_ENABLE,
|
2014-02-27 04:25:33 +00:00
|
|
|
RGUI_SETTINGS_BIND_FAST_FORWARD_KEY,
|
|
|
|
RGUI_SETTINGS_BIND_FAST_FORWARD_HOLD_KEY,
|
|
|
|
RGUI_SETTINGS_BIND_LOAD_STATE_KEY,
|
|
|
|
RGUI_SETTINGS_BIND_SAVE_STATE_KEY,
|
|
|
|
RGUI_SETTINGS_BIND_FULLSCREEN_TOGGLE_KEY,
|
|
|
|
RGUI_SETTINGS_BIND_QUIT_KEY,
|
|
|
|
RGUI_SETTINGS_BIND_STATE_SLOT_PLUS,
|
|
|
|
RGUI_SETTINGS_BIND_STATE_SLOT_MINUS,
|
|
|
|
RGUI_SETTINGS_BIND_REWIND,
|
|
|
|
RGUI_SETTINGS_BIND_MOVIE_RECORD_TOGGLE,
|
|
|
|
RGUI_SETTINGS_BIND_PAUSE_TOGGLE,
|
|
|
|
RGUI_SETTINGS_BIND_FRAMEADVANCE,
|
|
|
|
RGUI_SETTINGS_BIND_RESET,
|
|
|
|
RGUI_SETTINGS_BIND_SHADER_NEXT,
|
|
|
|
RGUI_SETTINGS_BIND_SHADER_PREV,
|
|
|
|
RGUI_SETTINGS_BIND_CHEAT_INDEX_PLUS,
|
|
|
|
RGUI_SETTINGS_BIND_CHEAT_INDEX_MINUS,
|
|
|
|
RGUI_SETTINGS_BIND_CHEAT_TOGGLE,
|
|
|
|
RGUI_SETTINGS_BIND_SCREENSHOT,
|
|
|
|
RGUI_SETTINGS_BIND_DSP_CONFIG,
|
|
|
|
RGUI_SETTINGS_BIND_MUTE,
|
|
|
|
RGUI_SETTINGS_BIND_NETPLAY_FLIP,
|
|
|
|
RGUI_SETTINGS_BIND_SLOWMOTION,
|
|
|
|
RGUI_SETTINGS_BIND_ENABLE_HOTKEY,
|
|
|
|
RGUI_SETTINGS_BIND_VOLUME_UP,
|
|
|
|
RGUI_SETTINGS_BIND_VOLUME_DOWN,
|
|
|
|
RGUI_SETTINGS_BIND_OVERLAY_NEXT,
|
|
|
|
RGUI_SETTINGS_BIND_DISK_EJECT_TOGGLE,
|
|
|
|
RGUI_SETTINGS_BIND_DISK_NEXT,
|
|
|
|
RGUI_SETTINGS_BIND_GRAB_MOUSE_TOGGLE,
|
|
|
|
RGUI_SETTINGS_BIND_MENU_TOGGLE,
|
2013-09-29 15:58:46 +00:00
|
|
|
RGUI_SETTINGS_CUSTOM_BIND,
|
2013-09-29 17:37:48 +00:00
|
|
|
RGUI_SETTINGS_CUSTOM_BIND_ALL,
|
2013-09-29 18:40:04 +00:00
|
|
|
RGUI_SETTINGS_CUSTOM_BIND_DEFAULT_ALL,
|
2014-03-02 05:07:18 +00:00
|
|
|
RGUI_SETTINGS_ONSCREEN_KEYBOARD_ENABLE,
|
2014-02-27 04:25:33 +00:00
|
|
|
RGUI_SETTINGS_BIND_LAST = RGUI_SETTINGS_BIND_ANALOG_RIGHT_Y_MINUS,
|
2014-03-03 05:22:28 +00:00
|
|
|
RGUI_SETTINGS_CORE_INFO_NONE = 0xffff,
|
2013-04-17 21:31:49 +00:00
|
|
|
RGUI_SETTINGS_CORE_OPTION_NONE = 0xffff,
|
|
|
|
RGUI_SETTINGS_CORE_OPTION_START = 0x10000
|
|
|
|
} rgui_file_type_t;
|
|
|
|
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
RGUI_ACTION_UP,
|
|
|
|
RGUI_ACTION_DOWN,
|
|
|
|
RGUI_ACTION_LEFT,
|
|
|
|
RGUI_ACTION_RIGHT,
|
|
|
|
RGUI_ACTION_OK,
|
|
|
|
RGUI_ACTION_CANCEL,
|
|
|
|
RGUI_ACTION_REFRESH,
|
|
|
|
RGUI_ACTION_START,
|
|
|
|
RGUI_ACTION_MESSAGE,
|
2013-09-26 13:49:17 +00:00
|
|
|
RGUI_ACTION_SCROLL_DOWN,
|
|
|
|
RGUI_ACTION_SCROLL_UP,
|
2013-09-26 20:34:06 +00:00
|
|
|
RGUI_ACTION_MAPPING_PREVIOUS,
|
|
|
|
RGUI_ACTION_MAPPING_NEXT,
|
2013-04-17 21:31:49 +00:00
|
|
|
RGUI_ACTION_NOOP
|
|
|
|
} rgui_action_t;
|
|
|
|
|
2013-09-29 15:58:46 +00:00
|
|
|
#define RGUI_MAX_BUTTONS 32
|
|
|
|
#define RGUI_MAX_AXES 32
|
|
|
|
#define RGUI_MAX_HATS 4
|
|
|
|
struct rgui_bind_state_port
|
|
|
|
{
|
|
|
|
bool buttons[RGUI_MAX_BUTTONS];
|
|
|
|
int16_t axes[RGUI_MAX_AXES];
|
|
|
|
uint16_t hats[RGUI_MAX_HATS];
|
2013-09-29 17:09:33 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct rgui_bind_axis_state
|
|
|
|
{
|
|
|
|
// Default axis state.
|
|
|
|
int16_t rested_axes[RGUI_MAX_AXES];
|
|
|
|
// Locked axis state. If we configured an axis, avoid having the same axis state trigger something again right away.
|
|
|
|
int16_t locked_axes[RGUI_MAX_AXES];
|
2013-09-29 15:58:46 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct rgui_bind_state
|
|
|
|
{
|
|
|
|
struct retro_keybind *target;
|
2013-09-29 17:37:48 +00:00
|
|
|
unsigned begin;
|
|
|
|
unsigned last;
|
2013-09-29 15:58:46 +00:00
|
|
|
unsigned player;
|
|
|
|
struct rgui_bind_state_port state[MAX_PLAYERS];
|
2013-09-29 17:09:33 +00:00
|
|
|
struct rgui_bind_axis_state axis_state[MAX_PLAYERS];
|
2013-09-29 15:58:46 +00:00
|
|
|
bool skip;
|
|
|
|
};
|
|
|
|
|
2013-09-29 17:09:33 +00:00
|
|
|
void menu_poll_bind_get_rested_axes(struct rgui_bind_state *state);
|
2013-09-29 15:58:46 +00:00
|
|
|
void menu_poll_bind_state(struct rgui_bind_state *state);
|
2013-09-29 17:09:33 +00:00
|
|
|
bool menu_poll_find_trigger(struct rgui_bind_state *state, struct rgui_bind_state *new_state);
|
2013-09-29 15:58:46 +00:00
|
|
|
|
2013-09-30 01:54:08 +00:00
|
|
|
#ifdef GEKKO
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
GX_RESOLUTIONS_512_192 = 0,
|
|
|
|
GX_RESOLUTIONS_598_200,
|
|
|
|
GX_RESOLUTIONS_640_200,
|
|
|
|
GX_RESOLUTIONS_384_224,
|
|
|
|
GX_RESOLUTIONS_448_224,
|
|
|
|
GX_RESOLUTIONS_480_224,
|
|
|
|
GX_RESOLUTIONS_512_224,
|
2014-02-26 19:22:10 +00:00
|
|
|
GX_RESOLUTIONS_576_224,
|
|
|
|
GX_RESOLUTIONS_608_224,
|
|
|
|
GX_RESOLUTIONS_640_224,
|
2013-09-30 01:54:08 +00:00
|
|
|
GX_RESOLUTIONS_340_232,
|
|
|
|
GX_RESOLUTIONS_512_232,
|
|
|
|
GX_RESOLUTIONS_512_236,
|
|
|
|
GX_RESOLUTIONS_336_240,
|
|
|
|
GX_RESOLUTIONS_384_240,
|
|
|
|
GX_RESOLUTIONS_512_240,
|
|
|
|
GX_RESOLUTIONS_530_240,
|
|
|
|
GX_RESOLUTIONS_640_240,
|
2014-02-26 19:22:10 +00:00
|
|
|
GX_RESOLUTIONS_512_384,
|
|
|
|
GX_RESOLUTIONS_598_400,
|
|
|
|
GX_RESOLUTIONS_640_400,
|
|
|
|
GX_RESOLUTIONS_384_448,
|
|
|
|
GX_RESOLUTIONS_448_448,
|
|
|
|
GX_RESOLUTIONS_480_448,
|
2013-09-30 01:54:08 +00:00
|
|
|
GX_RESOLUTIONS_512_448,
|
2014-02-26 19:22:10 +00:00
|
|
|
GX_RESOLUTIONS_576_448,
|
|
|
|
GX_RESOLUTIONS_608_448,
|
2013-09-30 01:54:08 +00:00
|
|
|
GX_RESOLUTIONS_640_448,
|
2014-02-26 19:22:10 +00:00
|
|
|
GX_RESOLUTIONS_340_464,
|
|
|
|
GX_RESOLUTIONS_512_464,
|
|
|
|
GX_RESOLUTIONS_512_472,
|
|
|
|
GX_RESOLUTIONS_384_480,
|
|
|
|
GX_RESOLUTIONS_512_480,
|
|
|
|
GX_RESOLUTIONS_530_480,
|
2013-09-30 01:54:08 +00:00
|
|
|
GX_RESOLUTIONS_640_480,
|
|
|
|
GX_RESOLUTIONS_LAST,
|
|
|
|
};
|
|
|
|
#endif
|
|
|
|
|
2013-11-12 16:16:11 +00:00
|
|
|
|
2013-04-17 21:31:49 +00:00
|
|
|
typedef struct
|
|
|
|
{
|
2013-04-19 15:53:01 +00:00
|
|
|
uint64_t old_input_state;
|
|
|
|
uint64_t trigger_state;
|
|
|
|
bool do_held;
|
|
|
|
|
2013-04-26 21:52:29 +00:00
|
|
|
unsigned delay_timer;
|
|
|
|
unsigned delay_count;
|
|
|
|
|
2013-11-04 15:23:37 +00:00
|
|
|
unsigned width;
|
|
|
|
unsigned height;
|
|
|
|
|
2013-04-17 21:31:49 +00:00
|
|
|
uint16_t *frame_buf;
|
|
|
|
size_t frame_buf_pitch;
|
2013-04-19 15:53:01 +00:00
|
|
|
bool frame_buf_show;
|
2013-04-17 21:31:49 +00:00
|
|
|
|
2013-11-08 03:48:31 +00:00
|
|
|
file_list_t *menu_stack;
|
|
|
|
file_list_t *selection_buf;
|
2013-04-17 21:31:49 +00:00
|
|
|
size_t selection_ptr;
|
|
|
|
bool need_refresh;
|
|
|
|
bool msg_force;
|
2013-10-04 12:53:47 +00:00
|
|
|
bool push_start_screen;
|
2013-04-17 21:31:49 +00:00
|
|
|
|
2013-10-05 15:07:56 +00:00
|
|
|
core_info_list_t *core_info;
|
2014-03-02 13:07:07 +00:00
|
|
|
core_info_t core_info_current;
|
2013-10-05 15:07:56 +00:00
|
|
|
bool defer_core;
|
|
|
|
char deferred_path[PATH_MAX];
|
|
|
|
|
2013-10-03 15:32:59 +00:00
|
|
|
// Quick jumping indices with L/R.
|
|
|
|
// Rebuilt when parsing directory.
|
|
|
|
size_t scroll_indices[2 * (26 + 2) + 1];
|
|
|
|
unsigned scroll_indices_size;
|
2013-10-03 18:44:33 +00:00
|
|
|
unsigned scroll_accel;
|
2013-10-03 15:32:59 +00:00
|
|
|
|
2013-09-15 18:34:36 +00:00
|
|
|
char default_glslp[PATH_MAX];
|
|
|
|
char default_cgp[PATH_MAX];
|
2013-04-17 21:31:49 +00:00
|
|
|
|
|
|
|
const uint8_t *font;
|
|
|
|
bool alloc_font;
|
|
|
|
|
|
|
|
char libretro_dir[PATH_MAX];
|
|
|
|
struct retro_system_info info;
|
2013-05-02 12:42:58 +00:00
|
|
|
bool load_no_rom;
|
2013-04-17 21:31:49 +00:00
|
|
|
|
|
|
|
#ifdef HAVE_SHADER_MANAGER
|
|
|
|
struct gfx_shader shader;
|
|
|
|
#endif
|
2013-05-04 14:13:58 +00:00
|
|
|
unsigned current_pad;
|
2013-04-27 22:35:20 +00:00
|
|
|
|
|
|
|
rom_history_t *history;
|
2013-12-17 18:10:21 +00:00
|
|
|
retro_time_t last_time; // Used to throttle RGUI in case VSync is broken.
|
2013-09-29 15:58:46 +00:00
|
|
|
|
|
|
|
struct rgui_bind_state binds;
|
2013-12-10 18:39:09 +00:00
|
|
|
struct
|
|
|
|
{
|
|
|
|
const char **buffer;
|
|
|
|
const char *label;
|
|
|
|
bool display;
|
|
|
|
} keyboard;
|
2013-04-17 21:31:49 +00:00
|
|
|
} rgui_handle_t;
|
|
|
|
|
|
|
|
extern rgui_handle_t *rgui;
|
|
|
|
|
2014-03-07 05:28:28 +00:00
|
|
|
void menu_init(void *data);
|
|
|
|
bool menu_iterate(void *data);
|
|
|
|
void menu_free(void *data);
|
2013-04-17 21:31:49 +00:00
|
|
|
|
|
|
|
#ifdef HAVE_SHADER_MANAGER
|
2013-11-08 14:38:18 +00:00
|
|
|
void shader_manager_init(void *data);
|
2013-04-17 21:31:49 +00:00
|
|
|
void shader_manager_get_str(struct gfx_shader *shader,
|
|
|
|
char *type_str, size_t type_str_size, unsigned type);
|
2013-09-30 00:17:15 +00:00
|
|
|
void shader_manager_set_preset(struct gfx_shader *shader,
|
|
|
|
enum rarch_shader_type type, const char *path);
|
2014-03-02 11:15:18 +00:00
|
|
|
void shader_manager_save_preset(void *data, const char *basename, bool apply);
|
2013-04-17 21:31:49 +00:00
|
|
|
#endif
|
|
|
|
|
2013-05-05 19:42:14 +00:00
|
|
|
void menu_ticker_line(char *buf, size_t len, unsigned tick, const char *str, bool selected);
|
2013-05-05 09:26:02 +00:00
|
|
|
|
2013-11-08 14:38:18 +00:00
|
|
|
void menu_init_core_info(void *data);
|
2013-10-11 07:17:32 +00:00
|
|
|
|
2014-03-07 05:28:28 +00:00
|
|
|
void load_menu_game_prepare(void *video_data);
|
2014-01-23 19:00:25 +00:00
|
|
|
void load_menu_game_prepare_dummy(void);
|
2013-04-28 14:38:13 +00:00
|
|
|
bool load_menu_game(void);
|
2013-04-29 01:10:26 +00:00
|
|
|
void load_menu_game_history(unsigned game_index);
|
2013-11-24 21:02:57 +00:00
|
|
|
extern void load_menu_game_new_core(void);
|
2013-05-17 16:22:03 +00:00
|
|
|
void menu_rom_history_push(const char *path, const char *core_path,
|
|
|
|
const char *core_name);
|
2013-05-17 16:33:16 +00:00
|
|
|
void menu_rom_history_push_current(void);
|
2013-04-28 14:38:13 +00:00
|
|
|
|
2013-09-15 13:36:45 +00:00
|
|
|
bool menu_replace_config(const char *path);
|
|
|
|
|
2013-09-22 10:48:33 +00:00
|
|
|
bool menu_save_new_config(void);
|
|
|
|
|
2014-03-07 05:28:28 +00:00
|
|
|
int menu_settings_toggle_setting(void *data, void *video_data, unsigned setting, unsigned action, unsigned menu_type);
|
|
|
|
int menu_set_settings(void *data, void *video_data, unsigned setting, unsigned action);
|
2013-10-06 22:36:30 +00:00
|
|
|
void menu_set_settings_label(char *type_str, size_t type_str_size, unsigned *w, unsigned type);
|
2013-09-29 13:47:45 +00:00
|
|
|
|
2013-11-04 11:32:43 +00:00
|
|
|
void menu_populate_entries(void *data, unsigned menu_type);
|
2013-11-04 02:08:14 +00:00
|
|
|
unsigned menu_type_is(unsigned type);
|
2013-09-30 16:53:56 +00:00
|
|
|
|
2014-02-01 21:30:03 +00:00
|
|
|
uint64_t menu_input(void);
|
|
|
|
|
2013-11-08 14:13:14 +00:00
|
|
|
extern const menu_ctx_driver_t *menu_ctx;
|
2013-10-06 19:49:20 +00:00
|
|
|
|
2013-04-17 21:31:49 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|