mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
Merge branch 'master' into modelview
This commit is contained in:
commit
7b9c094052
14
.gitignore
vendored
14
.gitignore
vendored
@ -163,7 +163,13 @@ retroarch_switch.lst
|
||||
retroarch_switch.nacp
|
||||
retroarch_switch.nro
|
||||
retroarch_switch.nso
|
||||
/pkg/msvc/x64/Debug QT
|
||||
/pkg/msvc/msvc-2017/x64/Debug QT
|
||||
/pkg/msvc/msvc-2017/MetaObjects
|
||||
/.vs
|
||||
|
||||
# Wayland
|
||||
gfx/common/wayland/idle-inhibit-unstable-v1.c
|
||||
gfx/common/wayland/idle-inhibit-unstable-v1.h
|
||||
gfx/common/wayland/xdg-shell-unstable-v6.c
|
||||
gfx/common/wayland/xdg-shell-unstable-v6.h
|
||||
gfx/common/wayland/xdg-decoration-unstable-v1.h
|
||||
gfx/common/wayland/xdg-decoration-unstable-v1.c
|
||||
gfx/common/wayland/xdg-shell.c
|
||||
gfx/common/wayland/xdg-shell.h
|
||||
|
2
.vscode/settings.json
vendored
2
.vscode/settings.json
vendored
@ -41,6 +41,8 @@
|
||||
"ozone_texture.h": "c",
|
||||
"string_list.h": "c",
|
||||
"core_info.h": "c"
|
||||
"thread": "c",
|
||||
"xlocale": "c"
|
||||
},
|
||||
"C_Cpp.dimInactiveRegions": false,
|
||||
}
|
96
10bpc-gl.diff
Normal file
96
10bpc-gl.diff
Normal file
@ -0,0 +1,96 @@
|
||||
diff --git a/gfx/drivers_context/wgl_ctx.c b/gfx/drivers_context/wgl_ctx.c
|
||||
index b90a8e40c3..e57c4df194 100644
|
||||
--- a/gfx/drivers_context/wgl_ctx.c
|
||||
+++ b/gfx/drivers_context/wgl_ctx.c
|
||||
@@ -78,6 +78,47 @@
|
||||
#ifndef WGL_CONTEXT_DEBUG_BIT_ARB
|
||||
#define WGL_CONTEXT_DEBUG_BIT_ARB 0x0001
|
||||
#endif
|
||||
+
|
||||
+#ifndef WGL_ACCELERATION_ARB
|
||||
+#define WGL_ACCELERATION_ARB 0x2003
|
||||
+#endif
|
||||
+
|
||||
+#ifndef WGL_FULL_ACCELERATION_ARB
|
||||
+#define WGL_FULL_ACCELERATION_ARB 0x2027
|
||||
+#endif
|
||||
+
|
||||
+#ifndef WGL_DRAW_TO_WINDOW_ARB
|
||||
+#define WGL_DRAW_TO_WINDOW_ARB 0x2001
|
||||
+#endif
|
||||
+
|
||||
+#ifndef WGL_DOUBLE_BUFFER_ARB
|
||||
+#define WGL_DOUBLE_BUFFER_ARB 0x2011
|
||||
+#endif
|
||||
+
|
||||
+#ifndef WGL_RED_BITS_ARB
|
||||
+#define WGL_RED_BITS_ARB 0x2015
|
||||
+#endif
|
||||
+
|
||||
+#ifndef WGL_GREEN_BITS_ARB
|
||||
+#define WGL_GREEN_BITS_ARB 0x2017
|
||||
+#endif
|
||||
+
|
||||
+#ifndef WGL_BLUE_BITS_ARB
|
||||
+#define WGL_BLUE_BITS_ARB 0x2019
|
||||
+#endif
|
||||
+
|
||||
+#ifndef WGL_ALPHA_BITS_ARB
|
||||
+#define WGL_ALPHA_BITS_ARB 0x201B
|
||||
+#endif
|
||||
+
|
||||
+#ifndef WGL_PIXEL_TYPE_ARB
|
||||
+#define WGL_PIXEL_TYPE_ARB 0x2013
|
||||
+#endif
|
||||
+
|
||||
+#ifndef WGL_TYPE_RGBA_ARB
|
||||
+#define WGL_TYPE_RGBA_ARB 0x202B
|
||||
+#endif
|
||||
+
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_OPENGL)
|
||||
@@ -313,6 +354,43 @@ static void create_gl_context(HWND hwnd, bool *quit)
|
||||
RARCH_LOG("[WGL]: Adaptive VSync supported.\n");
|
||||
wgl_adaptive_vsync = true;
|
||||
}
|
||||
+ if (wgl_has_extension("WGL_ARB_pixel_format", extensions))
|
||||
+ {
|
||||
+ BOOL (WINAPI * wglChoosePixelFormatARB)
|
||||
+ (HDC hdc,
|
||||
+ const int *piAttribIList,
|
||||
+ const FLOAT *pfAttribFList,
|
||||
+ UINT nMaxFormats,
|
||||
+ int *piFormats,
|
||||
+ UINT *nNumFormats);
|
||||
+ UINT nMatchingFormats;
|
||||
+ int index = 0;
|
||||
+ int attribsDesired[] = {
|
||||
+ WGL_DRAW_TO_WINDOW_ARB, 1,
|
||||
+ WGL_ACCELERATION_ARB, WGL_FULL_ACCELERATION_ARB,
|
||||
+ WGL_PIXEL_TYPE_ARB, WGL_TYPE_RGBA_ARB,
|
||||
+ WGL_RED_BITS_ARB, 10,
|
||||
+ WGL_GREEN_BITS_ARB, 10,
|
||||
+ WGL_BLUE_BITS_ARB, 10,
|
||||
+ WGL_ALPHA_BITS_ARB, 2,
|
||||
+ WGL_DOUBLE_BUFFER_ARB, 1,
|
||||
+ 0,0
|
||||
+ };
|
||||
+ wglChoosePixelFormatARB = (BOOL (WINAPI *) (HDC, const int *,
|
||||
+ const FLOAT*, UINT, int*, UINT*))
|
||||
+ gfx_ctx_wgl_get_proc_address("wglChoosePixelFormatARB");
|
||||
+
|
||||
+ RARCH_LOG("[WGL]: ARB pixel format supported.\n");
|
||||
+
|
||||
+ if (wglChoosePixelFormatARB(win32_hdc, attribsDesired,
|
||||
+ NULL, 1, &index, &nMatchingFormats))
|
||||
+ {
|
||||
+ if (nMatchingFormats == 0)
|
||||
+ {
|
||||
+ RARCH_WARN("No 10bpc WGL_ARB_pixel_formats found!\n");
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
}
|
||||
#endif
|
@ -14,6 +14,7 @@
|
||||
- SWITCH: Proper button labels.
|
||||
- VULKAN: Fix RGUI crashing at startup.
|
||||
- VULKAN: Fix secondary screens in overlays not working.
|
||||
- WAYLAND: Implement idle-inhibit support (needed for screensaver suspend).
|
||||
- WINDOWS/WSA: Network Information info is blank until first network operation.
|
||||
- WIIU: Initial netplay peer-to-peer support. Network information working.
|
||||
|
||||
|
@ -863,13 +863,18 @@ ifeq ($(TARGET), retroarch_switch)
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_WAYLAND), 1)
|
||||
OBJ += gfx/drivers_context/wayland_ctx.o \
|
||||
input/drivers/wayland_input.o
|
||||
ifeq ($(HAVE_EGL), 1)
|
||||
LIBS += $(EGL_LIBS)
|
||||
endif
|
||||
DEFINES += $(WAYLAND_CFLAGS) $(WAYLAND_CURSOR_CFLAGS)
|
||||
LIBS += $(WAYLAND_LIBS) $(WAYLAND_CURSOR_LIBS)
|
||||
OBJ += gfx/drivers_context/wayland_ctx.o \
|
||||
input/drivers/wayland_input.o \
|
||||
gfx/common/wayland/xdg-shell.o \
|
||||
gfx/common/wayland/xdg-shell-unstable-v6.o \
|
||||
gfx/common/wayland/idle-inhibit-unstable-v1.o \
|
||||
gfx/common/wayland/xdg-decoration-unstable-v1.o
|
||||
ifeq ($(HAVE_EGL), 1)
|
||||
LIBS += $(EGL_LIBS)
|
||||
endif
|
||||
DEFINES += $(WAYLAND_CFLAGS) $(WAYLAND_CURSOR_CFLAGS)
|
||||
LIBS += $(WAYLAND_LIBS) $(WAYLAND_CURSOR_LIBS)
|
||||
|
||||
endif
|
||||
|
||||
#Input
|
||||
@ -900,7 +905,7 @@ ifeq ($(HAVE_X11), 1)
|
||||
gfx/common/xinerama_common.o \
|
||||
gfx/display_servers/dispserv_x11.o
|
||||
|
||||
LIBS += $(X11_LIBS) $(XEXT_LIBS) $(XF86VM_LIBS) $(XINERAMA_LIBS)
|
||||
LIBS += $(X11_LIBS) $(XEXT_LIBS) $(XF86VM_LIBS) $(XINERAMA_LIBS) $(XRANDR_LIBS)
|
||||
DEFINES += -DHAVE_X11 $(X11_CFLAGS) $(XEXT_CFLAGS) $(XF86VM_CFLAGS) $(XINERAMA_CFLAGS)
|
||||
ifeq ($(HAVE_XCB),1)
|
||||
LIBS += -lX11-xcb
|
||||
|
@ -39,7 +39,6 @@ typedef struct
|
||||
volatile unsigned dma_write;
|
||||
size_t write_ptr;
|
||||
|
||||
OSCond cond;
|
||||
bool nonblock;
|
||||
bool is_paused;
|
||||
} gx_audio_t;
|
||||
@ -63,8 +62,6 @@ static void dma_callback(void)
|
||||
DCFlushRange(wa->data[wa->dma_next], CHUNK_SIZE);
|
||||
|
||||
AIInitDMA((uint32_t)wa->data[wa->dma_next], CHUNK_SIZE);
|
||||
|
||||
OSSignalCond(wa->cond);
|
||||
}
|
||||
|
||||
static void *gx_audio_init(const char *device,
|
||||
@ -95,8 +92,6 @@ static void *gx_audio_init(const char *device,
|
||||
*new_rate = 48000;
|
||||
}
|
||||
|
||||
OSInitThreadQueue(&wa->cond);
|
||||
|
||||
wa->dma_write = BLOCKS - 1;
|
||||
DCFlushRange(wa->data, sizeof(wa->data));
|
||||
stop_audio = false;
|
||||
@ -133,8 +128,7 @@ static ssize_t gx_audio_write(void *data, const void *buf_, size_t size)
|
||||
/* FIXME: Nonblocking audio should break out of loop
|
||||
* when it has nothing to write. */
|
||||
while ((wa->dma_write == wa->dma_next ||
|
||||
wa->dma_write == wa->dma_busy) && !wa->nonblock)
|
||||
OSSleepThread(wa->cond);
|
||||
wa->dma_write == wa->dma_busy) && !wa->nonblock);
|
||||
|
||||
copy_swapped(wa->data[wa->dma_write] + wa->write_ptr, buf, to_write);
|
||||
|
||||
@ -205,10 +199,6 @@ static void gx_audio_free(void *data)
|
||||
AIStopDMA();
|
||||
AIRegisterDMACallback(NULL);
|
||||
|
||||
if (wa->cond)
|
||||
OSCloseThreadQueue(wa->cond);
|
||||
wa->cond = 0;
|
||||
|
||||
free(data);
|
||||
}
|
||||
|
||||
|
@ -1666,7 +1666,7 @@ static void cheevos_test_cheevo_set(const cheevoset_t *set)
|
||||
|
||||
if (settings && settings->bools.cheevos_auto_screenshot)
|
||||
{
|
||||
char shotname[256];
|
||||
char shotname[4200];
|
||||
|
||||
snprintf(shotname, sizeof(shotname), "%s/%s-cheevo-%u",
|
||||
settings->paths.directory_screenshot,
|
||||
|
24
command.c
24
command.c
@ -220,6 +220,7 @@ static const struct cmd_map map[] = {
|
||||
{ "SCREENSHOT", RARCH_SCREENSHOT },
|
||||
{ "MUTE", RARCH_MUTE },
|
||||
{ "OSK", RARCH_OSK },
|
||||
{ "FPS_TOGGLE", RARCH_FPS_TOGGLE },
|
||||
{ "NETPLAY_GAME_WATCH", RARCH_NETPLAY_GAME_WATCH },
|
||||
{ "VOLUME_UP", RARCH_VOLUME_UP },
|
||||
{ "VOLUME_DOWN", RARCH_VOLUME_DOWN },
|
||||
@ -1899,7 +1900,10 @@ bool command_event(enum event_command cmd, void *data)
|
||||
break;
|
||||
case CMD_EVENT_LOAD_CORE:
|
||||
{
|
||||
bool success = command_event(CMD_EVENT_LOAD_CORE_PERSIST, NULL);
|
||||
bool success = false;
|
||||
subsystem_current_count = 0;
|
||||
content_clear_subsystem();
|
||||
success = command_event(CMD_EVENT_LOAD_CORE_PERSIST, NULL);
|
||||
(void)success;
|
||||
|
||||
#ifndef HAVE_DYNAMIC
|
||||
@ -2019,8 +2023,10 @@ bool command_event(enum event_command cmd, void *data)
|
||||
command_event(CMD_EVENT_RESTORE_REMAPS, NULL);
|
||||
|
||||
if (is_inited)
|
||||
{
|
||||
if (!task_push_start_dummy_core(&content_info))
|
||||
return false;
|
||||
}
|
||||
#ifdef HAVE_DYNAMIC
|
||||
path_clear(RARCH_PATH_CORE);
|
||||
rarch_ctl(RARCH_CTL_SYSTEM_INFO_FREE, NULL);
|
||||
@ -2037,6 +2043,11 @@ bool command_event(enum event_command cmd, void *data)
|
||||
command_event(CMD_EVENT_DISCORD_UPDATE, &userdata);
|
||||
}
|
||||
#endif
|
||||
if (is_inited)
|
||||
{
|
||||
subsystem_current_count = 0;
|
||||
content_clear_subsystem();
|
||||
}
|
||||
}
|
||||
break;
|
||||
case CMD_EVENT_QUIT:
|
||||
@ -2177,6 +2188,12 @@ TODO: Add a setting for these tweaks */
|
||||
RARCH_LOG("%s\n", msg);
|
||||
}
|
||||
break;
|
||||
case CMD_EVENT_FPS_TOGGLE:
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
settings->bools.video_fps_show = !(settings->bools.video_fps_show);
|
||||
}
|
||||
break;
|
||||
case CMD_EVENT_OVERLAY_DEINIT:
|
||||
#ifdef HAVE_OVERLAY
|
||||
input_overlay_free(overlay_ptr);
|
||||
@ -2728,9 +2745,12 @@ TODO: Add a setting for these tweaks */
|
||||
settings_t *settings = config_get_ptr();
|
||||
bool new_fullscreen_state = !settings->bools.video_fullscreen
|
||||
&& !retroarch_is_forced_fullscreen();
|
||||
|
||||
if (!video_driver_has_windowed())
|
||||
return false;
|
||||
|
||||
retroarch_set_switching_display_mode();
|
||||
|
||||
/* we toggled manually, write the new value to settings */
|
||||
configuration_set_bool(settings, settings->bools.video_fullscreen,
|
||||
new_fullscreen_state);
|
||||
@ -2746,6 +2766,8 @@ TODO: Add a setting for these tweaks */
|
||||
video_driver_hide_mouse();
|
||||
else
|
||||
video_driver_show_mouse();
|
||||
|
||||
retroarch_unset_switching_display_mode();
|
||||
}
|
||||
break;
|
||||
case CMD_EVENT_COMMAND_DEINIT:
|
||||
|
@ -85,6 +85,8 @@ enum event_command
|
||||
CMD_EVENT_AUDIO_START,
|
||||
/* Mutes audio. */
|
||||
CMD_EVENT_AUDIO_MUTE_TOGGLE,
|
||||
/* Toggles FPS counter. */
|
||||
CMD_EVENT_FPS_TOGGLE,
|
||||
/* Initializes overlay. */
|
||||
CMD_EVENT_OVERLAY_INIT,
|
||||
/* Deinitializes overlay. */
|
||||
|
29
config.def.h
29
config.def.h
@ -117,14 +117,18 @@ static const unsigned monitor_index = 0;
|
||||
/* Window */
|
||||
/* Window size. A value of 0 uses window scale
|
||||
* multiplied by the core framebuffer size. */
|
||||
static const unsigned window_x = 0;
|
||||
static const unsigned window_y = 0;
|
||||
static const unsigned window_width = 1280;
|
||||
static const unsigned window_height = 720;
|
||||
|
||||
/* Fullscreen resolution. A value of 0 uses the desktop
|
||||
* resolution. */
|
||||
static const unsigned fullscreen_x = 0;
|
||||
static const unsigned fullscreen_y = 0;
|
||||
|
||||
/* Number of threads to use for video recording */
|
||||
|
||||
static const unsigned video_record_threads = 2;
|
||||
|
||||
/* Amount of transparency to use for the main window.
|
||||
* 1 is the most transparent while 100 is opaque.
|
||||
*/
|
||||
@ -236,10 +240,15 @@ static const float aspect_ratio = DEFAULT_ASPECT_RATIO;
|
||||
/* 1:1 PAR */
|
||||
static const bool aspect_ratio_auto = false;
|
||||
|
||||
#if defined(__CELLOS_LV2) || defined(_XBOX360) || defined(ANDROID_AARCH64)
|
||||
#if defined(__CELLOS_LV2) || defined(_XBOX360)
|
||||
static unsigned aspect_ratio_idx = ASPECT_RATIO_16_9;
|
||||
#elif defined(PSP)
|
||||
static unsigned aspect_ratio_idx = ASPECT_RATIO_CORE;
|
||||
#elif defined(_3DS)
|
||||
/* Previously defaulted to ASPECT_RATIO_4_3.
|
||||
* Non-4:3 content looks dreadful when stretched
|
||||
* to 4:3 on the 3DS screen... */
|
||||
static unsigned aspect_ratio_idx = ASPECT_RATIO_CORE;
|
||||
#elif defined(RARCH_CONSOLE)
|
||||
static unsigned aspect_ratio_idx = ASPECT_RATIO_4_3;
|
||||
#else
|
||||
@ -276,6 +285,7 @@ static bool quick_menu_show_take_screenshot = true;
|
||||
static bool quick_menu_show_save_load_state = true;
|
||||
static bool quick_menu_show_undo_save_load_state = true;
|
||||
static bool quick_menu_show_add_to_favorites = true;
|
||||
static bool quick_menu_show_reset_core_association = true;
|
||||
static bool quick_menu_show_options = true;
|
||||
static bool quick_menu_show_controls = true;
|
||||
static bool quick_menu_show_cheats = true;
|
||||
@ -545,8 +555,11 @@ static const int wasapi_sh_buffer_length = -16; /* auto */
|
||||
/* Enables displaying the current frames per second. */
|
||||
static const bool fps_show = false;
|
||||
|
||||
/* Show frame count on FPS display */
|
||||
static const bool framecount_show = true;
|
||||
/* Enables displaying the current frame count. */
|
||||
static const bool framecount_show = false;
|
||||
|
||||
/* Includes displaying the current memory usage/total with FPS/Frames. */
|
||||
static const bool memory_show = false;
|
||||
|
||||
/* Enables use of rewind. This will incur some memory footprint
|
||||
* depending on the save state buffer. */
|
||||
@ -577,7 +590,13 @@ static const bool pause_nonactive = true;
|
||||
|
||||
/* Saves non-volatile SRAM at a regular interval.
|
||||
* It is measured in seconds. A value of 0 disables autosave. */
|
||||
#if defined(__i386__) || defined(__i486__) || defined(__i686__) || defined(__x86_64__) || defined(_M_X64) || defined(_WIN32) || defined(OSX) || defined(ANDROID) || defined(IOS)
|
||||
/* Flush to file every 10 seconds on modern platforms by default */
|
||||
static const unsigned autosave_interval = 10;
|
||||
#else
|
||||
/* Default to disabled on I/O-constrained platforms */
|
||||
static const unsigned autosave_interval = 0;
|
||||
#endif
|
||||
|
||||
/* Publicly announce netplay */
|
||||
static const bool netplay_public_announce = true;
|
||||
|
@ -87,6 +87,7 @@ static const struct retro_keybind retro_keybinds_1[] = {
|
||||
{ true, RARCH_SCREENSHOT, MENU_ENUM_LABEL_VALUE_INPUT_META_SCREENSHOT, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_MUTE, MENU_ENUM_LABEL_VALUE_INPUT_META_MUTE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_OSK, MENU_ENUM_LABEL_VALUE_INPUT_META_OSK, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_FPS_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_FPS_TOGGLE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_NETPLAY_GAME_WATCH, MENU_ENUM_LABEL_VALUE_INPUT_META_NETPLAY_GAME_WATCH, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ENABLE_HOTKEY, MENU_ENUM_LABEL_VALUE_INPUT_META_ENABLE_HOTKEY, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_VOLUME_UP, MENU_ENUM_LABEL_VALUE_INPUT_META_VOLUME_UP, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
@ -165,6 +166,7 @@ static const struct retro_keybind retro_keybinds_1[] = {
|
||||
{ true, RARCH_SCREENSHOT, MENU_ENUM_LABEL_VALUE_INPUT_META_SCREENSHOT, RETROK_F8, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_MUTE, MENU_ENUM_LABEL_VALUE_INPUT_META_MUTE, RETROK_F9, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_OSK, MENU_ENUM_LABEL_VALUE_INPUT_META_OSK, RETROK_F12, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_FPS_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_FPS_TOGGLE, RETROK_F3, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_NETPLAY_GAME_WATCH, MENU_ENUM_LABEL_VALUE_INPUT_META_NETPLAY_GAME_WATCH, RETROK_i, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ENABLE_HOTKEY, MENU_ENUM_LABEL_VALUE_INPUT_META_ENABLE_HOTKEY, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_VOLUME_UP, MENU_ENUM_LABEL_VALUE_INPUT_META_VOLUME_UP, RETROK_KP_PLUS, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
|
@ -543,6 +543,9 @@ static enum location_driver_enum LOCATION_DEFAULT_DRIVER = LOCATION_CORELOCATION
|
||||
static enum location_driver_enum LOCATION_DEFAULT_DRIVER = LOCATION_NULL;
|
||||
#endif
|
||||
|
||||
#if defined(_3DS) && defined(HAVE_RGUI)
|
||||
static enum menu_driver_enum MENU_DEFAULT_DRIVER = MENU_RGUI;
|
||||
#else
|
||||
#if defined(HAVE_XUI)
|
||||
static enum menu_driver_enum MENU_DEFAULT_DRIVER = MENU_XUI;
|
||||
#elif defined(HAVE_MATERIALUI) && defined(RARCH_MOBILE)
|
||||
@ -556,7 +559,7 @@ static enum menu_driver_enum MENU_DEFAULT_DRIVER = MENU_RGUI;
|
||||
#else
|
||||
static enum menu_driver_enum MENU_DEFAULT_DRIVER = MENU_NULL;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#define GENERAL_SETTING(key, configval, default_enable, default_setting, type, handle_setting) \
|
||||
{ \
|
||||
@ -678,7 +681,7 @@ const char *config_get_default_audio(void)
|
||||
case AUDIO_PS2:
|
||||
return "ps2";
|
||||
case AUDIO_CTR:
|
||||
return "csnd";
|
||||
return "dsp";
|
||||
case AUDIO_SWITCH:
|
||||
return "switch";
|
||||
case AUDIO_RWEBAUDIO:
|
||||
@ -1317,7 +1320,8 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
|
||||
SETTING_BOOL("builtin_imageviewer_enable", &settings->bools.multimedia_builtin_imageviewer_enable, true, true, false);
|
||||
SETTING_BOOL("fps_show", &settings->bools.video_fps_show, true, false, false);
|
||||
SETTING_BOOL("statistics_show", &settings->bools.video_statistics_show, true, false, false);
|
||||
SETTING_BOOL("framecount_show", &settings->bools.video_framecount_show, true, true, false);
|
||||
SETTING_BOOL("framecount_show", &settings->bools.video_framecount_show, true, false, false);
|
||||
SETTING_BOOL("memory_show", &settings->bools.video_memory_show, true, false, false);
|
||||
SETTING_BOOL("ui_menubar_enable", &settings->bools.ui_menubar_enable, true, true, false);
|
||||
SETTING_BOOL("suspend_screensaver_enable", &settings->bools.ui_suspend_screensaver_enable, true, true, false);
|
||||
SETTING_BOOL("rewind_enable", &settings->bools.rewind_enable, true, rewind_enable, false);
|
||||
@ -1398,6 +1402,7 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
|
||||
SETTING_BOOL("quick_menu_show_save_load_state", &settings->bools.quick_menu_show_save_load_state, true, quick_menu_show_save_load_state, false);
|
||||
SETTING_BOOL("quick_menu_show_undo_save_load_state", &settings->bools.quick_menu_show_undo_save_load_state, true, quick_menu_show_undo_save_load_state, false);
|
||||
SETTING_BOOL("quick_menu_show_add_to_favorites", &settings->bools.quick_menu_show_add_to_favorites, true, quick_menu_show_add_to_favorites, false);
|
||||
SETTING_BOOL("quick_menu_show_reset_core_association", &settings->bools.quick_menu_show_reset_core_association, true, quick_menu_show_reset_core_association, false);
|
||||
SETTING_BOOL("quick_menu_show_options", &settings->bools.quick_menu_show_options, true, quick_menu_show_options, false);
|
||||
SETTING_BOOL("quick_menu_show_controls", &settings->bools.quick_menu_show_controls, true, quick_menu_show_controls, false);
|
||||
SETTING_BOOL("quick_menu_show_cheats", &settings->bools.quick_menu_show_cheats, true, quick_menu_show_cheats, false);
|
||||
@ -1514,6 +1519,7 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
|
||||
|
||||
SETTING_BOOL("video_msg_bgcolor_enable", &settings->bools.video_msg_bgcolor_enable, true, message_bgcolor_enable, false);
|
||||
SETTING_BOOL("video_window_show_decorations", &settings->bools.video_window_show_decorations, true, window_decorations, false);
|
||||
SETTING_BOOL("video_window_save_positions", &settings->bools.video_window_save_positions, true, false, false);
|
||||
|
||||
SETTING_BOOL("sustained_performance_mode", &settings->bools.sustained_performance_mode, true, sustained_performance_mode, false);
|
||||
|
||||
@ -1589,8 +1595,6 @@ static struct config_uint_setting *populate_settings_uint(settings_t *settings,
|
||||
SETTING_UINT("video_monitor_index", &settings->uints.video_monitor_index, true, monitor_index, false);
|
||||
SETTING_UINT("video_fullscreen_x", &settings->uints.video_fullscreen_x, true, fullscreen_x, false);
|
||||
SETTING_UINT("video_fullscreen_y", &settings->uints.video_fullscreen_y, true, fullscreen_y, false);
|
||||
SETTING_UINT("video_window_x", &settings->uints.video_window_x, true, fullscreen_x, false);
|
||||
SETTING_UINT("video_window_y", &settings->uints.video_window_y, true, fullscreen_y, false);
|
||||
SETTING_UINT("video_window_opacity", &settings->uints.video_window_opacity, true, window_opacity, false);
|
||||
#ifdef HAVE_COMMAND
|
||||
SETTING_UINT("network_cmd_port", &settings->uints.network_cmd_port, true, network_cmd_port, false);
|
||||
@ -1672,6 +1676,16 @@ static struct config_uint_setting *populate_settings_uint(settings_t *settings,
|
||||
SETTING_UINT("video_stream_quality", &settings->uints.video_stream_quality, true, RECORD_CONFIG_TYPE_STREAMING_LOW_QUALITY, false);
|
||||
SETTING_UINT("video_record_scale_factor", &settings->uints.video_record_scale_factor, true, 1, false);
|
||||
SETTING_UINT("video_stream_scale_factor", &settings->uints.video_stream_scale_factor, true, 1, false);
|
||||
SETTING_UINT("video_windowed_position_x", &settings->uints.window_position_x, true, 0, false);
|
||||
SETTING_UINT("video_windowed_position_y", &settings->uints.window_position_y, true, 0, false);
|
||||
SETTING_UINT("video_windowed_position_width", &settings->uints.window_position_width, true, window_width, false);
|
||||
SETTING_UINT("video_windowed_position_height", &settings->uints.window_position_height, true, window_height, false);
|
||||
|
||||
SETTING_UINT("video_record_threads", &settings->uints.video_record_threads, true, video_record_threads, false);
|
||||
|
||||
#ifdef HAVE_LIBNX
|
||||
SETTING_UINT("libnx_overclock", &settings->uints.libnx_overclock, true, SWITCH_DEFAULT_CPU_PROFILE, false);
|
||||
#endif
|
||||
|
||||
*size = count;
|
||||
|
||||
@ -3127,6 +3141,12 @@ static bool config_load_file(const char *path, bool set_defaults,
|
||||
strlcpy(settings->arrays.menu_driver, "rgui", sizeof(settings->arrays.menu_driver));
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LIBNX
|
||||
// Apply initial clocks
|
||||
extern void libnx_apply_overclock();
|
||||
libnx_apply_overclock();
|
||||
#endif
|
||||
|
||||
frontend_driver_set_sustained_performance_mode(settings->bools.sustained_performance_mode);
|
||||
recording_driver_update_streaming_url();
|
||||
|
||||
|
@ -103,6 +103,7 @@ typedef struct settings
|
||||
bool video_fps_show;
|
||||
bool video_statistics_show;
|
||||
bool video_framecount_show;
|
||||
bool video_memory_show;
|
||||
bool video_msg_bgcolor_enable;
|
||||
bool video_3ds_lcd_bottom;
|
||||
|
||||
@ -183,6 +184,7 @@ typedef struct settings
|
||||
bool quick_menu_show_save_load_state;
|
||||
bool quick_menu_show_undo_save_load_state;
|
||||
bool quick_menu_show_add_to_favorites;
|
||||
bool quick_menu_show_reset_core_association;
|
||||
bool quick_menu_show_options;
|
||||
bool quick_menu_show_controls;
|
||||
bool quick_menu_show_cheats;
|
||||
@ -293,6 +295,7 @@ typedef struct settings
|
||||
|
||||
bool automatically_add_content_to_playlist;
|
||||
bool video_window_show_decorations;
|
||||
bool video_window_save_positions;
|
||||
|
||||
bool sustained_performance_mode;
|
||||
} bools;
|
||||
@ -372,8 +375,6 @@ typedef struct settings
|
||||
unsigned network_cmd_port;
|
||||
unsigned network_remote_base_port;
|
||||
unsigned keymapper_port;
|
||||
unsigned video_window_x;
|
||||
unsigned video_window_y;
|
||||
unsigned video_window_opacity;
|
||||
unsigned crt_switch_resolution;
|
||||
unsigned crt_switch_resolution_super;
|
||||
@ -439,6 +440,15 @@ typedef struct settings
|
||||
|
||||
unsigned midi_volume;
|
||||
unsigned streaming_mode;
|
||||
|
||||
unsigned window_position_x;
|
||||
unsigned window_position_y;
|
||||
unsigned window_position_width;
|
||||
unsigned window_position_height;
|
||||
|
||||
unsigned video_record_threads;
|
||||
|
||||
unsigned libnx_overclock;
|
||||
} uints;
|
||||
|
||||
struct
|
||||
|
79
dynamic.c
79
dynamic.c
@ -176,12 +176,89 @@ void libretro_free_system_info(struct retro_system_info *info)
|
||||
|
||||
static bool environ_cb_get_system_info(unsigned cmd, void *data)
|
||||
{
|
||||
rarch_system_info_t *system = runloop_get_system_info();
|
||||
switch (cmd)
|
||||
{
|
||||
case RETRO_ENVIRONMENT_SET_SUPPORT_NO_GAME:
|
||||
*load_no_content_hook = *(const bool*)data;
|
||||
break;
|
||||
case RETRO_ENVIRONMENT_SET_SUBSYSTEM_INFO:
|
||||
{
|
||||
unsigned i, j;
|
||||
unsigned size = i;
|
||||
const struct retro_subsystem_info *info =
|
||||
(const struct retro_subsystem_info*)data;
|
||||
subsystem_current_count = 0;
|
||||
RARCH_LOG("Environ SET_SUBSYSTEM_INFO.\n");
|
||||
|
||||
for (i = 0; info[i].ident; i++)
|
||||
{
|
||||
RARCH_LOG("Subsystem ID: %d\n", i);
|
||||
RARCH_LOG("Special game type: %s\n", info[i].desc);
|
||||
RARCH_LOG(" Ident: %s\n", info[i].ident);
|
||||
RARCH_LOG(" ID: %u\n", info[i].id);
|
||||
RARCH_LOG(" Content:\n");
|
||||
for (j = 0; j < info[i].num_roms; j++)
|
||||
{
|
||||
RARCH_LOG(" %s (%s)\n",
|
||||
info[i].roms[j].desc, info[i].roms[j].required ?
|
||||
"required" : "optional");
|
||||
}
|
||||
}
|
||||
|
||||
RARCH_LOG("Subsystems: %d\n", i);
|
||||
size = i;
|
||||
|
||||
if (size > SUBSYSTEM_MAX_SUBSYSTEMS)
|
||||
RARCH_WARN("Subsystems exceed subsystem max, clamping to %d\n", SUBSYSTEM_MAX_SUBSYSTEMS);
|
||||
|
||||
if (system)
|
||||
{
|
||||
for (i = 0; i < size && i < SUBSYSTEM_MAX_SUBSYSTEMS; i++)
|
||||
{
|
||||
subsystem_data[i].desc = strdup(info[i].desc);
|
||||
subsystem_data[i].ident = strdup(info[i].ident);
|
||||
subsystem_data[i].id = info[i].id;
|
||||
subsystem_data[i].num_roms = info[i].num_roms;
|
||||
|
||||
if (subsystem_data[i].num_roms > SUBSYSTEM_MAX_SUBSYSTEM_ROMS)
|
||||
RARCH_WARN("Subsystems exceed subsystem max roms, clamping to %d\n", SUBSYSTEM_MAX_SUBSYSTEM_ROMS);
|
||||
|
||||
for (j = 0; j < subsystem_data[i].num_roms && j < SUBSYSTEM_MAX_SUBSYSTEM_ROMS; j++)
|
||||
{
|
||||
subsystem_data_roms[i][j].desc = strdup(info[i].roms[j].desc);
|
||||
subsystem_data_roms[i][j].valid_extensions = strdup(info[i].roms[j].valid_extensions);
|
||||
subsystem_data_roms[i][j].required = info[i].roms[j].required;
|
||||
subsystem_data_roms[i][j].block_extract = info[i].roms[j].block_extract;
|
||||
subsystem_data_roms[i][j].need_fullpath = info[i].roms[j].need_fullpath;
|
||||
}
|
||||
subsystem_data[i].roms = subsystem_data_roms[i];
|
||||
}
|
||||
|
||||
|
||||
subsystem_current_count = size <= SUBSYSTEM_MAX_SUBSYSTEMS ? size : SUBSYSTEM_MAX_SUBSYSTEMS;
|
||||
#if 0
|
||||
RARCH_LOG("Subsystems: %d\n", subsystem_current_count);
|
||||
|
||||
for (i = 0; i < subsystem_current_count; i++)
|
||||
{
|
||||
RARCH_LOG("Subsystem ID: %d\n", i);
|
||||
RARCH_LOG("Special game type: %s\n", subsystem_data[i].desc);
|
||||
RARCH_LOG(" Ident: %s\n", subsystem_data[i].ident);
|
||||
RARCH_LOG(" ID: %u\n", subsystem_data[i].id);
|
||||
RARCH_LOG(" Content:\n");
|
||||
|
||||
for (j = 0; j < subsystem_data[i].num_roms; j++)
|
||||
{
|
||||
RARCH_LOG(" %s (%s)\n",
|
||||
subsystem_data[i].roms[j].desc, subsystem_data[i].roms[j].required ?
|
||||
"required" : "optional");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
@ -396,7 +473,6 @@ bool libretro_get_system_info(const char *path,
|
||||
#ifdef HAVE_DYNAMIC
|
||||
dylib_close(lib);
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -1393,7 +1469,6 @@ bool rarch_environment_cb(unsigned cmd, void *data)
|
||||
cb, offsetof(struct retro_hw_render_callback, stencil));
|
||||
memset(hwr + offsetof(struct retro_hw_render_callback, stencil),
|
||||
0, sizeof(*cb) - offsetof(struct retro_hw_render_callback, stencil));
|
||||
|
||||
}
|
||||
else
|
||||
memcpy(hwr, cb, sizeof(*cb));
|
||||
|
@ -146,6 +146,15 @@ bool init_libretro_sym_custom(enum rarch_core_type type, struct retro_core_t *cu
|
||||
**/
|
||||
void uninit_libretro_sym(struct retro_core_t *core);
|
||||
|
||||
/* Arbitrary twenty subsystems limite */
|
||||
#define SUBSYSTEM_MAX_SUBSYSTEMS 20
|
||||
/* Arbitrary 10 roms for each subsystem limit */
|
||||
#define SUBSYSTEM_MAX_SUBSYSTEM_ROMS 10
|
||||
|
||||
struct retro_subsystem_info subsystem_data[SUBSYSTEM_MAX_SUBSYSTEMS];
|
||||
struct retro_subsystem_rom_info subsystem_data_roms[SUBSYSTEM_MAX_SUBSYSTEMS][SUBSYSTEM_MAX_SUBSYSTEM_ROMS];
|
||||
unsigned subsystem_current_count;
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
|
@ -240,13 +240,15 @@ static void frontend_ctr_exec(const char* path, bool should_load_game)
|
||||
}
|
||||
else
|
||||
{
|
||||
RARCH_LOG("\n");
|
||||
RARCH_LOG("\n");
|
||||
RARCH_LOG("Warning:\n");
|
||||
RARCH_LOG("First core launch may take 20 seconds!\n");
|
||||
RARCH_LOG("Do not force quit before then or your memory card may be corrupted!\n");
|
||||
RARCH_LOG("\n");
|
||||
RARCH_LOG("\n");
|
||||
RARCH_WARN("\n");
|
||||
RARCH_WARN("\n");
|
||||
RARCH_WARN("Warning:\n");
|
||||
RARCH_WARN("First core launch may take 20\n");
|
||||
RARCH_WARN("seconds! Do not force quit\n");
|
||||
RARCH_WARN("before then or your memory\n");
|
||||
RARCH_WARN("card may be corrupted!\n");
|
||||
RARCH_WARN("\n");
|
||||
RARCH_WARN("\n");
|
||||
exec_cia(path, arg_data);
|
||||
}
|
||||
|
||||
@ -356,6 +358,17 @@ static void ctr_check_dspfirm(void)
|
||||
}
|
||||
fclose(code_fp);
|
||||
}
|
||||
else
|
||||
{
|
||||
RARCH_WARN("\n");
|
||||
RARCH_WARN("\n");
|
||||
RARCH_WARN("Warning:\n");
|
||||
RARCH_WARN("3DS DSP dump is missing.\n");
|
||||
RARCH_WARN("A working DSP dump is required\n");
|
||||
RARCH_WARN("for correct operation.\n");
|
||||
RARCH_WARN("\n");
|
||||
RARCH_WARN("\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -13,6 +13,9 @@
|
||||
|
||||
#ifdef HAVE_LIBNX
|
||||
#include <switch.h>
|
||||
#include "../../switch_performance_profiles.h"
|
||||
#include "../../configuration.h"
|
||||
#include <unistd.h>
|
||||
#else
|
||||
#include <libtransistor/nx.h>
|
||||
#include <libtransistor/ipc_helpers.h>
|
||||
@ -55,6 +58,8 @@ static const char *elf_path_cst = "/switch/retroarch_switch.nro";
|
||||
|
||||
static uint64_t frontend_switch_get_mem_used(void);
|
||||
|
||||
bool platform_switch_has_focus = true;
|
||||
|
||||
#ifdef HAVE_LIBNX
|
||||
|
||||
/* Splash */
|
||||
@ -68,10 +73,46 @@ static AppletHookCookie applet_hook_cookie;
|
||||
extern bool nxlink_connected;
|
||||
#endif
|
||||
|
||||
static void on_applet_hook(AppletHookType hook, void* param) {
|
||||
if(hook == AppletHookType_OnExitRequest) {
|
||||
void libnx_apply_overclock() {
|
||||
const size_t profiles_count = sizeof(SWITCH_CPU_PROFILES) / sizeof(SWITCH_CPU_PROFILES[1]);
|
||||
if (config_get_ptr()->uints.libnx_overclock >= 0 && config_get_ptr()->uints.libnx_overclock <= profiles_count)
|
||||
pcvSetClockRate(PcvModule_Cpu, SWITCH_CPU_SPEEDS_VALUES[config_get_ptr()->uints.libnx_overclock]);
|
||||
}
|
||||
|
||||
static void on_applet_hook(AppletHookType hook, void *param) {
|
||||
u32 performance_mode;
|
||||
AppletFocusState focus_state;
|
||||
|
||||
/* Exit request */
|
||||
switch (hook)
|
||||
{
|
||||
case AppletHookType_OnExitRequest:
|
||||
RARCH_LOG("Got AppletHook OnExitRequest, exiting.\n");
|
||||
retroarch_main_quit();
|
||||
break;
|
||||
|
||||
/* Focus state*/
|
||||
case AppletHookType_OnFocusState:
|
||||
focus_state = appletGetFocusState();
|
||||
RARCH_LOG("Got AppletHook OnFocusState - new focus state is %d\n", focus_state);
|
||||
platform_switch_has_focus = focus_state == AppletFocusState_Focused;
|
||||
if(!platform_switch_has_focus) {
|
||||
pcvSetClockRate(PcvModule_Cpu, 1020000000);
|
||||
} else {
|
||||
libnx_apply_overclock();
|
||||
}
|
||||
break;
|
||||
|
||||
/* Performance mode */
|
||||
case AppletHookType_OnPerformanceMode:
|
||||
// 0 == Handheld, 1 == Docked
|
||||
// Since CPU doesn't change we just re-apply
|
||||
performance_mode = appletGetPerformanceMode();
|
||||
libnx_apply_overclock();
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -201,6 +242,8 @@ static void frontend_switch_deinit(void *data)
|
||||
|
||||
#ifdef HAVE_LIBNX
|
||||
nifmExit();
|
||||
pcvSetClockRate(PcvModule_Cpu, 1020000000); // Always 1020 MHz, unless SDEV
|
||||
pcvExit();
|
||||
#if defined(SWITCH) && defined(NXLINK)
|
||||
socketExit();
|
||||
#endif
|
||||
@ -225,7 +268,7 @@ static void frontend_switch_deinit(void *data)
|
||||
#ifdef HAVE_LIBNX
|
||||
static void frontend_switch_exec(const char *path, bool should_load_game)
|
||||
{
|
||||
char game_path[PATH_MAX];
|
||||
char game_path[PATH_MAX-4];
|
||||
const char *arg_data[3];
|
||||
char error_string[200 + PATH_MAX];
|
||||
int args = 0;
|
||||
@ -613,14 +656,20 @@ static void frontend_switch_shutdown(bool unused)
|
||||
/* runloop_get_system_info isnt initialized that early.. */
|
||||
extern void retro_get_system_info(struct retro_system_info *info);
|
||||
|
||||
|
||||
static void frontend_switch_init(void *data)
|
||||
{
|
||||
|
||||
(void)data;
|
||||
|
||||
#ifdef HAVE_LIBNX
|
||||
nifmInitialize();
|
||||
pcvInitialize();
|
||||
|
||||
appletLockExit();
|
||||
appletHook(&applet_hook_cookie, on_applet_hook, NULL);
|
||||
appletSetFocusHandlingMode(AppletFocusHandlingMode_NoSuspend);
|
||||
|
||||
#ifndef HAVE_OPENGL
|
||||
/* Init Resolution before initDefault */
|
||||
gfxInitResolution(1280, 720);
|
||||
@ -631,7 +680,10 @@ static void frontend_switch_init(void *data)
|
||||
gfxConfigureTransform(0);
|
||||
#endif /* HAVE_OPENGL */
|
||||
|
||||
appletInitializeGamePlayRecording();
|
||||
bool recording_supported = false;
|
||||
appletIsGamePlayRecordingSupported(&recording_supported);
|
||||
if(recording_supported)
|
||||
appletInitializeGamePlayRecording();
|
||||
|
||||
#ifdef NXLINK
|
||||
socketInitializeDefault();
|
||||
@ -776,6 +828,8 @@ static enum frontend_powerstate frontend_switch_get_powerstate(int *seconds, int
|
||||
case ChargerType_Charger:
|
||||
case ChargerType_Usb:
|
||||
return FRONTEND_POWERSTATE_CHARGING;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return FRONTEND_POWERSTATE_NO_SOURCE;
|
||||
|
@ -305,8 +305,9 @@ void dxgi_copy(
|
||||
void dxgi_update_title(video_frame_info_t* video_info)
|
||||
{
|
||||
const ui_window_t* window = ui_companion_driver_get_window_ptr();
|
||||
const settings_t *settings = config_get_ptr();
|
||||
|
||||
if (video_info->fps_show)
|
||||
if (settings->bools.video_memory_show)
|
||||
{
|
||||
MEMORYSTATUS stat;
|
||||
char mem[128];
|
||||
@ -315,7 +316,7 @@ void dxgi_update_title(video_frame_info_t* video_info)
|
||||
|
||||
GlobalMemoryStatus(&stat);
|
||||
snprintf(
|
||||
mem, sizeof(mem), "|| MEM: %.2f/%.2fMB", stat.dwAvailPhys / (1024.0f * 1024.0f),
|
||||
mem, sizeof(mem), " || MEM: %.2f/%.2fMB", stat.dwAvailPhys / (1024.0f * 1024.0f),
|
||||
stat.dwTotalPhys / (1024.0f * 1024.0f));
|
||||
strlcat(video_info->fps_text, mem, sizeof(video_info->fps_text));
|
||||
}
|
||||
|
@ -309,13 +309,37 @@ static EGLDisplay get_egl_display(EGLenum platform, void *native)
|
||||
return eglGetDisplay((EGLNativeDisplayType) native);
|
||||
}
|
||||
|
||||
bool egl_default_accept_config_cb(void *display_data, EGLDisplay dpy, EGLConfig config)
|
||||
{
|
||||
/* Makes sure we have 8 bit color. */
|
||||
EGLint r, g, b;
|
||||
if (!eglGetConfigAttrib(dpy, config, EGL_RED_SIZE, &r))
|
||||
return false;
|
||||
if (!eglGetConfigAttrib(dpy, config, EGL_GREEN_SIZE, &g))
|
||||
return false;
|
||||
if (!eglGetConfigAttrib(dpy, config, EGL_BLUE_SIZE, &b))
|
||||
return false;
|
||||
|
||||
if (r != 8 || g != 8 || b != 8)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool egl_init_context(egl_ctx_data_t *egl,
|
||||
EGLenum platform,
|
||||
void *display_data,
|
||||
EGLint *major, EGLint *minor,
|
||||
EGLint *n, const EGLint *attrib_ptr)
|
||||
EGLint *n, const EGLint *attrib_ptr,
|
||||
egl_accept_config_cb_t cb)
|
||||
{
|
||||
EGLDisplay dpy = get_egl_display(platform, display_data);
|
||||
EGLint i;
|
||||
EGLConfig *configs = NULL;
|
||||
EGLint count = 0;
|
||||
EGLint matched = 0;
|
||||
int config_index = -1;
|
||||
EGLDisplay dpy = get_egl_display(platform, display_data);
|
||||
|
||||
if (dpy == EGL_NO_DISPLAY)
|
||||
{
|
||||
RARCH_ERR("[EGL]: Couldn't get EGL display.\n");
|
||||
@ -329,8 +353,39 @@ bool egl_init_context(egl_ctx_data_t *egl,
|
||||
|
||||
RARCH_LOG("[EGL]: EGL version: %d.%d\n", *major, *minor);
|
||||
|
||||
if (!eglChooseConfig(egl->dpy, attrib_ptr, &egl->config, 1, n) || *n != 1)
|
||||
if (!eglGetConfigs(egl->dpy, NULL, 0, &count) || count < 1)
|
||||
{
|
||||
RARCH_ERR("[EGL]: No configs to choose from.\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
configs = malloc(count * sizeof(*configs));
|
||||
if (!configs)
|
||||
return false;
|
||||
|
||||
if (!eglChooseConfig(egl->dpy, attrib_ptr,
|
||||
configs, count, &matched) || !matched)
|
||||
{
|
||||
RARCH_ERR("[EGL]: No EGL configs with appropriate attributes.\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
if (!cb || cb(display_data, egl->dpy, configs[i]))
|
||||
{
|
||||
egl->config = configs[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
free(configs);
|
||||
|
||||
if (i == count)
|
||||
{
|
||||
RARCH_ERR("[EGL]: No EGL config found which satifies requirements.\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
egl->major = g_egl_major;
|
||||
egl->minor = g_egl_minor;
|
||||
|
@ -88,13 +88,17 @@ void egl_set_swap_interval(egl_ctx_data_t *egl, int interval);
|
||||
|
||||
void egl_get_video_size(egl_ctx_data_t *egl, unsigned *width, unsigned *height);
|
||||
|
||||
typedef bool (*egl_accept_config_cb_t)(void *display_data, EGLDisplay dpy, EGLConfig config);
|
||||
bool egl_default_accept_config_cb(void *display_data, EGLDisplay dpy, EGLConfig config);
|
||||
|
||||
bool egl_init_context(egl_ctx_data_t *egl,
|
||||
EGLenum platform,
|
||||
void *display_data,
|
||||
EGLint *major,
|
||||
EGLint *minor,
|
||||
EGLint *n,
|
||||
const EGLint *attrib_ptr);
|
||||
const EGLint *attrib_ptr,
|
||||
egl_accept_config_cb_t cb);
|
||||
|
||||
bool egl_create_context(egl_ctx_data_t *egl, const EGLint *egl_attribs);
|
||||
|
||||
|
@ -76,6 +76,7 @@ typedef struct
|
||||
/*! @brief end commits the command buffer */
|
||||
- (void)end;
|
||||
|
||||
- (void)setRotation:(unsigned)rotation;
|
||||
- (bool)readBackBuffer:(uint8_t *)buffer;
|
||||
|
||||
@end
|
||||
|
@ -53,10 +53,16 @@
|
||||
|
||||
id<MTLRenderPipelineState> _states[GFX_MAX_SHADERS][2];
|
||||
id<MTLRenderPipelineState> _clearState;
|
||||
Uniforms _uniforms;
|
||||
|
||||
bool _captureEnabled;
|
||||
id<MTLTexture> _backBuffer;
|
||||
|
||||
unsigned _rotation;
|
||||
matrix_float4x4 _mvp_no_rot;
|
||||
matrix_float4x4 _mvp;
|
||||
|
||||
Uniforms _uniforms;
|
||||
Uniforms _uniformsNoRotate;
|
||||
}
|
||||
|
||||
- (instancetype)initWithDevice:(id<MTLDevice>)d
|
||||
@ -75,6 +81,11 @@
|
||||
_commandQueue = [_device newCommandQueue];
|
||||
_clearColor = MTLClearColorMake(0, 0, 0, 1);
|
||||
_uniforms.projectionMatrix = matrix_proj_ortho(0, 1, 0, 1);
|
||||
|
||||
_rotation = 0;
|
||||
[self setRotation:0];
|
||||
_mvp_no_rot = matrix_proj_ortho(0, 1, 0, 1);
|
||||
_mvp = matrix_proj_ortho(0, 1, 0, 1);
|
||||
|
||||
{
|
||||
MTLSamplerDescriptor *sd = [MTLSamplerDescriptor new];
|
||||
@ -130,6 +141,27 @@
|
||||
return &_uniforms;
|
||||
}
|
||||
|
||||
- (void)setRotation:(unsigned)rotation
|
||||
{
|
||||
_rotation = 270 * rotation;
|
||||
|
||||
/* Calculate projection. */
|
||||
_mvp_no_rot = matrix_proj_ortho(0, 1, 0, 1);
|
||||
|
||||
bool allow_rotate = true;
|
||||
if (!allow_rotate)
|
||||
{
|
||||
_mvp = _mvp_no_rot;
|
||||
return;
|
||||
}
|
||||
|
||||
matrix_float4x4 rot = matrix_rotate_z((float)(M_PI * _rotation / 180.0f));
|
||||
_mvp = simd_mul(rot, _mvp_no_rot);
|
||||
|
||||
_uniforms.projectionMatrix = _mvp;
|
||||
_uniformsNoRotate.projectionMatrix = _mvp_no_rot;
|
||||
}
|
||||
|
||||
- (void)setDisplaySyncEnabled:(bool)displaySyncEnabled
|
||||
{
|
||||
#if TARGET_OS_OSX
|
||||
|
@ -55,6 +55,7 @@ typedef NS_ENUM(NSUInteger, RTextureFilter)
|
||||
};
|
||||
|
||||
extern matrix_float4x4 matrix_proj_ortho(float left, float right, float top, float bottom);
|
||||
extern matrix_float4x4 matrix_rotate_z(float rot);
|
||||
extern matrix_float4x4 make_matrix_float4x4(const float *v);
|
||||
|
||||
#endif /* RendererCommon_h */
|
||||
|
@ -86,3 +86,17 @@ matrix_float4x4 matrix_proj_ortho(float left, float right, float top, float bott
|
||||
matrix_float4x4 mat = {P, Q, R, S};
|
||||
return mat;
|
||||
}
|
||||
|
||||
matrix_float4x4 matrix_rotate_z(float rot)
|
||||
{
|
||||
float cz, sz;
|
||||
__sincosf(rot, &sz, &cz);
|
||||
|
||||
simd_float4 P = simd_make_float4(cz, -sz, 0, 0);
|
||||
simd_float4 Q = simd_make_float4(sz, cz, 0, 0);
|
||||
simd_float4 R = simd_make_float4( 0, 0, 1, 0);
|
||||
simd_float4 S = simd_make_float4( 0, 0, 0, 1);
|
||||
|
||||
matrix_float4x4 mat = {P, Q, R, S};
|
||||
return mat;
|
||||
}
|
||||
|
@ -96,6 +96,8 @@ extern MTLPixelFormat SelectOptimalPixelFormat(MTLPixelFormat fmt);
|
||||
|
||||
/*! @brief setNeedsResize triggers a display resize */
|
||||
- (void)setNeedsResize;
|
||||
- (void)setViewportWidth:(unsigned)width height:(unsigned)height forceFull:(BOOL)forceFull allowRotate:(BOOL)allowRotate;
|
||||
- (void)setRotation:(unsigned)rotation;
|
||||
|
||||
@end
|
||||
|
||||
|
@ -216,21 +216,19 @@
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void)_updateUniforms
|
||||
- (void)setViewportWidth:(unsigned)width height:(unsigned)height forceFull:(BOOL)forceFull allowRotate:(BOOL)allowRotate
|
||||
{
|
||||
_uniforms.projectionMatrix = matrix_proj_ortho(0, 1, 0, 1);
|
||||
}
|
||||
|
||||
- (void)_updateViewport:(CGSize)size
|
||||
{
|
||||
RARCH_LOG("[Metal]: _updateViewport size %.0fx%.0f\n", size.width, size.height);
|
||||
#if 0
|
||||
RARCH_LOG("[Metal]: setViewportWidth size %dx%d\n", width, height);
|
||||
#endif
|
||||
|
||||
_viewport->full_width = (unsigned int)size.width;
|
||||
_viewport->full_height = (unsigned int)size.height;
|
||||
_viewport->full_width = width;
|
||||
_viewport->full_height = height;
|
||||
video_driver_set_size(&_viewport->full_width, &_viewport->full_height);
|
||||
_layer.drawableSize = size;
|
||||
video_driver_update_viewport(_viewport, NO, _keepAspect);
|
||||
_layer.drawableSize = CGSizeMake(width, height);
|
||||
video_driver_update_viewport(_viewport, forceFull, _keepAspect);
|
||||
|
||||
// update matrix
|
||||
_context.viewport = _viewport;
|
||||
|
||||
_viewportMVP.outputSize = simd_make_float2(_viewport->full_width, _viewport->full_height);
|
||||
@ -256,8 +254,10 @@
|
||||
[self _beginFrame];
|
||||
|
||||
_frameView.frameCount = frameCount;
|
||||
_frameView.size = CGSizeMake(width, height);
|
||||
[_frameView updateFrame:data pitch:pitch];
|
||||
if (data && width && height) {
|
||||
_frameView.size = CGSizeMake(width, height);
|
||||
[_frameView updateFrame:data pitch:pitch];
|
||||
}
|
||||
|
||||
[self _drawViews:video_info];
|
||||
|
||||
@ -277,7 +277,7 @@
|
||||
id<MTLRenderCommandEncoder> rce = _context.rce;
|
||||
[rce pushDebugGroup:@"overlay"];
|
||||
[rce setRenderPipelineState:[_context getStockShader:VIDEO_SHADER_STOCK_BLEND blend:YES]];
|
||||
[rce setVertexBytes:&_uniforms length:sizeof(_uniforms) atIndex:BufferIndexUniforms];
|
||||
[rce setVertexBytes:_context.uniforms length:sizeof(*_context.uniforms) atIndex:BufferIndexUniforms];
|
||||
[rce setFragmentSamplerState:_samplerStateLinear atIndex:SamplerIndexDraw];
|
||||
[_overlay drawWithEncoder:rce];
|
||||
[rce popDebugGroup];
|
||||
@ -338,7 +338,6 @@
|
||||
_context.viewport = _viewport;
|
||||
}
|
||||
[_context begin];
|
||||
[self _updateUniforms];
|
||||
}
|
||||
|
||||
- (void)_drawViews:(video_frame_info_t *)video_info
|
||||
@ -351,7 +350,7 @@
|
||||
|
||||
if ((_frameView.drawState & ViewDrawStateEncoder) != 0)
|
||||
{
|
||||
[rce setVertexBytes:&_uniforms length:sizeof(_uniforms) atIndex:BufferIndexUniforms];
|
||||
[rce setVertexBytes:_context.uniforms length:sizeof(*_context.uniforms) atIndex:BufferIndexUniforms];
|
||||
[rce setRenderPipelineState:_t_pipelineStateNoAlpha];
|
||||
if (_frameView.filter == RTextureFilterNearest)
|
||||
{
|
||||
@ -410,6 +409,11 @@
|
||||
// TODO(sgc): resize all drawables
|
||||
}
|
||||
|
||||
- (void)setRotation:(unsigned)rotation
|
||||
{
|
||||
[_context setRotation:rotation];
|
||||
}
|
||||
|
||||
- (Uniforms *)viewportMVP
|
||||
{
|
||||
return &_viewportMVP;
|
||||
@ -419,7 +423,7 @@
|
||||
|
||||
- (void)mtkView:(MTKView *)view drawableSizeWillChange:(CGSize)size
|
||||
{
|
||||
[self _updateViewport:size];
|
||||
[self setViewportWidth:(unsigned int)size.width height:(unsigned int)size.height forceFull:NO allowRotate:YES];
|
||||
}
|
||||
|
||||
- (void)drawInMTKView:(MTKView *)view
|
||||
@ -897,7 +901,7 @@ typedef struct MTLALIGN(16)
|
||||
rce = [cb renderCommandEncoderWithDescriptor:rpd];
|
||||
}
|
||||
|
||||
#if METAL_DEBUG
|
||||
#if DEBUG && METAL_DEBUG
|
||||
rce.label = [NSString stringWithFormat:@"pass %d", i];
|
||||
#endif
|
||||
|
||||
@ -1126,6 +1130,8 @@ typedef struct MTLALIGN(16)
|
||||
texture_t *source = &_engine.frame.texture[0];
|
||||
for (unsigned i = 0; i < shader->passes; source = &_engine.pass[i++].rt)
|
||||
{
|
||||
matrix_float4x4 *mvp = (i == shader->passes-1) ? &_context.uniforms->projectionMatrix : &_engine.mvp;
|
||||
|
||||
/* clang-format off */
|
||||
semantics_map_t semantics_map = {
|
||||
{
|
||||
@ -1154,7 +1160,7 @@ typedef struct MTLALIGN(16)
|
||||
&_engine.luts[0].size_data, sizeof(*_engine.luts)},
|
||||
},
|
||||
{
|
||||
&_engine.mvp, /* MVP */
|
||||
mvp, /* MVP */
|
||||
&_engine.pass[i].rt.size_data, /* OutputSize */
|
||||
&_engine.frame.output_size, /* FinalViewportSize */
|
||||
&_engine.pass[i].frame_count, /* FrameCount */
|
||||
|
@ -42,7 +42,7 @@
|
||||
#define VENDOR_ID_NV 0x10DE
|
||||
#define VENDOR_ID_INTEL 0x8086
|
||||
|
||||
#ifdef _WIN32
|
||||
#if defined(_WIN32) || defined(ANDROID)
|
||||
#define VULKAN_EMULATE_MAILBOX
|
||||
#endif
|
||||
|
||||
|
@ -342,6 +342,7 @@ typedef struct vk
|
||||
struct video_viewport vp;
|
||||
struct vk_per_frame *chain;
|
||||
struct vk_per_frame swapchain[VULKAN_MAX_SWAPCHAIN_IMAGES];
|
||||
struct vk_texture default_texture;
|
||||
|
||||
/* Currently active command buffer. */
|
||||
VkCommandBuffer cmd;
|
||||
|
24
gfx/common/wayland/generate_wayland_protos.sh
Executable file
24
gfx/common/wayland/generate_wayland_protos.sh
Executable file
@ -0,0 +1,24 @@
|
||||
#!/bin/sh
|
||||
WAYSCAN=/usr/bin/wayland-scanner
|
||||
WAYLAND_PROTOS=/usr/share/wayland-protocols
|
||||
OUTPUT=gfx/common/wayland
|
||||
|
||||
if [ ! -d $OUTPUT ]; then
|
||||
mkdir $OUTPUT
|
||||
fi
|
||||
|
||||
#Generate xdg-shell_v6 header and .c files
|
||||
$WAYSCAN client-header $WAYLAND_PROTOS/unstable/xdg-shell/xdg-shell-unstable-v6.xml $OUTPUT/xdg-shell-unstable-v6.h
|
||||
$WAYSCAN private-code $WAYLAND_PROTOS/unstable/xdg-shell/xdg-shell-unstable-v6.xml $OUTPUT/xdg-shell-unstable-v6.c
|
||||
|
||||
#Generate xdg-shell header and .c files
|
||||
$WAYSCAN client-header $WAYLAND_PROTOS/stable/xdg-shell/xdg-shell.xml $OUTPUT/xdg-shell.h
|
||||
$WAYSCAN private-code $WAYLAND_PROTOS/stable/xdg-shell/xdg-shell.xml $OUTPUT/xdg-shell.c
|
||||
|
||||
#Generate idle-inhibit header and .c files
|
||||
$WAYSCAN client-header $WAYLAND_PROTOS/unstable/idle-inhibit/idle-inhibit-unstable-v1.xml $OUTPUT/idle-inhibit-unstable-v1.h
|
||||
$WAYSCAN private-code $WAYLAND_PROTOS/unstable/idle-inhibit/idle-inhibit-unstable-v1.xml $OUTPUT/idle-inhibit-unstable-v1.c
|
||||
|
||||
#Generate xdg-decoration header and .c files
|
||||
$WAYSCAN client-header $WAYLAND_PROTOS/unstable/xdg-decoration/xdg-decoration-unstable-v1.xml $OUTPUT/xdg-decoration-unstable-v1.h
|
||||
$WAYSCAN private-code $WAYLAND_PROTOS/unstable/xdg-decoration/xdg-decoration-unstable-v1.xml $OUTPUT/xdg-decoration-unstable-v1.c
|
@ -200,6 +200,8 @@ static bool g_win32_quit = false;
|
||||
|
||||
static int g_win32_pos_x = CW_USEDEFAULT;
|
||||
static int g_win32_pos_y = CW_USEDEFAULT;
|
||||
static unsigned g_win32_pos_width = 0;
|
||||
static unsigned g_win32_pos_height = 0;
|
||||
|
||||
unsigned g_win32_resize_width = 0;
|
||||
unsigned g_win32_resize_height = 0;
|
||||
@ -617,6 +619,54 @@ static LRESULT win32_handle_keyboard_event(HWND hwnd, UINT message,
|
||||
}
|
||||
#endif
|
||||
|
||||
static void win32_set_position_from_config(void)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
int border_thickness = GetSystemMetrics(SM_CXSIZEFRAME);
|
||||
int title_bar_height = GetSystemMetrics(SM_CYCAPTION);
|
||||
int menu_bar_height = GetSystemMetrics(SM_CYMENU);
|
||||
if (!settings->bools.video_window_save_positions)
|
||||
return;
|
||||
|
||||
g_win32_pos_x = settings->uints.window_position_x;
|
||||
g_win32_pos_y = settings->uints.window_position_y;
|
||||
g_win32_pos_width = settings->uints.window_position_width + border_thickness * 2;
|
||||
g_win32_pos_height= settings->uints.window_position_height + border_thickness * 2 + title_bar_height;
|
||||
}
|
||||
|
||||
static void win32_save_position(void)
|
||||
{
|
||||
RECT rect;
|
||||
int border_thickness = GetSystemMetrics(SM_CXSIZEFRAME);
|
||||
int title_bar_height = GetSystemMetrics(SM_CYCAPTION);
|
||||
int menu_bar_height = GetSystemMetrics(SM_CYMENU);
|
||||
WINDOWPLACEMENT placement;
|
||||
settings_t *settings = config_get_ptr();
|
||||
memset(&placement, 0, sizeof(placement));
|
||||
placement.length = sizeof(placement);
|
||||
|
||||
GetWindowPlacement(main_window.hwnd, &placement);
|
||||
|
||||
g_win32_pos_x = placement.rcNormalPosition.left;
|
||||
g_win32_pos_y = placement.rcNormalPosition.top;
|
||||
|
||||
if (GetWindowRect(main_window.hwnd, &rect))
|
||||
{
|
||||
g_win32_pos_width = rect.right - rect.left;
|
||||
g_win32_pos_height = rect.bottom - rect.top;
|
||||
}
|
||||
if (settings && settings->bools.video_window_save_positions)
|
||||
{
|
||||
if (!settings->bools.video_fullscreen && !retroarch_is_forced_fullscreen() && !retroarch_is_switching_display_mode())
|
||||
{
|
||||
settings->uints.window_position_x = g_win32_pos_x;
|
||||
settings->uints.window_position_y = g_win32_pos_y;
|
||||
settings->uints.window_position_width = g_win32_pos_width - border_thickness * 2;
|
||||
settings->uints.window_position_height = g_win32_pos_height - border_thickness * 2 - title_bar_height - (settings->bools.ui_menubar_enable ? menu_bar_height : 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static LRESULT CALLBACK WndProcCommon(bool *quit, HWND hwnd, UINT message,
|
||||
WPARAM wparam, LPARAM lparam)
|
||||
{
|
||||
@ -649,21 +699,16 @@ static LRESULT CALLBACK WndProcCommon(bool *quit, HWND hwnd, UINT message,
|
||||
*quit = true;
|
||||
return win32_handle_keyboard_event(hwnd, message, wparam, lparam);
|
||||
|
||||
case WM_MOVE:
|
||||
win32_save_position();
|
||||
break;
|
||||
case WM_CLOSE:
|
||||
case WM_DESTROY:
|
||||
case WM_QUIT:
|
||||
{
|
||||
WINDOWPLACEMENT placement;
|
||||
memset(&placement, 0, sizeof(placement));
|
||||
placement.length = sizeof(placement);
|
||||
win32_save_position();
|
||||
|
||||
GetWindowPlacement(main_window.hwnd, &placement);
|
||||
|
||||
g_win32_pos_x = placement.rcNormalPosition.left;
|
||||
g_win32_pos_y = placement.rcNormalPosition.top;
|
||||
g_win32_quit = true;
|
||||
*quit = true;
|
||||
}
|
||||
g_win32_quit = true;
|
||||
*quit = true;
|
||||
break;
|
||||
case WM_SIZE:
|
||||
/* Do not send resize message if we minimize. */
|
||||
@ -680,7 +725,7 @@ static LRESULT CALLBACK WndProcCommon(bool *quit, HWND hwnd, UINT message,
|
||||
}
|
||||
*quit = true;
|
||||
break;
|
||||
case WM_COMMAND:
|
||||
case WM_COMMAND:
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
if (settings && settings->bools.ui_menubar_enable)
|
||||
@ -719,6 +764,7 @@ LRESULT CALLBACK WndProcD3D(HWND hwnd, UINT message,
|
||||
case WM_CLOSE:
|
||||
case WM_DESTROY:
|
||||
case WM_QUIT:
|
||||
case WM_MOVE:
|
||||
case WM_SIZE:
|
||||
case WM_COMMAND:
|
||||
ret = WndProcCommon(&quit, hwnd, message, wparam, lparam);
|
||||
@ -779,6 +825,7 @@ LRESULT CALLBACK WndProcGL(HWND hwnd, UINT message,
|
||||
case WM_CLOSE:
|
||||
case WM_DESTROY:
|
||||
case WM_QUIT:
|
||||
case WM_MOVE:
|
||||
case WM_SIZE:
|
||||
case WM_COMMAND:
|
||||
ret = WndProcCommon(&quit,
|
||||
@ -878,6 +925,7 @@ LRESULT CALLBACK WndProcGDI(HWND hwnd, UINT message,
|
||||
case WM_CLOSE:
|
||||
case WM_DESTROY:
|
||||
case WM_QUIT:
|
||||
case WM_MOVE:
|
||||
case WM_SIZE:
|
||||
case WM_COMMAND:
|
||||
ret = WndProcCommon(&quit, hwnd, message, wparam, lparam);
|
||||
@ -918,12 +966,22 @@ bool win32_window_create(void *data, unsigned style,
|
||||
#endif
|
||||
settings_t *settings = config_get_ptr();
|
||||
#ifndef _XBOX
|
||||
unsigned user_width = width;
|
||||
unsigned user_height = height;
|
||||
|
||||
if (settings->bools.video_window_save_positions
|
||||
&& !fullscreen)
|
||||
{
|
||||
user_width = g_win32_pos_width;
|
||||
user_height= g_win32_pos_height;
|
||||
}
|
||||
main_window.hwnd = CreateWindowEx(0,
|
||||
"RetroArch", "RetroArch",
|
||||
style,
|
||||
fullscreen ? mon_rect->left : g_win32_pos_x,
|
||||
fullscreen ? mon_rect->top : g_win32_pos_y,
|
||||
width, height,
|
||||
user_width,
|
||||
user_height,
|
||||
NULL, NULL, NULL, data);
|
||||
if (!main_window.hwnd)
|
||||
return false;
|
||||
@ -1139,9 +1197,10 @@ void win32_set_style(MONITORINFOEX *current_mon, HMONITOR *hm_to_use,
|
||||
RECT *rect, RECT *mon_rect, DWORD *style)
|
||||
{
|
||||
#if !defined(_XBOX)
|
||||
bool position_set_from_config = false;
|
||||
settings_t *settings = config_get_ptr();
|
||||
if (fullscreen)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
/* Windows only reports the refresh rates for modelines as
|
||||
* an integer, so video_refresh_rate needs to be rounded. Also, account
|
||||
* for black frame insertion using video_refresh_rate set to half
|
||||
@ -1176,8 +1235,23 @@ void win32_set_style(MONITORINFOEX *current_mon, HMONITOR *hm_to_use,
|
||||
|
||||
AdjustWindowRect(rect, *style, FALSE);
|
||||
|
||||
g_win32_resize_width = *width = rect->right - rect->left;
|
||||
g_win32_resize_height = *height = rect->bottom - rect->top;
|
||||
if (settings->bools.video_window_save_positions)
|
||||
{
|
||||
win32_set_position_from_config();
|
||||
if (g_win32_pos_width != 0 && g_win32_pos_height != 0)
|
||||
position_set_from_config = true;
|
||||
}
|
||||
|
||||
if (position_set_from_config)
|
||||
{
|
||||
g_win32_resize_width = *width = g_win32_pos_width;
|
||||
g_win32_resize_height = *height = g_win32_pos_height;
|
||||
}
|
||||
else
|
||||
{
|
||||
g_win32_resize_width = *width = rect->right - rect->left;
|
||||
g_win32_resize_height = *height = rect->bottom - rect->top;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@ -1256,6 +1330,7 @@ bool win32_set_video_mode(void *data,
|
||||
&mon_rect, width, height, fullscreen))
|
||||
return false;
|
||||
|
||||
|
||||
win32_set_window(&width, &height,
|
||||
fullscreen, windowed_full, &rect);
|
||||
|
||||
@ -1353,15 +1428,13 @@ void win32_get_video_output_prev(
|
||||
unsigned curr_width = 0;
|
||||
unsigned curr_height = 0;
|
||||
|
||||
memset(&dm, 0, sizeof(dm));
|
||||
if (win32_get_video_output(&dm, -1, sizeof(dm)))
|
||||
{
|
||||
curr_width = dm.dmPelsWidth;
|
||||
curr_height = dm.dmPelsHeight;
|
||||
}
|
||||
|
||||
dm.dmSize = sizeof(dm);
|
||||
|
||||
win32_get_video_output_size(&curr_width, &curr_height);
|
||||
|
||||
for (i = 0;
|
||||
EnumDisplaySettings(NULL, i, &dm) != 0;
|
||||
i++)
|
||||
for (i = 0; win32_get_video_output(&dm, i, sizeof(dm)); i++)
|
||||
{
|
||||
if ( dm.dmPelsWidth == curr_width
|
||||
&& dm.dmPelsHeight == curr_height)
|
||||
@ -1458,14 +1531,13 @@ void win32_get_video_output_next(
|
||||
unsigned curr_width = 0;
|
||||
unsigned curr_height = 0;
|
||||
|
||||
memset(&dm, 0, sizeof(dm));
|
||||
dm.dmSize = sizeof(dm);
|
||||
if (win32_get_video_output(&dm, -1, sizeof(dm)))
|
||||
{
|
||||
curr_width = dm.dmPelsWidth;
|
||||
curr_height = dm.dmPelsHeight;
|
||||
}
|
||||
|
||||
win32_get_video_output_size(&curr_width, &curr_height);
|
||||
|
||||
for (i = 0;
|
||||
EnumDisplaySettings(NULL, i, &dm) != 0;
|
||||
i++)
|
||||
for (i = 0; win32_get_video_output(&dm, i, sizeof(dm)); i++)
|
||||
{
|
||||
if (found)
|
||||
{
|
||||
@ -1480,13 +1552,23 @@ void win32_get_video_output_next(
|
||||
}
|
||||
}
|
||||
|
||||
bool win32_get_video_output(DEVMODE *dm, int mode, size_t len)
|
||||
{
|
||||
memset(dm, 0, len);
|
||||
dm->dmSize = len;
|
||||
|
||||
if (EnumDisplaySettings(NULL,
|
||||
(mode == -1) ? ENUM_CURRENT_SETTINGS : mode, dm) == 0)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void win32_get_video_output_size(unsigned *width, unsigned *height)
|
||||
{
|
||||
DEVMODE dm;
|
||||
memset(&dm, 0, sizeof(dm));
|
||||
dm.dmSize = sizeof(dm);
|
||||
|
||||
if (EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &dm) != 0)
|
||||
if (win32_get_video_output(&dm, -1, sizeof(dm)))
|
||||
{
|
||||
*width = dm.dmPelsWidth;
|
||||
*height = dm.dmPelsHeight;
|
||||
|
@ -101,6 +101,8 @@ void win32_check_window(bool *quit,
|
||||
void win32_set_window(unsigned *width, unsigned *height,
|
||||
bool fullscreen, bool windowed_full, void *rect_data);
|
||||
|
||||
bool win32_get_video_output(DEVMODE *dm, int mode, size_t len);
|
||||
|
||||
void win32_get_video_output_size(
|
||||
unsigned *width, unsigned *height);
|
||||
|
||||
|
@ -134,7 +134,8 @@ void x11_move_window(Display *dpy, Window win, int x, int y,
|
||||
{
|
||||
XEvent xev = {0};
|
||||
|
||||
XA_NET_MOVERESIZE_WINDOW = XInternAtom(dpy, "_NET_MOVERESIZE_WINDOW", False);
|
||||
XA_NET_MOVERESIZE_WINDOW = XInternAtom(dpy,
|
||||
"_NET_MOVERESIZE_WINDOW", False);
|
||||
|
||||
xev.xclient.type = ClientMessage;
|
||||
xev.xclient.send_event = True;
|
||||
@ -170,12 +171,12 @@ static void x11_set_window_pid(Display *dpy, Window win)
|
||||
XA_CARDINAL, 32, PropModeReplace, (unsigned char *)&pid, 1);
|
||||
|
||||
errno = 0;
|
||||
if((scret = sysconf(_SC_HOST_NAME_MAX)) == -1 && errno)
|
||||
if ((scret = sysconf(_SC_HOST_NAME_MAX)) == -1 && errno)
|
||||
return;
|
||||
if((hostname = (char*)malloc(scret + 1)) == NULL)
|
||||
if ((hostname = (char*)malloc(scret + 1)) == NULL)
|
||||
return;
|
||||
|
||||
if(gethostname(hostname, scret + 1) == -1)
|
||||
if (gethostname(hostname, scret + 1) == -1)
|
||||
RARCH_WARN("Failed to get hostname.\n");
|
||||
else
|
||||
{
|
||||
@ -752,22 +753,21 @@ bool x11_has_net_wm_fullscreen(Display *dpy)
|
||||
|
||||
char *x11_get_wm_name(Display *dpy)
|
||||
{
|
||||
Atom type;
|
||||
int format;
|
||||
Window window;
|
||||
Atom XA_NET_SUPPORTING_WM_CHECK = XInternAtom(g_x11_dpy, "_NET_SUPPORTING_WM_CHECK", False);
|
||||
Atom XA_NET_WM_NAME = XInternAtom(g_x11_dpy, "_NET_WM_NAME", False);
|
||||
Atom XA_UTF8_STRING = XInternAtom(g_x11_dpy, "UTF8_STRING", False);
|
||||
int status;
|
||||
Atom type;
|
||||
int format;
|
||||
unsigned long nitems;
|
||||
unsigned long bytes_after;
|
||||
unsigned char *propdata;
|
||||
char *title;
|
||||
Window window;
|
||||
unsigned long nitems = 0;
|
||||
unsigned long bytes_after = 0;
|
||||
char *title = NULL;
|
||||
unsigned char *propdata = NULL;
|
||||
|
||||
if (!XA_NET_SUPPORTING_WM_CHECK || !XA_NET_WM_NAME)
|
||||
return NULL;
|
||||
|
||||
status = XGetWindowProperty(dpy,
|
||||
if (!(XGetWindowProperty(dpy,
|
||||
DefaultRootWindow(dpy),
|
||||
XA_NET_SUPPORTING_WM_CHECK,
|
||||
0,
|
||||
@ -778,16 +778,15 @@ char *x11_get_wm_name(Display *dpy)
|
||||
&format,
|
||||
&nitems,
|
||||
&bytes_after,
|
||||
&propdata);
|
||||
&propdata) == Success &&
|
||||
propdata))
|
||||
return NULL;
|
||||
|
||||
if (status == Success && propdata)
|
||||
window = ((Window *) propdata)[0];
|
||||
else
|
||||
return NULL;
|
||||
window = ((Window *) propdata)[0];
|
||||
|
||||
XFree(propdata);
|
||||
|
||||
status = XGetWindowProperty(dpy,
|
||||
if (!(XGetWindowProperty(dpy,
|
||||
window,
|
||||
XA_NET_WM_NAME,
|
||||
0,
|
||||
@ -798,13 +797,11 @@ char *x11_get_wm_name(Display *dpy)
|
||||
&format,
|
||||
&nitems,
|
||||
&bytes_after,
|
||||
&propdata);
|
||||
|
||||
if (status == Success && propdata)
|
||||
title = strdup((char *) propdata);
|
||||
else
|
||||
return NULL;
|
||||
&propdata) == Success
|
||||
&& propdata))
|
||||
return NULL;
|
||||
|
||||
title = strdup((char *) propdata);
|
||||
XFree(propdata);
|
||||
|
||||
return title;
|
||||
|
@ -48,9 +48,10 @@ const video_display_server_t dispserv_null = {
|
||||
null_display_server_destroy,
|
||||
null_display_server_set_window_opacity,
|
||||
null_display_server_set_window_progress,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL, /* set_window_decorations */
|
||||
NULL, /* set_resolution */
|
||||
NULL, /* get_resolution_list */
|
||||
NULL, /* get_output_options */
|
||||
"null"
|
||||
};
|
||||
|
||||
|
@ -107,7 +107,7 @@ static void win32_display_server_destroy(void *data)
|
||||
dispserv_win32_t *dispserv = (dispserv_win32_t*)data;
|
||||
|
||||
if (win32_orig_width > 0 && win32_orig_height > 0)
|
||||
video_display_server_switch_resolution(win32_orig_width, win32_orig_height,
|
||||
video_display_server_set_resolution(win32_orig_width, win32_orig_height,
|
||||
win32_orig_refresh, (float)win32_orig_refresh, crt_center );
|
||||
|
||||
#ifdef HAS_TASKBAR_EXT
|
||||
@ -204,20 +204,16 @@ static bool win32_display_server_set_window_decorations(void *data, bool on)
|
||||
static bool win32_display_server_set_resolution(void *data,
|
||||
unsigned width, unsigned height, int int_hz, float hz, int center)
|
||||
{
|
||||
LONG res;
|
||||
DEVMODE curDevmode;
|
||||
DEVMODE devmode;
|
||||
|
||||
int iModeNum;
|
||||
int freq = int_hz;
|
||||
DWORD flags = 0;
|
||||
int depth = 0;
|
||||
dispserv_win32_t *serv = (dispserv_win32_t*)data;
|
||||
|
||||
if (!serv)
|
||||
return false;
|
||||
|
||||
EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &curDevmode);
|
||||
win32_get_video_output(&curDevmode, -1, sizeof(curDevmode));
|
||||
|
||||
if (win32_orig_width == 0)
|
||||
win32_orig_width = GetSystemMetrics(SM_CXSCREEN);
|
||||
@ -239,7 +235,10 @@ static bool win32_display_server_set_resolution(void *data,
|
||||
|
||||
for (iModeNum = 0;; iModeNum++)
|
||||
{
|
||||
if (!EnumDisplaySettings(NULL, iModeNum, &devmode))
|
||||
LONG res;
|
||||
DEVMODE devmode;
|
||||
|
||||
if (!win32_get_video_output(&devmode, iModeNum, sizeof(devmode)))
|
||||
break;
|
||||
|
||||
if (devmode.dmPelsWidth != width)
|
||||
@ -262,15 +261,15 @@ static bool win32_display_server_set_resolution(void *data,
|
||||
switch (res)
|
||||
{
|
||||
case DISP_CHANGE_SUCCESSFUL:
|
||||
res = win32_change_display_settings(NULL, &devmode, flags);
|
||||
res = win32_change_display_settings(NULL, &devmode, 0);
|
||||
switch (res)
|
||||
{
|
||||
case DISP_CHANGE_SUCCESSFUL:
|
||||
return true;
|
||||
case DISP_CHANGE_NOTUPDATED:
|
||||
return true;
|
||||
default:
|
||||
break;
|
||||
case DISP_CHANGE_SUCCESSFUL:
|
||||
return true;
|
||||
case DISP_CHANGE_NOTUPDATED:
|
||||
return true;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case DISP_CHANGE_RESTART:
|
||||
@ -283,6 +282,62 @@ static bool win32_display_server_set_resolution(void *data,
|
||||
return true;
|
||||
}
|
||||
|
||||
void *win32_display_server_get_resolution_list(void *data,
|
||||
unsigned *len)
|
||||
{
|
||||
DEVMODE dm;
|
||||
unsigned i, count = 0;
|
||||
unsigned curr_width = 0;
|
||||
unsigned curr_height = 0;
|
||||
unsigned curr_bpp = 0;
|
||||
unsigned curr_refreshrate = 0;
|
||||
struct video_display_config *conf = NULL;
|
||||
|
||||
for (i = 0;; i++)
|
||||
{
|
||||
if (!win32_get_video_output(&dm, i, sizeof(dm)))
|
||||
break;
|
||||
|
||||
count++;
|
||||
}
|
||||
|
||||
if (win32_get_video_output(&dm, -1, sizeof(dm)))
|
||||
{
|
||||
curr_width = dm.dmPelsWidth;
|
||||
curr_height = dm.dmPelsHeight;
|
||||
curr_bpp = dm.dmBitsPerPel;
|
||||
curr_refreshrate = dm.dmDisplayFrequency;
|
||||
}
|
||||
|
||||
*len = count;
|
||||
conf = (struct video_display_config*)calloc(*len, sizeof(struct video_display_config));
|
||||
|
||||
if (!conf)
|
||||
return NULL;
|
||||
|
||||
for (i = 0;; i++)
|
||||
{
|
||||
if (!win32_get_video_output(&dm, i, sizeof(dm)))
|
||||
break;
|
||||
|
||||
conf[i].width = dm.dmPelsWidth;
|
||||
conf[i].height = dm.dmPelsHeight;
|
||||
conf[i].bpp = dm.dmBitsPerPel;
|
||||
conf[i].refreshrate = dm.dmDisplayFrequency;
|
||||
conf[i].idx = i;
|
||||
conf[i].current = false;
|
||||
|
||||
if ( (conf[i].width == curr_width)
|
||||
&& (conf[i].height == curr_height)
|
||||
&& (conf[i].refreshrate == curr_refreshrate)
|
||||
&& (conf[i].bpp == curr_bpp)
|
||||
)
|
||||
conf[i].current = true;
|
||||
}
|
||||
|
||||
return conf;
|
||||
}
|
||||
|
||||
const video_display_server_t dispserv_win32 = {
|
||||
win32_display_server_init,
|
||||
win32_display_server_destroy,
|
||||
@ -290,6 +345,7 @@ const video_display_server_t dispserv_win32 = {
|
||||
win32_display_server_set_window_progress,
|
||||
win32_display_server_set_window_decorations,
|
||||
win32_display_server_set_resolution,
|
||||
win32_display_server_get_resolution_list,
|
||||
NULL, /* get_output_options */
|
||||
"win32"
|
||||
};
|
||||
|
@ -14,9 +14,18 @@
|
||||
* You should have received a copy of the GNU General Public License along with RetroArch.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <compat/strl.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "../../config.h"
|
||||
|
||||
#ifdef HAVE_XRANDR
|
||||
#include <X11/extensions/Xrandr.h>
|
||||
#endif
|
||||
|
||||
#include "../video_display_server.h"
|
||||
#include "../common/x11_common.h"
|
||||
#include "../../configuration.h"
|
||||
@ -29,7 +38,7 @@ static char old_mode[250] = {0};
|
||||
static char new_mode[250] = {0};
|
||||
static char xrandr[250] = {0};
|
||||
static char fbset[150] = {0};
|
||||
static char output[250] = {0};
|
||||
static char output[500] = {0};
|
||||
static bool crt_en = false;
|
||||
|
||||
typedef struct
|
||||
@ -55,23 +64,28 @@ static void x11_display_server_destroy(void *data)
|
||||
|
||||
if (crt_en)
|
||||
{
|
||||
sprintf(output, "xrandr -s %dx%d", orig_width, orig_height);
|
||||
snprintf(output, sizeof(output),
|
||||
"xrandr -s %dx%d", orig_width, orig_height);
|
||||
system(output);
|
||||
|
||||
for (i = 0; i < 3; i++)
|
||||
{
|
||||
sprintf(output, "xrandr --delmode %s%d %s", "VGA", i, old_mode);
|
||||
snprintf(output, sizeof(output),
|
||||
"xrandr --delmode %s%d %s", "VGA", i, old_mode);
|
||||
system(output);
|
||||
sprintf(output, "xrandr --delmode %s-%d %s", "VGA", i, old_mode);
|
||||
snprintf(output, sizeof(output),
|
||||
"xrandr --delmode %s-%d %s", "VGA", i, old_mode);
|
||||
system(output);
|
||||
|
||||
sprintf(output, "xrandr --delmode %s%d %s", "DVI", i, old_mode);
|
||||
snprintf(output, sizeof(output),
|
||||
"xrandr --delmode %s%d %s", "DVI", i, old_mode);
|
||||
system(output);
|
||||
sprintf(output, "xrandr --delmode %s-%d %s", "DVI", i, old_mode);
|
||||
snprintf(output, sizeof(output),
|
||||
"xrandr --delmode %s-%d %s", "DVI", i, old_mode);
|
||||
system(output);
|
||||
}
|
||||
|
||||
sprintf(output, "xrandr --rmmode %s", old_mode);
|
||||
snprintf(output, sizeof(output), "xrandr --rmmode %s", old_mode);
|
||||
system(output);
|
||||
}
|
||||
|
||||
@ -92,7 +106,8 @@ static bool x11_display_server_set_window_opacity(void *data, unsigned opacity)
|
||||
if (opacity == (unsigned)-1)
|
||||
XDeleteProperty(g_x11_dpy, g_x11_win, net_wm_opacity);
|
||||
else
|
||||
XChangeProperty(g_x11_dpy, g_x11_win, net_wm_opacity, cardinal, 32, PropModeReplace, (const unsigned char*)&opacity, 1);
|
||||
XChangeProperty(g_x11_dpy, g_x11_win, net_wm_opacity, cardinal,
|
||||
32, PropModeReplace, (const unsigned char*)&opacity, 1);
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -101,9 +116,11 @@ static bool x11_display_server_set_window_decorations(void *data, bool on)
|
||||
{
|
||||
dispserv_x11_t *serv = (dispserv_x11_t*)data;
|
||||
|
||||
serv->decorations = on;
|
||||
if (serv)
|
||||
serv->decorations = on;
|
||||
|
||||
/* menu_setting performs a reinit instead to properly apply decoration changes */
|
||||
/* menu_setting performs a reinit instead to properly apply
|
||||
* decoration changes */
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -131,7 +148,7 @@ static bool x11_display_server_set_resolution(void *data,
|
||||
/* set core refresh from hz */
|
||||
video_monitor_set_refresh_rate(hz);
|
||||
|
||||
/* following code is the mode line genorator */
|
||||
/* following code is the mode line generator */
|
||||
|
||||
hsp = width * 1.140;
|
||||
hfp = width * 1.055;
|
||||
@ -144,9 +161,7 @@ static bool x11_display_server_set_resolution(void *data,
|
||||
roundw = roundf((float)pwidth / (float)height * 100) / 100;
|
||||
|
||||
if (height > width)
|
||||
{
|
||||
roundw = roundf((float)height / (float)width * 100) / 100;
|
||||
}
|
||||
|
||||
if (roundw > 1.35)
|
||||
roundw = 1.25;
|
||||
@ -158,111 +173,88 @@ static bool x11_display_server_set_resolution(void *data,
|
||||
hmax = hbp;
|
||||
|
||||
if (height < 241)
|
||||
{
|
||||
vmax = 261;
|
||||
}
|
||||
if (height < 241 && hz > 56 && hz < 58)
|
||||
{
|
||||
vmax = 280;
|
||||
}
|
||||
if (height < 241 && hz < 55)
|
||||
{
|
||||
vmax = 313;
|
||||
}
|
||||
if (height > 250 && height < 260 && hz > 54)
|
||||
{
|
||||
vmax = 296;
|
||||
}
|
||||
if (height > 250 && height < 260 && hz > 52 && hz < 54)
|
||||
{
|
||||
vmax = 285;
|
||||
}
|
||||
if (height > 250 && height < 260 && hz < 52)
|
||||
{
|
||||
vmax = 313;
|
||||
}
|
||||
if (height > 260 && height < 300)
|
||||
{
|
||||
vmax = 318;
|
||||
}
|
||||
|
||||
if (height > 400 && hz > 56)
|
||||
{
|
||||
vmax = 533;
|
||||
}
|
||||
if (height > 520 && hz < 57)
|
||||
{
|
||||
vmax = 580;
|
||||
}
|
||||
|
||||
if (height > 300 && hz < 56)
|
||||
{
|
||||
vmax = 615;
|
||||
}
|
||||
if (height > 500 && hz < 56)
|
||||
{
|
||||
vmax = 624;
|
||||
}
|
||||
if (height > 300)
|
||||
{
|
||||
pdefault = pdefault * 2;
|
||||
}
|
||||
|
||||
vfp = height + ((vmax - height) / 2) - pdefault;
|
||||
|
||||
if (height < 300)
|
||||
{
|
||||
vsp = vfp + 3; /* needs to me 3 for progressive */
|
||||
}
|
||||
vsp = vfp + 3; /* needs to be 3 for progressive */
|
||||
if (height > 300)
|
||||
{
|
||||
vsp = vfp + 6; /* needs to me 6 for interlaced */
|
||||
}
|
||||
vsp = vfp + 6; /* needs to be 6 for interlaced */
|
||||
|
||||
vbp = vmax;
|
||||
|
||||
if (height < 300)
|
||||
{
|
||||
pixel_clock = (hmax * vmax * hz) / 1000000;
|
||||
}
|
||||
|
||||
if (height > 300)
|
||||
{
|
||||
pixel_clock = ((hmax * vmax * hz) / 1000000) / 2;
|
||||
}
|
||||
/* above code is the modeline genorator */
|
||||
/* above code is the modeline generator */
|
||||
|
||||
/* create interlaced newmode from modline variables */
|
||||
if (height < 300)
|
||||
{
|
||||
snprintf(xrandr, sizeof(xrandr), "xrandr --newmode \"%dx%d_%0.2f\" %lf %d %d %d %d %d %d %d %d -hsync -vsync", width, height, hz, pixel_clock, width, hfp, hsp, hbp, height, vfp, vsp, vbp);
|
||||
snprintf(xrandr, sizeof(xrandr), "xrandr --newmode \"%dx%d_%0.2f\" %lf %d %d %d %d %d %d %d %d -hsync -vsync", width, height, hz, pixel_clock,
|
||||
width, hfp, hsp, hbp, height, vfp, vsp, vbp);
|
||||
system(xrandr);
|
||||
}
|
||||
/* create interlaced newmode from modline variables */
|
||||
if (height > 300)
|
||||
{
|
||||
snprintf(xrandr, sizeof(xrandr), "xrandr --newmode \"%dx%d_%0.2f\" %lf %d %d %d %d %d %d %d %d interlace -hsync -vsync", width, height, hz, pixel_clock, width, hfp, hsp, hbp, height, vfp, vsp, vbp);
|
||||
snprintf(xrandr, sizeof(xrandr), "xrandr --newmode \"%dx%d_%0.2f\" %lf %d %d %d %d %d %d %d %d interlace -hsync -vsync", width, height, hz, pixel_clock,
|
||||
width, hfp, hsp, hbp, height, vfp, vsp, vbp);
|
||||
system(xrandr);
|
||||
}
|
||||
|
||||
/* variable for new mode */
|
||||
snprintf(new_mode, sizeof(new_mode), "%dx%d_%0.2f", width, height, hz);
|
||||
|
||||
/* need to run loops for DVI0 - DVI-2 and VGA0 - VGA-2 outputs to add and delete modes */
|
||||
/* need to run loops for DVI0 - DVI-2 and VGA0 - VGA-2 outputs to
|
||||
* add and delete modes */
|
||||
for (i = 0; i < 3; i++)
|
||||
{
|
||||
snprintf(output, sizeof(output), "xrandr --addmode %s%d %s", "DVI", i, new_mode);
|
||||
snprintf(output, sizeof(output), "xrandr --addmode %s%d %s", "DVI", i,
|
||||
new_mode);
|
||||
system(output);
|
||||
snprintf(output, sizeof(output), "xrandr --delmode %s%d %s", "DVI", i, old_mode);
|
||||
snprintf(output, sizeof(output), "xrandr --delmode %s%d %s", "DVI", i,
|
||||
old_mode);
|
||||
system(output);
|
||||
}
|
||||
|
||||
for (i = 0; i < 3; i++)
|
||||
{
|
||||
snprintf(output, sizeof(output), "xrandr --addmode %s-%d %s", "DVI", i, new_mode);
|
||||
snprintf(output, sizeof(output), "xrandr --addmode %s-%d %s", "DVI", i,
|
||||
new_mode);
|
||||
system(output);
|
||||
snprintf(output, sizeof(output), "xrandr --delmode %s-%d %s", "DVI", i, old_mode);
|
||||
snprintf(output, sizeof(output), "xrandr --delmode %s-%d %s", "DVI", i,
|
||||
old_mode);
|
||||
system(output);
|
||||
}
|
||||
|
||||
for (i = 0; i < 3; i++)
|
||||
{
|
||||
snprintf(output, sizeof(output), "xrandr --addmode %s%d %s", "VGA", i, new_mode);
|
||||
@ -270,6 +262,7 @@ static bool x11_display_server_set_resolution(void *data,
|
||||
snprintf(output, sizeof(output), "xrandr --delmode %s%d %s", "VGA", i, old_mode);
|
||||
system(output);
|
||||
}
|
||||
|
||||
for (i = 0; i < 3; i++)
|
||||
{
|
||||
snprintf(output, sizeof(output), "xrandr --addmode %s-%d %s", "VGA", i, new_mode);
|
||||
@ -285,30 +278,62 @@ static bool x11_display_server_set_resolution(void *data,
|
||||
snprintf(output, sizeof(output), "xrandr --rmmode %s", old_mode);
|
||||
system(output);
|
||||
|
||||
system("xdotool windowactivate $(xdotool search --class RetroArch)"); /* needs xdotool installed. needed to recapture window. */
|
||||
/* needs xdotool installed. needed to recapture window. */
|
||||
system("xdotool windowactivate $(xdotool search --class RetroArch)");
|
||||
|
||||
/* variable for old mode */
|
||||
snprintf(old_mode, sizeof(old_mode), "%s", new_mode);
|
||||
|
||||
system("xdotool windowactivate $(xdotool search --class RetroArch)"); /* needs xdotool installed. needed to recapture window. */
|
||||
/* needs xdotool installed. needed to recapture window. */
|
||||
system("xdotool windowactivate $(xdotool search --class RetroArch)");
|
||||
/* Second run needed as some times it runs to fast to capture first time */
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
const char *x11_display_server_get_output_options(void)
|
||||
const char *x11_display_server_get_output_options(void *data)
|
||||
{
|
||||
#ifdef HAVE_XRANDR
|
||||
Display *dpy;
|
||||
XRRScreenResources *res;
|
||||
XRROutputInfo *info;
|
||||
Window root;
|
||||
int i;
|
||||
static char s[PATH_MAX_LENGTH];
|
||||
|
||||
if (!(dpy = XOpenDisplay(0)))
|
||||
return NULL;
|
||||
|
||||
root = RootWindow(dpy, DefaultScreen(dpy));
|
||||
|
||||
if (!(res = XRRGetScreenResources(dpy, root)))
|
||||
return NULL;
|
||||
|
||||
for (i = 0; i < res->noutput; i++)
|
||||
{
|
||||
if (!(info = XRRGetOutputInfo(dpy, res, res->outputs[i])))
|
||||
return NULL;
|
||||
|
||||
strlcat(s, info->name, sizeof(s));
|
||||
if ((i+1) < res->noutput)
|
||||
strlcat(s, "|", sizeof(s));
|
||||
}
|
||||
|
||||
return s;
|
||||
#else
|
||||
/* TODO/FIXME - hardcoded for now; list should be built up dynamically later */
|
||||
return "HDMI-0|HDMI-1|HDMI-2|HDMI-3|DVI-0|DVI-1|DVI-2|DVI-3|VGA-0|VGA-1|VGA-2|VGA-3|Config";
|
||||
#endif
|
||||
}
|
||||
|
||||
const video_display_server_t dispserv_x11 = {
|
||||
x11_display_server_init,
|
||||
x11_display_server_destroy,
|
||||
x11_display_server_set_window_opacity,
|
||||
NULL,
|
||||
NULL, /* set_window_progress */
|
||||
x11_display_server_set_window_decorations,
|
||||
x11_display_server_set_resolution,
|
||||
NULL, /* get_resolution_list */
|
||||
x11_display_server_get_output_options,
|
||||
"x11"
|
||||
};
|
||||
|
@ -957,12 +957,6 @@ static bool gl_frame(void *data, const void *frame,
|
||||
if (!gl)
|
||||
return false;
|
||||
|
||||
#ifdef HAVE_LIBNX
|
||||
// Should be called once per frame
|
||||
if(!appletMainLoop())
|
||||
return false;
|
||||
#endif
|
||||
|
||||
gl_context_bind_hw_render(gl, false);
|
||||
|
||||
if (gl->core_context_in_use && gl->renderchain_driver->bind_vao)
|
||||
|
@ -151,16 +151,22 @@ static void metal_free(void *data)
|
||||
static void metal_set_viewport(void *data, unsigned viewport_width,
|
||||
unsigned viewport_height, bool force_full, bool allow_rotate)
|
||||
{
|
||||
#if 0
|
||||
RARCH_LOG("[Metal]: set_viewport size: %dx%d full: %s rotate: %s\n",
|
||||
viewport_width, viewport_height,
|
||||
force_full ? "YES" : "NO",
|
||||
allow_rotate ? "YES" : "NO");
|
||||
#endif
|
||||
MetalDriver *md = (__bridge MetalDriver *)data;
|
||||
if (md == nil) {
|
||||
return;
|
||||
}
|
||||
|
||||
[md setViewportWidth:viewport_width height:viewport_height forceFull:force_full allowRotate:allow_rotate];
|
||||
}
|
||||
|
||||
static void metal_set_rotation(void *data, unsigned rotation)
|
||||
{
|
||||
MetalDriver *md = (__bridge MetalDriver *)data;
|
||||
if (md == nil) {
|
||||
return;
|
||||
}
|
||||
|
||||
[md setRotation:rotation];
|
||||
}
|
||||
|
||||
static void metal_viewport_info(void *data, struct video_viewport *vp)
|
||||
|
@ -30,6 +30,7 @@
|
||||
|
||||
#include "../../driver.h"
|
||||
#include "../../configuration.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../verbosity.h"
|
||||
#include "../../frontend/frontend_driver.h"
|
||||
#include "../common/sixel_common.h"
|
||||
|
@ -645,6 +645,7 @@ static void vulkan_deinit_descriptor_pool(vk_t *vk)
|
||||
static void vulkan_init_textures(vk_t *vk)
|
||||
{
|
||||
unsigned i;
|
||||
const uint32_t zero = 0;
|
||||
vulkan_init_samplers(vk);
|
||||
|
||||
if (!vk->hw.enable)
|
||||
@ -665,6 +666,10 @@ static void vulkan_init_textures(vk_t *vk)
|
||||
NULL, NULL, VULKAN_TEXTURE_DYNAMIC);
|
||||
}
|
||||
}
|
||||
|
||||
vk->default_texture = vulkan_create_texture(vk, NULL,
|
||||
1, 1, VK_FORMAT_B8G8R8A8_UNORM,
|
||||
&zero, NULL, VULKAN_TEXTURE_STATIC);
|
||||
}
|
||||
|
||||
static void vulkan_deinit_textures(vk_t *vk)
|
||||
@ -683,6 +688,9 @@ static void vulkan_deinit_textures(vk_t *vk)
|
||||
vulkan_destroy_texture(
|
||||
vk->context->device, &vk->swapchain[i].texture_optimal);
|
||||
}
|
||||
|
||||
if (vk->default_texture.memory != VK_NULL_HANDLE)
|
||||
vulkan_destroy_texture(vk->context->device, &vk->default_texture);
|
||||
}
|
||||
|
||||
static void vulkan_deinit_command_buffers(vk_t *vk)
|
||||
@ -1732,25 +1740,43 @@ static bool vulkan_frame(void *data, const void *frame,
|
||||
if (vk->hw.enable)
|
||||
{
|
||||
/* Does this make that this can happen at all? */
|
||||
if (!vk->hw.image)
|
||||
if (vk->hw.image)
|
||||
{
|
||||
RARCH_ERR("[Vulkan]: HW image is not set. Buggy core?\n");
|
||||
return false;
|
||||
}
|
||||
input.image = vk->hw.image->create_info.image;
|
||||
input.view = vk->hw.image->image_view;
|
||||
input.layout = vk->hw.image->image_layout;
|
||||
|
||||
input.image = vk->hw.image->create_info.image;
|
||||
input.view = vk->hw.image->image_view;
|
||||
input.layout = vk->hw.image->image_layout;
|
||||
/* The format can change on a whim. */
|
||||
input.format = vk->hw.image->create_info.format;
|
||||
|
||||
if (frame)
|
||||
{
|
||||
input.width = frame_width;
|
||||
input.height = frame_height;
|
||||
if (frame)
|
||||
{
|
||||
input.width = frame_width;
|
||||
input.height = frame_height;
|
||||
}
|
||||
else
|
||||
{
|
||||
input.width = vk->hw.last_width;
|
||||
input.height = vk->hw.last_height;
|
||||
}
|
||||
|
||||
input.image = vk->hw.image->create_info.image;
|
||||
input.view = vk->hw.image->image_view;
|
||||
input.layout = vk->hw.image->image_layout;
|
||||
|
||||
/* The format can change on a whim. */
|
||||
input.format = vk->hw.image->create_info.format;
|
||||
}
|
||||
else
|
||||
{
|
||||
input.width = vk->hw.last_width;
|
||||
input.height = vk->hw.last_height;
|
||||
/* Fall back to the default, black texture.
|
||||
* This can happen if we restart the video driver while in the menu. */
|
||||
input.image = vk->default_texture.image;
|
||||
input.view = vk->default_texture.view;
|
||||
input.layout = vk->default_texture.layout;
|
||||
input.format = vk->default_texture.format;
|
||||
input.width = vk->default_texture.width;
|
||||
input.height = vk->default_texture.height;
|
||||
}
|
||||
|
||||
vk->hw.last_width = input.width;
|
||||
@ -1769,6 +1795,7 @@ static bool vulkan_frame(void *data, const void *frame,
|
||||
input.layout = tex->layout;
|
||||
input.width = tex->width;
|
||||
input.height = tex->height;
|
||||
input.format = VK_FORMAT_UNDEFINED; /* It's already configured. */
|
||||
}
|
||||
|
||||
vulkan_filter_chain_set_input_texture((vulkan_filter_chain_t*)vk->filter_chain, &input);
|
||||
|
@ -137,7 +137,7 @@ static void *android_gfx_ctx_init(video_frame_info_t *video_info, void *video_dr
|
||||
RARCH_LOG("Android EGL: GLES version = %d.\n", g_es3 ? 3 : 2);
|
||||
|
||||
if (!egl_init_context(&and->egl, EGL_NONE, EGL_DEFAULT_DISPLAY,
|
||||
&major, &minor, &n, attribs))
|
||||
&major, &minor, &n, attribs, NULL))
|
||||
{
|
||||
egl_report_error();
|
||||
goto error;
|
||||
|
@ -497,6 +497,28 @@ static EGLint *gfx_ctx_drm_egl_fill_attribs(
|
||||
}
|
||||
|
||||
#ifdef HAVE_EGL
|
||||
static bool gbm_choose_xrgb8888_cb(void *display_data, EGLDisplay dpy, EGLConfig config)
|
||||
{
|
||||
EGLint r, g, b, id;
|
||||
(void)display_data;
|
||||
|
||||
/* Makes sure we have 8 bit color. */
|
||||
if (!eglGetConfigAttrib(dpy, config, EGL_RED_SIZE, &r))
|
||||
return false;
|
||||
if (!eglGetConfigAttrib(dpy, config, EGL_GREEN_SIZE, &g))
|
||||
return false;
|
||||
if (!eglGetConfigAttrib(dpy, config, EGL_BLUE_SIZE, &b))
|
||||
return false;
|
||||
|
||||
if (r != 8 || g != 8 || b != 8)
|
||||
return false;
|
||||
|
||||
if (!eglGetConfigAttrib(dpy, config, EGL_NATIVE_VISUAL_ID, &id))
|
||||
return false;
|
||||
|
||||
return id == GBM_FORMAT_XRGB8888;
|
||||
}
|
||||
|
||||
#define DRM_EGL_ATTRIBS_BASE \
|
||||
EGL_SURFACE_TYPE, EGL_WINDOW_BIT, \
|
||||
EGL_RED_SIZE, 1, \
|
||||
@ -575,7 +597,7 @@ static bool gfx_ctx_drm_egl_set_video_mode(gfx_ctx_drm_data_t *drm)
|
||||
#ifdef HAVE_EGL
|
||||
if (!egl_init_context(&drm->egl, EGL_PLATFORM_GBM_KHR,
|
||||
(EGLNativeDisplayType)g_gbm_dev, &major,
|
||||
&minor, &n, attrib_ptr))
|
||||
&minor, &n, attrib_ptr, gbm_choose_xrgb8888_cb))
|
||||
goto error;
|
||||
|
||||
attr = gfx_ctx_drm_egl_fill_attribs(drm, egl_attribs);
|
||||
|
@ -212,7 +212,7 @@ static void *gfx_ctx_emscripten_init(video_frame_info_t *video_info,
|
||||
}
|
||||
|
||||
if (!egl_init_context(&emscripten->egl, EGL_NONE,
|
||||
(void *)EGL_DEFAULT_DISPLAY, &major, &minor, &n, attribute_list))
|
||||
(void *)EGL_DEFAULT_DISPLAY, &major, &minor, &n, attribute_list, NULL))
|
||||
{
|
||||
egl_report_error();
|
||||
goto error;
|
||||
|
@ -116,7 +116,7 @@ static void *gfx_ctx_mali_fbdev_init(video_frame_info_t *video_info, void *video
|
||||
|
||||
#ifdef HAVE_EGL
|
||||
if (!egl_init_context(&mali->egl, EGL_NONE, EGL_DEFAULT_DISPLAY,
|
||||
&major, &minor, &n, attribs))
|
||||
&major, &minor, &n, attribs, NULL))
|
||||
{
|
||||
egl_report_error();
|
||||
goto error;
|
||||
|
@ -87,7 +87,7 @@ static void *gfx_ctx_opendingux_init(video_frame_info_t *video_info, void *video
|
||||
|
||||
if (!egl_init_context(&viv->egl, EGL_NONE, EGL_DEFAULT_DISPLAY,
|
||||
&major, &minor,
|
||||
&n, attribs))
|
||||
&n, attribs, NULL))
|
||||
{
|
||||
egl_report_error();
|
||||
goto error;
|
||||
|
@ -134,7 +134,7 @@ static void *gfx_ctx_qnx_init(video_frame_info_t *video_info, void *video_driver
|
||||
|
||||
#ifdef HAVE_EGL
|
||||
if (!egl_init_context(&qnx->egl, EGL_NONE, EGL_DEFAULT_DISPLAY, &major, &minor,
|
||||
&n, attribs))
|
||||
&n, attribs, NULL))
|
||||
{
|
||||
egl_report_error();
|
||||
goto error;
|
||||
|
@ -27,6 +27,8 @@
|
||||
static enum gfx_ctx_api ctx_nx_api = GFX_CTX_OPENGL_API;
|
||||
switch_ctx_data_t *nx_ctx_ptr = NULL;
|
||||
|
||||
extern bool platform_switch_has_focus;
|
||||
|
||||
void switch_ctx_destroy(void *data)
|
||||
{
|
||||
switch_ctx_data_t *ctx_nx = (switch_ctx_data_t *)data;
|
||||
@ -86,7 +88,7 @@ static void *switch_ctx_init(video_frame_info_t *video_info, void *video_driver)
|
||||
|
||||
#ifdef HAVE_EGL
|
||||
if (!egl_init_context(&ctx_nx->egl, EGL_NONE, EGL_DEFAULT_DISPLAY,
|
||||
&major, &minor, &n, attribs))
|
||||
&major, &minor, &n, attribs, NULL))
|
||||
{
|
||||
egl_report_error();
|
||||
goto error;
|
||||
@ -190,7 +192,7 @@ static bool switch_ctx_bind_api(void *data,
|
||||
static bool switch_ctx_has_focus(void *data)
|
||||
{
|
||||
(void)data;
|
||||
return true;
|
||||
return platform_switch_has_focus;
|
||||
}
|
||||
|
||||
static bool switch_ctx_suppress_screensaver(void *data, bool enable)
|
||||
|
@ -210,7 +210,7 @@ static void *gfx_ctx_vc_init(video_frame_info_t *video_info, void *video_driver)
|
||||
|
||||
#ifdef HAVE_EGL
|
||||
if (!egl_init_context(&vc->egl, EGL_NONE, EGL_DEFAULT_DISPLAY,
|
||||
&major, &minor, &n, attribute_list))
|
||||
&major, &minor, &n, attribute_list, NULL))
|
||||
{
|
||||
egl_report_error();
|
||||
goto error;
|
||||
|
@ -93,7 +93,7 @@ static void *gfx_ctx_vivante_init(video_frame_info_t *video_info, void *video_dr
|
||||
|
||||
#ifdef HAVE_EGL
|
||||
if (!egl_init_context(&viv->egl, EGL_NONE, EGL_DEFAULT_DISPLAY, &major, &minor,
|
||||
&n, attribs))
|
||||
&n, attribs, NULL))
|
||||
{
|
||||
egl_report_error();
|
||||
goto error;
|
||||
|
@ -42,15 +42,23 @@
|
||||
#include "../common/gl_common.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_DBUS
|
||||
#include "../common/dbus_common.h"
|
||||
#endif
|
||||
|
||||
#include "../common/wayland_common.h"
|
||||
#include "../../frontend/frontend_driver.h"
|
||||
#include "../../input/input_driver.h"
|
||||
#include "../../input/input_keymaps.h"
|
||||
|
||||
/* Generated from idle-inhibit-unstable-v1.xml */
|
||||
#include "../common/wayland/idle-inhibit-unstable-v1.h"
|
||||
|
||||
/* Generated from xdg-shell-unstable-v6.xml */
|
||||
#include "../common/wayland/xdg-shell-unstable-v6.h"
|
||||
|
||||
/* Generated from xdg-shell.xml */
|
||||
#include "../common/wayland/xdg-shell.h"
|
||||
|
||||
/* Generated from xdg-decoration-unstable-v1.h */
|
||||
#include "../common/wayland/xdg-decoration-unstable-v1.h"
|
||||
|
||||
|
||||
typedef struct touch_pos
|
||||
{
|
||||
@ -70,7 +78,13 @@ typedef struct gfx_ctx_wayland_data
|
||||
egl_ctx_data_t egl;
|
||||
struct wl_egl_window *win;
|
||||
#endif
|
||||
bool fullscreen;
|
||||
bool maximized;
|
||||
bool resize;
|
||||
bool configured;
|
||||
bool activated;
|
||||
int prev_width;
|
||||
int prev_height;
|
||||
unsigned width;
|
||||
unsigned height;
|
||||
unsigned physical_width;
|
||||
@ -81,11 +95,21 @@ typedef struct gfx_ctx_wayland_data
|
||||
struct wl_surface *surface;
|
||||
struct wl_shell_surface *shell_surf;
|
||||
struct wl_shell *shell;
|
||||
struct zxdg_surface_v6 *zxdg_surface;
|
||||
struct zxdg_shell_v6 *zxdg_shell;
|
||||
struct zxdg_toplevel_v6 *zxdg_toplevel;
|
||||
struct xdg_surface *xdg_surface;
|
||||
struct xdg_wm_base *xdg_shell;
|
||||
struct xdg_toplevel *xdg_toplevel;
|
||||
struct wl_keyboard *wl_keyboard;
|
||||
struct wl_pointer *wl_pointer;
|
||||
struct wl_touch *wl_touch;
|
||||
struct wl_seat *seat;
|
||||
struct wl_shm *shm;
|
||||
struct zxdg_decoration_manager_v1 *deco_manager;
|
||||
struct zxdg_toplevel_decoration_v1 *deco;
|
||||
struct zwp_idle_inhibit_manager_v1 *idle_inhibit_manager;
|
||||
struct zwp_idle_inhibitor_v1 *idle_inhibitor;
|
||||
int swap_interval;
|
||||
bool core_hw_context_enable;
|
||||
|
||||
@ -303,9 +327,14 @@ static void pointer_handle_button(void *data,
|
||||
{
|
||||
wl->input.mouse.left = true;
|
||||
|
||||
/* This behavior matches mpv, seems like a decent way to support window moving for now. */
|
||||
if (BIT_GET(wl->input.key_state, KEY_LEFTALT) && wl->shell_surf)
|
||||
wl_shell_surface_move(wl->shell_surf, wl->seat, serial);
|
||||
if (BIT_GET(wl->input.key_state, KEY_LEFTALT) && wl->xdg_toplevel) {
|
||||
if (wl->xdg_toplevel)
|
||||
xdg_toplevel_move(wl->xdg_toplevel, wl->seat, serial);
|
||||
else if (wl->zxdg_toplevel)
|
||||
zxdg_toplevel_v6_move(wl->zxdg_toplevel, wl->seat, serial);
|
||||
else if (wl->shell)
|
||||
wl_shell_surface_move(wl->shell_surf, wl->seat, serial);
|
||||
}
|
||||
}
|
||||
else if (button == BTN_RIGHT)
|
||||
wl->input.mouse.right = true;
|
||||
@ -344,6 +373,8 @@ static const struct wl_pointer_listener pointer_listener = {
|
||||
pointer_handle_axis,
|
||||
};
|
||||
|
||||
/* TODO: implement check for resize */
|
||||
|
||||
static void touch_handle_down(void *data,
|
||||
struct wl_touch *wl_touch,
|
||||
uint32_t serial,
|
||||
@ -542,6 +573,134 @@ bool wayland_context_gettouchpos(void *data, unsigned id,
|
||||
|
||||
|
||||
/* Shell surface callbacks. */
|
||||
static void xdg_shell_ping(void *data, struct xdg_wm_base *shell, uint32_t serial)
|
||||
{
|
||||
xdg_wm_base_pong(shell, serial);
|
||||
}
|
||||
|
||||
static const struct xdg_wm_base_listener xdg_shell_listener = {
|
||||
xdg_shell_ping,
|
||||
};
|
||||
|
||||
static void handle_surface_config(void *data, struct xdg_surface *surface,
|
||||
uint32_t serial)
|
||||
{
|
||||
xdg_surface_ack_configure(surface, serial);
|
||||
}
|
||||
|
||||
static const struct xdg_surface_listener xdg_surface_listener = {
|
||||
handle_surface_config,
|
||||
};
|
||||
|
||||
static void handle_toplevel_config(void *data, struct xdg_toplevel *toplevel,
|
||||
int32_t width, int32_t height, struct wl_array *states)
|
||||
{
|
||||
gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data;
|
||||
|
||||
wl->fullscreen = false;
|
||||
wl->maximized = false;
|
||||
const uint32_t *state;
|
||||
wl_array_for_each(state, states) {
|
||||
switch (*state) {
|
||||
case XDG_TOPLEVEL_STATE_FULLSCREEN:
|
||||
wl->fullscreen = true;
|
||||
break;
|
||||
case XDG_TOPLEVEL_STATE_MAXIMIZED:
|
||||
wl->maximized = true;
|
||||
break;
|
||||
case XDG_TOPLEVEL_STATE_RESIZING:
|
||||
wl->resize = true;
|
||||
break;
|
||||
case XDG_TOPLEVEL_STATE_ACTIVATED:
|
||||
wl->activated = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (width > 0 && height > 0) {
|
||||
wl->prev_width = width;
|
||||
wl->prev_height = height;
|
||||
wl->width = width;
|
||||
wl->height = height;
|
||||
}
|
||||
|
||||
wl->configured = false;
|
||||
}
|
||||
|
||||
static void handle_toplevel_close(void *data, struct xdg_toplevel *xdg_toplevel)
|
||||
{
|
||||
gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data;
|
||||
BIT_SET(wl->input.key_state, KEY_ESC);
|
||||
}
|
||||
|
||||
static const struct xdg_toplevel_listener xdg_toplevel_listener = {
|
||||
handle_toplevel_config,
|
||||
handle_toplevel_close,
|
||||
};
|
||||
|
||||
static void zxdg_shell_ping(void *data, struct zxdg_shell_v6 *shell, uint32_t serial)
|
||||
{
|
||||
zxdg_shell_v6_pong(shell, serial);
|
||||
}
|
||||
|
||||
static const struct zxdg_shell_v6_listener zxdg_shell_v6_listener = {
|
||||
zxdg_shell_ping,
|
||||
};
|
||||
|
||||
static void handle_zxdg_surface_config(void *data, struct zxdg_surface_v6 *surface,
|
||||
uint32_t serial)
|
||||
{
|
||||
zxdg_surface_v6_ack_configure(surface, serial);
|
||||
}
|
||||
|
||||
static const struct zxdg_surface_v6_listener zxdg_surface_v6_listener = {
|
||||
handle_zxdg_surface_config,
|
||||
};
|
||||
|
||||
static void handle_zxdg_toplevel_config(void *data, struct zxdg_toplevel_v6 *toplevel,
|
||||
int32_t width, int32_t height, struct wl_array *states)
|
||||
{
|
||||
gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data;
|
||||
|
||||
wl->fullscreen = false;
|
||||
wl->maximized = false;
|
||||
const uint32_t *state;
|
||||
wl_array_for_each(state, states) {
|
||||
switch (*state) {
|
||||
case XDG_TOPLEVEL_STATE_FULLSCREEN:
|
||||
wl->fullscreen = true;
|
||||
break;
|
||||
case XDG_TOPLEVEL_STATE_MAXIMIZED:
|
||||
wl->maximized = true;
|
||||
break;
|
||||
case XDG_TOPLEVEL_STATE_RESIZING:
|
||||
wl->resize = true;
|
||||
break;
|
||||
case XDG_TOPLEVEL_STATE_ACTIVATED:
|
||||
wl->activated = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (width > 0 && height > 0) {
|
||||
wl->prev_width = width;
|
||||
wl->prev_height = height;
|
||||
wl->width = width;
|
||||
wl->height = height;
|
||||
}
|
||||
|
||||
wl->configured = false;
|
||||
}
|
||||
|
||||
static void handle_zxdg_toplevel_close(void *data, struct zxdg_toplevel_v6 *zxdg_toplevel)
|
||||
{
|
||||
gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data;
|
||||
BIT_SET(wl->input.key_state, KEY_ESC);
|
||||
}
|
||||
|
||||
static const struct zxdg_toplevel_v6_listener zxdg_toplevel_v6_listener = {
|
||||
handle_zxdg_toplevel_config,
|
||||
handle_zxdg_toplevel_close,
|
||||
};
|
||||
|
||||
static void shell_surface_handle_ping(void *data,
|
||||
struct wl_shell_surface *shell_surface,
|
||||
uint32_t serial)
|
||||
@ -669,6 +828,12 @@ static void registry_handle_global(void *data, struct wl_registry *reg,
|
||||
wl_output_add_listener(output, &output_listener, wl);
|
||||
wl_display_roundtrip(wl->input.dpy);
|
||||
}
|
||||
else if (string_is_equal(interface, "xdg_wm_base"))
|
||||
wl->xdg_shell = (struct xdg_wm_base*)
|
||||
wl_registry_bind(reg, id, &xdg_wm_base_interface, 1);
|
||||
else if (string_is_equal(interface, "zxdg_shell_v6"))
|
||||
wl->zxdg_shell = (struct zxdg_shell_v6*)
|
||||
wl_registry_bind(reg, id, &zxdg_shell_v6_interface, 1);
|
||||
else if (string_is_equal(interface, "wl_shell"))
|
||||
wl->shell = (struct wl_shell*)
|
||||
wl_registry_bind(reg, id, &wl_shell_interface, 1);
|
||||
@ -679,6 +844,12 @@ static void registry_handle_global(void *data, struct wl_registry *reg,
|
||||
wl->seat = (struct wl_seat*)wl_registry_bind(reg, id, &wl_seat_interface, 2);
|
||||
wl_seat_add_listener(wl->seat, &seat_listener, wl);
|
||||
}
|
||||
else if (string_is_equal(interface, "zwp_idle_inhibit_manager_v1"))
|
||||
wl->idle_inhibit_manager = (struct zwp_idle_inhibit_manager_v1*)wl_registry_bind(
|
||||
reg, id, &zwp_idle_inhibit_manager_v1_interface, 1);
|
||||
else if (string_is_equal(interface, "zxdg_decoration_manager_v1"))
|
||||
wl->deco_manager = (struct zxdg_decoration_manager_v1*)wl_registry_bind(
|
||||
reg, id, &zxdg_decoration_manager_v1_interface, 1);
|
||||
}
|
||||
|
||||
static void registry_handle_global_remove(void *data,
|
||||
@ -751,16 +922,36 @@ static void gfx_ctx_wl_destroy_resources(gfx_ctx_wayland_data_t *wl)
|
||||
|
||||
if (wl->seat)
|
||||
wl_seat_destroy(wl->seat);
|
||||
if (wl->xdg_shell)
|
||||
xdg_wm_base_destroy(wl->xdg_shell);
|
||||
if (wl->zxdg_shell)
|
||||
zxdg_shell_v6_destroy(wl->zxdg_shell);
|
||||
if (wl->shell)
|
||||
wl_shell_destroy(wl->shell);
|
||||
if (wl->compositor)
|
||||
wl_compositor_destroy(wl->compositor);
|
||||
if (wl->registry)
|
||||
wl_registry_destroy(wl->registry);
|
||||
if (wl->shell_surf)
|
||||
wl_shell_surface_destroy(wl->shell_surf);
|
||||
if (wl->xdg_surface)
|
||||
xdg_surface_destroy(wl->xdg_surface);
|
||||
if (wl->zxdg_surface)
|
||||
zxdg_surface_v6_destroy(wl->zxdg_surface);
|
||||
if (wl->surface)
|
||||
wl_surface_destroy(wl->surface);
|
||||
if (wl->xdg_toplevel)
|
||||
xdg_toplevel_destroy(wl->xdg_toplevel);
|
||||
if (wl->zxdg_toplevel)
|
||||
zxdg_toplevel_v6_destroy(wl->zxdg_toplevel);
|
||||
if (wl->shell_surf)
|
||||
wl_shell_surface_destroy(wl->shell_surf);
|
||||
if (wl->idle_inhibit_manager)
|
||||
zwp_idle_inhibit_manager_v1_destroy(wl->idle_inhibit_manager);
|
||||
if (wl->deco)
|
||||
zxdg_toplevel_decoration_v1_destroy(wl->deco);
|
||||
if (wl->deco_manager)
|
||||
zxdg_decoration_manager_v1_destroy(wl->deco_manager);
|
||||
if (wl->idle_inhibitor)
|
||||
zwp_idle_inhibitor_v1_destroy(wl->idle_inhibitor);
|
||||
|
||||
if (wl->input.dpy)
|
||||
{
|
||||
@ -771,20 +962,21 @@ static void gfx_ctx_wl_destroy_resources(gfx_ctx_wayland_data_t *wl)
|
||||
#ifdef HAVE_EGL
|
||||
wl->win = NULL;
|
||||
#endif
|
||||
wl->shell = NULL;
|
||||
wl->xdg_shell = NULL;
|
||||
wl->zxdg_shell = NULL;
|
||||
wl->shell = NULL;
|
||||
wl->compositor = NULL;
|
||||
wl->registry = NULL;
|
||||
wl->input.dpy = NULL;
|
||||
wl->shell_surf = NULL;
|
||||
wl->xdg_surface = NULL;
|
||||
wl->surface = NULL;
|
||||
wl->xdg_toplevel = NULL;
|
||||
wl->zxdg_toplevel = NULL;
|
||||
wl->shell_surf = NULL;
|
||||
|
||||
wl->width = 0;
|
||||
wl->height = 0;
|
||||
|
||||
#ifdef HAVE_DBUS
|
||||
dbus_screensaver_uninhibit();
|
||||
dbus_close_connection();
|
||||
#endif
|
||||
}
|
||||
|
||||
void flush_wayland_fd(void *data)
|
||||
@ -901,8 +1093,22 @@ static void gfx_ctx_wl_update_title(void *data, void *data2)
|
||||
|
||||
video_driver_get_window_title(title, sizeof(title));
|
||||
|
||||
if (wl && title[0])
|
||||
wl_shell_surface_set_title(wl->shell_surf, title);
|
||||
if (wl && title[0]) {
|
||||
if (wl->xdg_toplevel) {
|
||||
if (wl->deco) {
|
||||
zxdg_toplevel_decoration_v1_set_mode(wl->deco, ZXDG_TOPLEVEL_DECORATION_V1_MODE_SERVER_SIDE);
|
||||
}
|
||||
xdg_toplevel_set_title(wl->xdg_toplevel, title);
|
||||
}
|
||||
else if (wl->zxdg_toplevel) {
|
||||
if (wl->deco) {
|
||||
zxdg_toplevel_decoration_v1_set_mode(wl->deco, ZXDG_TOPLEVEL_DECORATION_V1_MODE_SERVER_SIDE);
|
||||
}
|
||||
zxdg_toplevel_v6_set_title(wl->zxdg_toplevel, title);
|
||||
}
|
||||
else if (wl->shell_surf)
|
||||
wl_shell_surface_set_title(wl->shell_surf, title);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1062,10 +1268,30 @@ static void *gfx_ctx_wl_init(video_frame_info_t *video_info, void *video_driver)
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (!wl->shell)
|
||||
if (!wl->xdg_shell)
|
||||
{
|
||||
RARCH_ERR("[Wayland]: Failed to create shell.\n");
|
||||
goto error;
|
||||
RARCH_LOG("[Wayland]: Using zxdg_shell_v6 interface.\n");
|
||||
}
|
||||
|
||||
if (!wl->xdg_shell && !wl->zxdg_shell)
|
||||
{
|
||||
RARCH_WARN("[Wayland]: Fallback to deprecated wl_shell interface!.\n");
|
||||
}
|
||||
|
||||
if (!wl->xdg_shell && !wl->zxdg_shell && !wl->shell)
|
||||
{
|
||||
RARCH_ERR("[Wayland]: Failed to create shell.\n");
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (!wl->idle_inhibit_manager)
|
||||
{
|
||||
RARCH_WARN("[Wayland]: Compositor doesn't support zwp_idle_inhibit_manager_v1 protocol!\n");
|
||||
}
|
||||
|
||||
if (!wl->deco_manager)
|
||||
{
|
||||
RARCH_WARN("[Wayland]: Compositor doesn't support zxdg_decoration_manager_v1 protocol!\n");
|
||||
}
|
||||
|
||||
wl->input.fd = wl_display_get_fd(wl->input.dpy);
|
||||
@ -1079,7 +1305,8 @@ static void *gfx_ctx_wl_init(video_frame_info_t *video_info, void *video_driver)
|
||||
if (!egl_init_context(&wl->egl,
|
||||
EGL_PLATFORM_WAYLAND_KHR,
|
||||
(EGLNativeDisplayType)wl->input.dpy,
|
||||
&major, &minor, &n, attrib_ptr))
|
||||
&major, &minor, &n, attrib_ptr,
|
||||
egl_default_accept_config_cb))
|
||||
{
|
||||
egl_report_error();
|
||||
goto error;
|
||||
@ -1119,10 +1346,6 @@ static void *gfx_ctx_wl_init(video_frame_info_t *video_info, void *video_driver)
|
||||
|
||||
flush_wayland_fd(&wl->input);
|
||||
|
||||
#ifdef HAVE_DBUS
|
||||
dbus_ensure_connection();
|
||||
#endif
|
||||
|
||||
return wl;
|
||||
|
||||
error:
|
||||
@ -1293,12 +1516,63 @@ static bool gfx_ctx_wl_set_video_mode(void *data,
|
||||
default:
|
||||
break;
|
||||
}
|
||||
wl->shell_surf = wl_shell_get_shell_surface(wl->shell, wl->surface);
|
||||
|
||||
wl_shell_surface_add_listener(wl->shell_surf, &shell_surface_listener, wl);
|
||||
wl_shell_surface_set_toplevel(wl->shell_surf);
|
||||
wl_shell_surface_set_class(wl->shell_surf, "RetroArch");
|
||||
wl_shell_surface_set_title(wl->shell_surf, "RetroArch");
|
||||
|
||||
if (wl->xdg_shell) {
|
||||
wl->xdg_surface = xdg_wm_base_get_xdg_surface(wl->xdg_shell, wl->surface);
|
||||
xdg_surface_add_listener(wl->xdg_surface, &xdg_surface_listener, wl);
|
||||
|
||||
wl->xdg_toplevel = xdg_surface_get_toplevel(wl->xdg_surface);
|
||||
xdg_toplevel_add_listener(wl->xdg_toplevel, &xdg_toplevel_listener, wl);
|
||||
|
||||
xdg_toplevel_set_app_id(wl->xdg_toplevel, "RetroArch");
|
||||
xdg_toplevel_set_title(wl->xdg_toplevel, "RetroArch");
|
||||
|
||||
if (wl->deco_manager) {
|
||||
wl->deco = zxdg_decoration_manager_v1_get_toplevel_decoration(
|
||||
wl->deco_manager, wl->xdg_toplevel);
|
||||
}
|
||||
|
||||
/* Waiting for xdg_toplevel to be configured before starting to draw */
|
||||
wl_surface_commit(wl->surface);
|
||||
wl->configured = true;
|
||||
|
||||
while (wl->configured) {
|
||||
wl_display_dispatch(wl->input.dpy);
|
||||
}
|
||||
wl_display_roundtrip(wl->input.dpy);
|
||||
xdg_wm_base_add_listener(wl->xdg_shell, &xdg_shell_listener, NULL);
|
||||
} else if (wl->zxdg_shell) {
|
||||
wl->zxdg_surface = zxdg_shell_v6_get_xdg_surface(wl->zxdg_shell, wl->surface);
|
||||
zxdg_surface_v6_add_listener(wl->zxdg_surface, &zxdg_surface_v6_listener, wl);
|
||||
|
||||
wl->zxdg_toplevel = zxdg_surface_v6_get_toplevel(wl->zxdg_surface);
|
||||
zxdg_toplevel_v6_add_listener(wl->zxdg_toplevel, &zxdg_toplevel_v6_listener, wl);
|
||||
|
||||
zxdg_toplevel_v6_set_app_id(wl->zxdg_toplevel, "RetroArch");
|
||||
zxdg_toplevel_v6_set_title(wl->zxdg_toplevel, "RetroArch");
|
||||
|
||||
if (wl->deco_manager) {
|
||||
wl->deco = zxdg_decoration_manager_v1_get_toplevel_decoration(
|
||||
wl->deco_manager, wl->xdg_toplevel);
|
||||
}
|
||||
|
||||
/* Waiting for xdg_toplevel to be configured before starting to draw */
|
||||
wl_surface_commit(wl->surface);
|
||||
wl->configured = true;
|
||||
|
||||
while (wl->configured) {
|
||||
wl_display_dispatch(wl->input.dpy);
|
||||
}
|
||||
wl_display_roundtrip(wl->input.dpy);
|
||||
zxdg_shell_v6_add_listener(wl->zxdg_shell, &zxdg_shell_v6_listener, NULL);
|
||||
} else if (wl->shell) {
|
||||
wl->shell_surf = wl_shell_get_shell_surface(wl->shell, wl->surface);
|
||||
wl_shell_surface_add_listener(wl->shell_surf, &shell_surface_listener, wl);
|
||||
wl_shell_surface_set_toplevel(wl->shell_surf);
|
||||
wl_shell_surface_set_class(wl->shell_surf, "RetroArch");
|
||||
wl_shell_surface_set_title(wl->shell_surf, "RetroArch");
|
||||
}
|
||||
|
||||
|
||||
switch (wl_api)
|
||||
{
|
||||
@ -1323,9 +1597,16 @@ static bool gfx_ctx_wl_set_video_mode(void *data,
|
||||
break;
|
||||
}
|
||||
|
||||
if (fullscreen)
|
||||
wl_shell_surface_set_fullscreen(wl->shell_surf,
|
||||
if (fullscreen) {
|
||||
if (wl->xdg_toplevel) {
|
||||
xdg_toplevel_set_fullscreen(wl->xdg_toplevel, NULL);
|
||||
} else if (wl->zxdg_toplevel) {
|
||||
zxdg_toplevel_v6_set_fullscreen(wl->zxdg_toplevel, NULL);
|
||||
} else if (wl->shell) {
|
||||
wl_shell_surface_set_fullscreen(wl->shell_surf,
|
||||
WL_SHELL_SURFACE_FULLSCREEN_METHOD_DEFAULT, 0, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
flush_wayland_fd(&wl->input);
|
||||
|
||||
@ -1388,16 +1669,26 @@ static bool gfx_ctx_wl_has_focus(void *data)
|
||||
return wl->input.keyboard_focus;
|
||||
}
|
||||
|
||||
static bool gfx_ctx_wl_suppress_screensaver(void *data, bool enable)
|
||||
static bool gfx_ctx_wl_suppress_screensaver(void *data, bool state)
|
||||
{
|
||||
(void)data;
|
||||
(void)enable;
|
||||
(void)data;
|
||||
|
||||
gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data;
|
||||
|
||||
#ifdef HAVE_DBUS
|
||||
return dbus_suspend_screensaver(enable);
|
||||
#endif
|
||||
|
||||
return true;
|
||||
if (!wl->idle_inhibit_manager)
|
||||
return false;
|
||||
if (state == (!!wl->idle_inhibitor))
|
||||
return true;
|
||||
if (state) {
|
||||
RARCH_LOG("[Wayland]: Enabling idle inhibitor\n");
|
||||
struct zwp_idle_inhibit_manager_v1 *mgr = wl->idle_inhibit_manager;
|
||||
wl->idle_inhibitor = zwp_idle_inhibit_manager_v1_create_inhibitor(mgr, wl->surface);
|
||||
} else {
|
||||
RARCH_LOG("[Wayland]: Disabling the idle inhibitor\n");
|
||||
zwp_idle_inhibitor_v1_destroy(wl->idle_inhibitor);
|
||||
wl->idle_inhibitor = NULL;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool gfx_ctx_wl_has_windowed(void *data)
|
||||
|
@ -1078,7 +1078,7 @@ static bool gfx_ctx_x_bind_api(void *data, enum gfx_ctx_api api,
|
||||
case GFX_CTX_OPENGL_ES_API:
|
||||
#ifdef HAVE_OPENGLES2
|
||||
{
|
||||
Display *dpy = XOpenDisplay(NULL);
|
||||
Display *dpy = XOpenDisplay(NULL);
|
||||
const char *exts = glXQueryExtensionsString(dpy, DefaultScreen(dpy));
|
||||
bool ret = exts && strstr(exts,
|
||||
"GLX_EXT_create_context_es2_profile");
|
||||
|
@ -172,7 +172,7 @@ static void *gfx_ctx_xegl_init(video_frame_info_t *video_info, void *video_drive
|
||||
|
||||
#ifdef HAVE_EGL
|
||||
if (!egl_init_context(&xegl->egl, EGL_PLATFORM_X11_KHR,
|
||||
(EGLNativeDisplayType)g_x11_dpy, &major, &minor, &n, attrib_ptr))
|
||||
(EGLNativeDisplayType)g_x11_dpy, &major, &minor, &n, attrib_ptr, egl_default_accept_config_cb))
|
||||
{
|
||||
egl_report_error();
|
||||
goto error;
|
||||
|
@ -480,11 +480,11 @@ error:
|
||||
return false;
|
||||
}
|
||||
|
||||
static void gl_glsl_strip_parameter_pragmas(char *source)
|
||||
static void gl_glsl_strip_parameter_pragmas(char *source, const char *str)
|
||||
{
|
||||
/* #pragma parameter lines tend to have " characters in them,
|
||||
* which is not legal GLSL. */
|
||||
char *s = strstr(source, "#pragma parameter");
|
||||
char *s = strstr(source, str);
|
||||
|
||||
while (s)
|
||||
{
|
||||
@ -492,7 +492,7 @@ static void gl_glsl_strip_parameter_pragmas(char *source)
|
||||
* so we can just replace the entire line with spaces. */
|
||||
while (*s != '\0' && *s != '\n')
|
||||
*s++ = ' ';
|
||||
s = strstr(s, "#pragma parameter");
|
||||
s = strstr(s, str);
|
||||
}
|
||||
}
|
||||
|
||||
@ -506,7 +506,7 @@ static bool gl_glsl_load_source_path(struct video_shader_pass *pass,
|
||||
if (nitems <= 0 || len <= 0)
|
||||
return false;
|
||||
|
||||
gl_glsl_strip_parameter_pragmas(pass->source.string.vertex);
|
||||
gl_glsl_strip_parameter_pragmas(pass->source.string.vertex, "#pragma parameter");
|
||||
pass->source.string.fragment = strdup(pass->source.string.vertex);
|
||||
return pass->source.string.fragment && pass->source.string.vertex;
|
||||
}
|
||||
|
@ -210,9 +210,10 @@ class Framebuffer
|
||||
Framebuffer(Framebuffer&&) = delete;
|
||||
void operator=(Framebuffer&&) = delete;
|
||||
|
||||
void set_size(DeferredDisposer &disposer, const Size2D &size);
|
||||
void set_size(DeferredDisposer &disposer, const Size2D &size, VkFormat format = VK_FORMAT_UNDEFINED);
|
||||
|
||||
const Size2D &get_size() const { return size; }
|
||||
VkFormat get_format() const { return format; }
|
||||
VkImage get_image() const { return image; }
|
||||
VkImageView get_view() const { return view; }
|
||||
VkFramebuffer get_framebuffer() const { return framebuffer; }
|
||||
@ -1009,9 +1010,10 @@ void vulkan_filter_chain::update_history(DeferredDisposer &disposer, VkCommandBu
|
||||
swap(back, tmp);
|
||||
|
||||
if (input_texture.width != tmp->get_size().width ||
|
||||
input_texture.height != tmp->get_size().height)
|
||||
input_texture.height != tmp->get_size().height ||
|
||||
(input_texture.format != VK_FORMAT_UNDEFINED && input_texture.format != tmp->get_format()))
|
||||
{
|
||||
tmp->set_size(disposer, { input_texture.width, input_texture.height });
|
||||
tmp->set_size(disposer, { input_texture.width, input_texture.height }, input_texture.format);
|
||||
}
|
||||
|
||||
tmp->copy(cmd, input_texture.image, src_layout);
|
||||
@ -2422,12 +2424,14 @@ void Framebuffer::init_framebuffer()
|
||||
vkCreateFramebuffer(device, &info, nullptr, &framebuffer);
|
||||
}
|
||||
|
||||
void Framebuffer::set_size(DeferredDisposer &disposer, const Size2D &size)
|
||||
void Framebuffer::set_size(DeferredDisposer &disposer, const Size2D &size, VkFormat format)
|
||||
{
|
||||
this->size = size;
|
||||
if (format != VK_FORMAT_UNDEFINED)
|
||||
this->format = format;
|
||||
|
||||
RARCH_LOG("[Vulkan filter chain]: Updating framebuffer size %u x %u.\n",
|
||||
size.width, size.height);
|
||||
RARCH_LOG("[Vulkan filter chain]: Updating framebuffer size %u x %u (format: %u).\n",
|
||||
size.width, size.height, (unsigned)this->format);
|
||||
|
||||
{
|
||||
// The current framebuffers, etc, might still be in use
|
||||
|
@ -53,6 +53,7 @@ struct vulkan_filter_chain_texture
|
||||
VkImageLayout layout;
|
||||
unsigned width;
|
||||
unsigned height;
|
||||
VkFormat format;
|
||||
};
|
||||
|
||||
enum vulkan_filter_chain_scale
|
||||
|
@ -88,7 +88,7 @@ static void switch_res_crt(unsigned width, unsigned height)
|
||||
{
|
||||
if (height > 100)
|
||||
{
|
||||
video_display_server_switch_resolution(width, height,
|
||||
video_display_server_set_resolution(width, height,
|
||||
ra_set_core_hz, ra_core_hz, crt_center_adjust);
|
||||
video_driver_apply_state_changes();
|
||||
}
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include "video_driver.h"
|
||||
#include "../verbosity.h"
|
||||
|
||||
static const video_display_server_t *current_display_server = NULL;
|
||||
static const video_display_server_t *current_display_server = &dispserv_null;
|
||||
static void *current_display_server_data = NULL;
|
||||
|
||||
const char *video_display_server_get_ident(void)
|
||||
@ -90,14 +90,21 @@ bool video_display_server_set_window_decorations(bool on)
|
||||
}
|
||||
|
||||
|
||||
bool video_display_server_switch_resolution(unsigned width, unsigned height,
|
||||
bool video_display_server_set_resolution(unsigned width, unsigned height,
|
||||
int int_hz, float hz, int center)
|
||||
{
|
||||
if (current_display_server && current_display_server->switch_resolution)
|
||||
return current_display_server->switch_resolution(current_display_server_data, width, height, int_hz, hz, center);
|
||||
if (current_display_server && current_display_server->set_resolution)
|
||||
return current_display_server->set_resolution(current_display_server_data, width, height, int_hz, hz, center);
|
||||
return false;
|
||||
}
|
||||
|
||||
void *video_display_server_get_resolution_list(unsigned *size)
|
||||
{
|
||||
if (current_display_server && current_display_server->get_resolution_list)
|
||||
return current_display_server->get_resolution_list(current_display_server_data, size);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
const char *video_display_server_get_output_options(void)
|
||||
{
|
||||
if (current_display_server && current_display_server->get_output_options)
|
||||
|
@ -23,6 +23,16 @@
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
typedef struct video_display_config
|
||||
{
|
||||
unsigned width;
|
||||
unsigned height;
|
||||
unsigned bpp;
|
||||
unsigned refreshrate;
|
||||
unsigned idx;
|
||||
bool current;
|
||||
} video_display_config_t;
|
||||
|
||||
typedef struct video_display_server
|
||||
{
|
||||
void *(*init)(void);
|
||||
@ -30,8 +40,10 @@ typedef struct video_display_server
|
||||
bool (*set_window_opacity)(void *data, unsigned opacity);
|
||||
bool (*set_window_progress)(void *data, int progress, bool finished);
|
||||
bool (*set_window_decorations)(void *data, bool on);
|
||||
bool (*switch_resolution)(void *data, unsigned width,
|
||||
bool (*set_resolution)(void *data, unsigned width,
|
||||
unsigned height, int int_hz, float hz, int center);
|
||||
void *(*get_resolution_list)(void *data,
|
||||
unsigned *size);
|
||||
const char *(*get_output_options)(void *data);
|
||||
const char *ident;
|
||||
} video_display_server_t;
|
||||
@ -46,10 +58,12 @@ bool video_display_server_set_window_progress(int progress, bool finished);
|
||||
|
||||
bool video_display_server_set_window_decorations(bool on);
|
||||
|
||||
bool video_display_server_switch_resolution(
|
||||
bool video_display_server_set_resolution(
|
||||
unsigned width, unsigned height,
|
||||
int int_hz, float hz, int center);
|
||||
|
||||
void *video_display_server_get_resolution_list(unsigned *size);
|
||||
|
||||
const char *video_display_server_get_output_options(void);
|
||||
|
||||
const char *video_display_server_get_ident(void);
|
||||
|
@ -985,10 +985,12 @@ static bool video_driver_init_internal(bool *video_is_threaded)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (settings->uints.video_window_x || settings->uints.video_window_y)
|
||||
/* To-Do: remove when the new window resizing core is hooked */
|
||||
if (settings->bools.video_window_save_positions &&
|
||||
(settings->uints.window_position_width || settings->uints.window_position_height))
|
||||
{
|
||||
width = settings->uints.video_window_x;
|
||||
height = settings->uints.video_window_y;
|
||||
width = settings->uints.window_position_width;
|
||||
height = settings->uints.window_position_height;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1002,7 +1004,7 @@ static bool video_driver_init_internal(bool *video_is_threaded)
|
||||
else
|
||||
width = roundf(geom->base_width * settings->floats.video_scale);
|
||||
height = roundf(geom->base_height * settings->floats.video_scale);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (width && height)
|
||||
@ -1491,15 +1493,6 @@ void video_driver_menu_settings(void **list_data, void *list_info_data,
|
||||
(void)subgroup_info;
|
||||
(void)global;
|
||||
|
||||
#if defined(GEKKO) || defined(__CELLOS_LV2__)
|
||||
CONFIG_ACTION(
|
||||
list, list_info,
|
||||
MENU_ENUM_LABEL_SCREEN_RESOLUTION,
|
||||
MENU_ENUM_LABEL_VALUE_SCREEN_RESOLUTION,
|
||||
group_info,
|
||||
subgroup_info,
|
||||
parent_group);
|
||||
#endif
|
||||
#if defined(__CELLOS_LV2__)
|
||||
CONFIG_BOOL(
|
||||
list, list_info,
|
||||
@ -2456,10 +2449,13 @@ void video_driver_frame(const void *data, unsigned width,
|
||||
char frames_text[64];
|
||||
last_fps = TIME_TO_FPS(curr_time, new_time, FPS_UPDATE_INTERVAL);
|
||||
|
||||
if (video_info.fps_show)
|
||||
if (video_info.fps_show || video_info.framecount_show)
|
||||
{
|
||||
snprintf(video_info.fps_text, sizeof(video_info.fps_text),
|
||||
"|| FPS: %6.1f ", last_fps);
|
||||
if (video_info.fps_show)
|
||||
{
|
||||
snprintf(video_info.fps_text, sizeof(video_info.fps_text),
|
||||
" || FPS: %6.1f ", last_fps);
|
||||
}
|
||||
if (video_info.framecount_show)
|
||||
{
|
||||
snprintf(frames_text,
|
||||
@ -2468,7 +2464,8 @@ void video_driver_frame(const void *data, unsigned width,
|
||||
(uint64_t)video_driver_frame_count);
|
||||
}
|
||||
snprintf(video_driver_window_title, sizeof(video_driver_window_title),
|
||||
"%s%s%s", title, video_info.fps_text,
|
||||
"%s%s%s", title,
|
||||
video_info.fps_show ? video_info.fps_text : "",
|
||||
video_info.framecount_show ? frames_text : "");
|
||||
}
|
||||
else
|
||||
@ -2498,6 +2495,28 @@ void video_driver_frame(const void *data, unsigned width,
|
||||
"FPS: %6.1f",
|
||||
last_fps);
|
||||
}
|
||||
|
||||
if (video_info.fps_show && video_info.framecount_show)
|
||||
snprintf(
|
||||
video_info.fps_text,
|
||||
sizeof(video_info.fps_text),
|
||||
"FPS: %6.1f || %s: %" PRIu64,
|
||||
last_fps,
|
||||
msg_hash_to_str(MSG_FRAMES),
|
||||
(uint64_t)video_driver_frame_count);
|
||||
else if (video_info.framecount_show)
|
||||
snprintf(
|
||||
video_info.fps_text,
|
||||
sizeof(video_info.fps_text),
|
||||
"%s: %" PRIu64,
|
||||
msg_hash_to_str(MSG_FRAMES),
|
||||
(uint64_t)video_driver_frame_count);
|
||||
else if (video_info.fps_show)
|
||||
snprintf(
|
||||
video_info.fps_text,
|
||||
sizeof(video_info.fps_text),
|
||||
"FPS: %6.1f",
|
||||
last_fps);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -2627,7 +2646,7 @@ void video_driver_frame(const void *data, unsigned width,
|
||||
video_driver_frame_count++;
|
||||
|
||||
/* Display the FPS, with a higher priority. */
|
||||
if (video_info.fps_show)
|
||||
if (video_info.fps_show || video_info.framecount_show)
|
||||
runloop_msg_queue_push(video_info.fps_text, 2, 1, true);
|
||||
|
||||
/* trigger set resolution*/
|
||||
|
@ -48,9 +48,6 @@ enum thread_cmd
|
||||
|
||||
CMD_POKE_SET_VIDEO_MODE,
|
||||
CMD_POKE_SET_FILTERING,
|
||||
CMD_POKE_GET_VIDEO_OUTPUT_SIZE,
|
||||
CMD_POKE_GET_VIDEO_OUTPUT_PREV,
|
||||
CMD_POKE_GET_VIDEO_OUTPUT_NEXT,
|
||||
|
||||
CMD_POKE_SET_FBO_STATE,
|
||||
CMD_POKE_GET_FBO_STATE,
|
||||
@ -499,26 +496,6 @@ static bool video_thread_handle_packet(
|
||||
video_thread_reply(thr, &pkt);
|
||||
break;
|
||||
|
||||
case CMD_POKE_GET_VIDEO_OUTPUT_SIZE:
|
||||
if (thr->poke && thr->poke->get_video_output_size)
|
||||
thr->poke->get_video_output_size(thr->driver_data,
|
||||
&pkt.data.output.width,
|
||||
&pkt.data.output.height);
|
||||
video_thread_reply(thr, &pkt);
|
||||
break;
|
||||
|
||||
case CMD_POKE_GET_VIDEO_OUTPUT_PREV:
|
||||
if (thr->poke && thr->poke->get_video_output_prev)
|
||||
thr->poke->get_video_output_prev(thr->driver_data);
|
||||
video_thread_reply(thr, &pkt);
|
||||
break;
|
||||
|
||||
case CMD_POKE_GET_VIDEO_OUTPUT_NEXT:
|
||||
if (thr->poke && thr->poke->get_video_output_next)
|
||||
thr->poke->get_video_output_next(thr->driver_data);
|
||||
video_thread_reply(thr, &pkt);
|
||||
break;
|
||||
|
||||
case CMD_POKE_SET_ASPECT_RATIO:
|
||||
if (thr->poke && thr->poke->set_aspect_ratio)
|
||||
thr->poke->set_aspect_ratio(thr->driver_data,
|
||||
@ -1107,37 +1084,36 @@ static void thread_get_video_output_size(void *data,
|
||||
unsigned *width, unsigned *height)
|
||||
{
|
||||
thread_video_t *thr = (thread_video_t*)data;
|
||||
thread_packet_t pkt = { CMD_POKE_GET_VIDEO_OUTPUT_SIZE };
|
||||
|
||||
if (!thr)
|
||||
return;
|
||||
|
||||
video_thread_send_and_wait_user_to_thread(thr, &pkt);
|
||||
|
||||
*width = pkt.data.output.width;
|
||||
*height = pkt.data.output.height;
|
||||
if (thr->poke && thr->poke->get_video_output_size)
|
||||
thr->poke->get_video_output_size(thr->driver_data,
|
||||
width,
|
||||
height);
|
||||
}
|
||||
|
||||
static void thread_get_video_output_prev(void *data)
|
||||
{
|
||||
thread_video_t *thr = (thread_video_t*)data;
|
||||
thread_packet_t pkt = { CMD_POKE_GET_VIDEO_OUTPUT_PREV };
|
||||
|
||||
if (!thr)
|
||||
return;
|
||||
|
||||
video_thread_send_and_wait_user_to_thread(thr, &pkt);
|
||||
if (thr->poke && thr->poke->get_video_output_prev)
|
||||
thr->poke->get_video_output_prev(thr->driver_data);
|
||||
}
|
||||
|
||||
static void thread_get_video_output_next(void *data)
|
||||
{
|
||||
thread_video_t *thr = (thread_video_t*)data;
|
||||
thread_packet_t pkt = { CMD_POKE_GET_VIDEO_OUTPUT_NEXT };
|
||||
|
||||
if (!thr)
|
||||
return;
|
||||
|
||||
video_thread_send_and_wait_user_to_thread(thr, &pkt);
|
||||
if (thr->poke && thr->poke->get_video_output_next)
|
||||
thr->poke->get_video_output_next(thr->driver_data);
|
||||
}
|
||||
|
||||
static void thread_set_aspect_ratio(void *data, unsigned aspectratio_idx)
|
||||
|
@ -1057,8 +1057,17 @@ static void handle_hotplug(android_input_t *android,
|
||||
* This device is composed of two hid devices
|
||||
* We make it look like one device
|
||||
*/
|
||||
else if((strstr(device_model, "R800") || strstr(device_model, "Xperia Play")) &&
|
||||
else if(
|
||||
(
|
||||
strstr(device_model, "R800x") ||
|
||||
strstr(device_model, "R800at") ||
|
||||
strstr(device_model, "R800i") ||
|
||||
strstr(device_model, "R800a") ||
|
||||
strstr(device_model, "R800") ||
|
||||
strstr(device_model, "Xperia Play") ||
|
||||
strstr(device_model, "Play") ||
|
||||
strstr(device_model, "SO-01D")
|
||||
) && (
|
||||
strstr(device_name, "keypad-game-zeus") ||
|
||||
strstr(device_name, "keypad-zeus") ||
|
||||
strstr(device_name, "Android Gamepad")
|
||||
|
@ -170,6 +170,7 @@ static void switch_joypad_poll(void)
|
||||
{
|
||||
hidSetNpadJoyAssignmentModeSingleByDefault(i);
|
||||
hidSetNpadJoyAssignmentModeSingleByDefault(i + 1);
|
||||
hidSetNpadJoyHoldType(HidJoyHoldType_Horizontal);
|
||||
}
|
||||
}
|
||||
lastMode = 1;
|
||||
@ -185,6 +186,7 @@ static void switch_joypad_poll(void)
|
||||
{
|
||||
hidSetNpadJoyAssignmentModeDual(i);
|
||||
hidSetNpadJoyAssignmentModeDual(i + 1);
|
||||
hidMergeSingleJoyAsDualJoy(i, i + 1);
|
||||
}
|
||||
}
|
||||
lastMode = 0;
|
||||
|
@ -97,6 +97,7 @@ enum
|
||||
RARCH_SCREENSHOT,
|
||||
RARCH_MUTE,
|
||||
RARCH_OSK,
|
||||
RARCH_FPS_TOGGLE,
|
||||
RARCH_NETPLAY_GAME_WATCH,
|
||||
RARCH_ENABLE_HOTKEY,
|
||||
RARCH_VOLUME_UP,
|
||||
|
@ -343,6 +343,7 @@ const struct input_bind_map input_config_bind_map[RARCH_BIND_LIST_END_NULL] = {
|
||||
DECLARE_META_BIND(2, screenshot, RARCH_SCREENSHOT, MENU_ENUM_LABEL_VALUE_INPUT_META_SCREENSHOT),
|
||||
DECLARE_META_BIND(2, audio_mute, RARCH_MUTE, MENU_ENUM_LABEL_VALUE_INPUT_META_MUTE),
|
||||
DECLARE_META_BIND(2, osk_toggle, RARCH_OSK, MENU_ENUM_LABEL_VALUE_INPUT_META_OSK),
|
||||
DECLARE_META_BIND(2, fps_toggle, RARCH_FPS_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_FPS_TOGGLE),
|
||||
DECLARE_META_BIND(2, netplay_game_watch, RARCH_NETPLAY_GAME_WATCH, MENU_ENUM_LABEL_VALUE_INPUT_META_NETPLAY_GAME_WATCH),
|
||||
DECLARE_META_BIND(2, enable_hotkey, RARCH_ENABLE_HOTKEY, MENU_ENUM_LABEL_VALUE_INPUT_META_ENABLE_HOTKEY),
|
||||
DECLARE_META_BIND(2, volume_up, RARCH_VOLUME_UP, MENU_ENUM_LABEL_VALUE_INPUT_META_VOLUME_UP),
|
||||
|
@ -2669,9 +2669,9 @@ MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_WINDOW_WIDTH,
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_WINDOW_HEIGHT,
|
||||
"Set the custom height size for the display window. Leaving it at 0 will attempt to scale the window as large as possible.")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_FULLSCREEN_X,
|
||||
"Set the custom width size for the non-windowed fullscreen mode. Leaving it at 0 will use the desktop resolution.")
|
||||
"Set the custom width size for the non-windowed fullscreen mode. Leaving it unset will use the desktop resolution.")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_FULLSCREEN_Y,
|
||||
"Set the custom height size for the non-windowed fullscreen mode. Leaving it at 0 will use the desktop resolution")
|
||||
"Set the custom height size for the non-windowed fullscreen mode. Leaving it unset will use the desktop resolution.")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_MESSAGE_POS_X,
|
||||
"Specify custom X axis position for onscreen text.")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_MESSAGE_POS_Y,
|
||||
@ -3369,6 +3369,10 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_FAVORITES,
|
||||
"Show Add to Favorites")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES,
|
||||
"Show/hide the 'Add to Favorites' option.")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION,
|
||||
"Show Reset Core Association")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION,
|
||||
"Show/hide the 'Reset Core Association' option.")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_OPTIONS,
|
||||
"Show Options")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_OPTIONS,
|
||||
@ -3432,7 +3436,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_MESSAGE_COLOR_GREEN,
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_MESSAGE_COLOR_BLUE,
|
||||
"Notification Blue Color")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_FRAMECOUNT_SHOW,
|
||||
"Show frame count on FPS display")
|
||||
"Display Frame Count")
|
||||
MSG_HASH(MSG_CONFIG_OVERRIDE_LOADED,
|
||||
"Configuration override loaded.")
|
||||
MSG_HASH(MSG_GAME_REMAP_FILE_LOADED,
|
||||
@ -3722,3 +3726,5 @@ MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_NO_FAVORITES_AVAILABLE,
|
||||
"No favorites available."
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_WINDOW_SAVE_POSITION,
|
||||
"Remember Window Position and Size")
|
||||
|
@ -15,6 +15,8 @@ MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_SWITCH_BACKLIGHT_CONTROL,
|
||||
"调整 Switch 的屏幕亮度"
|
||||
)
|
||||
#endif
|
||||
#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_SWITCH_CPU_PROFILE,
|
||||
"CPU 超频"
|
||||
@ -210,7 +212,7 @@ MSG_HASH(
|
||||
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_ACHIEVEMENT_LIST_HARDCORE,
|
||||
"成就列表(硬核)" /*FIXME:"Achievement List (Hardcore)"*/
|
||||
"成就列表(硬核模式)"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_ADD_CONTENT_LIST,
|
||||
@ -650,9 +652,11 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_ENTRY_HOVER_COLOR,
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_ENTRY_NORMAL_COLOR,
|
||||
"菜单项正常颜色")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_FALSE,
|
||||
"假")
|
||||
"否")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_FASTFORWARD_RATIO,
|
||||
"最大运行速度")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_FAVORITES_TAB,
|
||||
"收藏夹")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_FPS_SHOW,
|
||||
"显示帧率")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_FRAME_THROTTLE_ENABLE,
|
||||
@ -1707,7 +1711,7 @@ MSG_HASH(
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_TITLE_COLOR,
|
||||
"菜单标题颜色")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_TRUE,
|
||||
"真")
|
||||
"是")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_UI_COMPANION_ENABLE,
|
||||
"UI Companion Enable")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_UI_COMPANION_START_ON_BOOT,
|
||||
@ -3642,6 +3646,10 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_FAVORITES,
|
||||
"显示「添加到收藏夹」")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES,
|
||||
"显示或隐藏「添加到收藏夹」选项。")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION,
|
||||
"Show Reset Core Association")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION,
|
||||
"Show/hide the 'Reset Core Association' option.")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_OPTIONS,
|
||||
"显示「核心选项」")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_OPTIONS,
|
||||
@ -4613,7 +4621,7 @@ MSG_HASH(
|
||||
"Output Display ID")
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_QUICK_MENU_START_RECORDING,
|
||||
"Start Recording"
|
||||
"开始录制"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_QUICK_MENU_START_RECORDING,
|
||||
@ -4621,7 +4629,7 @@ MSG_HASH(
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_QUICK_MENU_STOP_RECORDING,
|
||||
"Stop Recording"
|
||||
"停止录制"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_QUICK_MENU_STOP_RECORDING,
|
||||
@ -4676,11 +4684,11 @@ MSG_HASH(
|
||||
"YouTube"
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_TWITCH_STREAM_KEY,
|
||||
"Twitch Stream Key")
|
||||
"Twitch 直播密钥")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_YOUTUBE_STREAM_KEY,
|
||||
"YouTube Stream Key")
|
||||
"YouTube 直播密钥")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_STREAMING_MODE,
|
||||
"Streaming Mode")
|
||||
"直播模式")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_STREAMING_TITLE,
|
||||
"直播标题")
|
||||
MSG_HASH(
|
||||
@ -4700,46 +4708,52 @@ MSG_HASH(
|
||||
"OK"
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_OZONE_MENU_COLOR_THEME,
|
||||
"菜单颜色主题")
|
||||
"菜单主题颜色")
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_OZONE_COLOR_THEME_BASIC_WHITE,
|
||||
"Basic White"
|
||||
"白色"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_OZONE_COLOR_THEME_BASIC_BLACK,
|
||||
"Basic Black"
|
||||
"黑色"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_OZONE_MENU_COLOR_THEME,
|
||||
"Select a different color theme."
|
||||
"选择不同的主题颜色。"
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_USE_PREFERRED_SYSTEM_COLOR_THEME,
|
||||
"Use preferred system color theme")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_USE_PREFERRED_SYSTEM_COLOR_THEME,
|
||||
"Use your operating system's color theme (if any) - overrides theme settings.")
|
||||
MSG_HASH(MSG_RESAMPLER_QUALITY_LOWEST,
|
||||
"Lowest")
|
||||
"最低")
|
||||
MSG_HASH(MSG_RESAMPLER_QUALITY_LOWER,
|
||||
"Lower")
|
||||
"较低")
|
||||
MSG_HASH(MSG_RESAMPLER_QUALITY_NORMAL,
|
||||
"Normal")
|
||||
"一般")
|
||||
MSG_HASH(MSG_RESAMPLER_QUALITY_HIGHER,
|
||||
"Higher")
|
||||
"较高")
|
||||
MSG_HASH(MSG_RESAMPLER_QUALITY_HIGHEST,
|
||||
"Highest")
|
||||
"最高")
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_NO_MUSIC_AVAILABLE,
|
||||
"No music available."
|
||||
"没有音乐。"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_NO_VIDEOS_AVAILABLE,
|
||||
"No videos available."
|
||||
"没有视频。"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_NO_IMAGES_AVAILABLE,
|
||||
"No images available."
|
||||
"没有图片。"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_NO_FAVORITES_AVAILABLE,
|
||||
"No favorites available."
|
||||
"没有收藏。"
|
||||
)
|
||||
MSG_HASH(
|
||||
MSG_MISSING_ASSETS,
|
||||
"Warning: Missing assets, use the Online Updater if available"
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_WINDOW_SAVE_POSITION,
|
||||
"Remember Window Position and Size")
|
||||
|
@ -2499,9 +2499,9 @@ MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_WINDOW_WIDTH,
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_WINDOW_HEIGHT,
|
||||
"Set the custom height size for the display window. Leaving it at 0 will attempt to scale the window as large as possible.")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_FULLSCREEN_X,
|
||||
"Set the custom width size for the non-windowed fullscreen mode. Leaving it at 0 will use the desktop resolution.")
|
||||
"Set the custom width size for the non-windowed fullscreen mode. Leaving it unset will use the desktop resolution.")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_FULLSCREEN_Y,
|
||||
"Set the custom height size for the non-windowed fullscreen mode. Leaving it at 0 will use the desktop resolution")
|
||||
"Set the custom height size for the non-windowed fullscreen mode. Leaving it unset will use the desktop resolution.")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_MESSAGE_POS_X,
|
||||
"Specify custom X axis position for onscreen text.")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_MESSAGE_POS_Y,
|
||||
@ -3177,6 +3177,10 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_FAVORITES,
|
||||
"顯示 Add to Favorites")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES,
|
||||
"顯示/隱藏 the 'Add to Favorites' option.")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION,
|
||||
"Show Reset Core Association")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION,
|
||||
"Show/hide the 'Reset Core Association' option.")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_OPTIONS,
|
||||
"顯示 Options")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_OPTIONS,
|
||||
@ -3500,3 +3504,5 @@ MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_NO_FAVORITES_AVAILABLE,
|
||||
"No favorites available."
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_WINDOW_SAVE_POSITION,
|
||||
"Remember Window Position and Size")
|
||||
|
@ -15,6 +15,8 @@ MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_SWITCH_BACKLIGHT_CONTROL,
|
||||
"Anpassen der Switch Bildschirmhelligkeit"
|
||||
)
|
||||
#endif
|
||||
#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_SWITCH_CPU_PROFILE,
|
||||
"CPU Übertakten"
|
||||
@ -3295,6 +3297,10 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_FAVORITES,
|
||||
"Zeige 'Zu Favoriten hinzufügen'")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES,
|
||||
"Zeige/verstecke die Option 'Zu Favoriten hinzufügen'.")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION,
|
||||
"Show Reset Core Association")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION,
|
||||
"Show/hide the 'Reset Core Association' option.")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_OPTIONS,
|
||||
"Zeige 'Optionen'")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_OPTIONS,
|
||||
@ -3636,3 +3642,5 @@ MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_NO_FAVORITES_AVAILABLE,
|
||||
"No favorites available."
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_WINDOW_SAVE_POSITION,
|
||||
"Remember Window Position and Size")
|
||||
|
@ -4862,11 +4862,11 @@ MSG_HASH(
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_VIDEO_FULLSCREEN_X,
|
||||
"Set the custom width size for the non-windowed fullscreen mode. Leaving it at 0 will use the desktop resolution."
|
||||
"Set the custom width size for the non-windowed fullscreen mode. Leaving it unset will use the desktop resolution."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_VIDEO_FULLSCREEN_Y,
|
||||
"Set the custom height size for the non-windowed fullscreen mode. Leaving it at 0 will use the desktop resolution"
|
||||
"Set the custom height size for the non-windowed fullscreen mode. Leaving it unset will use the desktop resolution."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_VIDEO_MESSAGE_POS_X,
|
||||
@ -6098,6 +6098,14 @@ MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES,
|
||||
"Show/hide the 'Add to Favorites' option."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION,
|
||||
"Show Reset Core Association"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION,
|
||||
"Show/hide the 'Reset Core Association' option."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_OPTIONS,
|
||||
"Show Options"
|
||||
@ -6224,7 +6232,7 @@ MSG_HASH(
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_FRAMECOUNT_SHOW,
|
||||
"Show frame count on FPS display"
|
||||
"Display Frame Count"
|
||||
)
|
||||
MSG_HASH(
|
||||
MSG_CONFIG_OVERRIDE_LOADED,
|
||||
@ -7730,3 +7738,5 @@ MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_NO_FAVORITES_AVAILABLE,
|
||||
"No favorites available."
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_WINDOW_SAVE_POSITION,
|
||||
"Remember Window Position and Size")
|
||||
|
@ -2372,9 +2372,9 @@ MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_WINDOW_WIDTH,
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_WINDOW_HEIGHT,
|
||||
"Set the custom height size for the display window. Leaving it at 0 will attempt to scale the window as large as possible.")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_FULLSCREEN_X,
|
||||
"Set the custom width size for the non-windowed fullscreen mode. Leaving it at 0 will use the desktop resolution.")
|
||||
"Set the custom width size for the non-windowed fullscreen mode. Leaving it unset will use the desktop resolution.")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_FULLSCREEN_Y,
|
||||
"Set the custom height size for the non-windowed fullscreen mode. Leaving it at 0 will use the desktop resolution")
|
||||
"Set the custom height size for the non-windowed fullscreen mode. Leaving it unset will use the desktop resolution.")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_MESSAGE_POS_X,
|
||||
"Specify custom X axis position for onscreen text.")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_MESSAGE_POS_Y,
|
||||
@ -3052,6 +3052,10 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_FAVORITES,
|
||||
"Show Add to Favorites")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES,
|
||||
"Show/hide the 'Add to Favorites' option.")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION,
|
||||
"Show Reset Core Association")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION,
|
||||
"Show/hide the 'Reset Core Association' option.")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_OPTIONS,
|
||||
"Show Options")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_OPTIONS,
|
||||
@ -3375,3 +3379,5 @@ MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_NO_FAVORITES_AVAILABLE,
|
||||
"No favorites available."
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_WINDOW_SAVE_POSITION,
|
||||
"Remember Window Position and Size")
|
||||
|
@ -15,6 +15,8 @@ MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_SWITCH_BACKLIGHT_CONTROL,
|
||||
"Ajusta el brillo de la pantalla"
|
||||
)
|
||||
#endif
|
||||
#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_SWITCH_CPU_PROFILE,
|
||||
"CPU Overclock"
|
||||
@ -6099,6 +6101,14 @@ MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES,
|
||||
"Mostrar/ocultar la opción de 'Agregar a favoritos'"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION,
|
||||
"Show Reset Core Association"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION,
|
||||
"Show/hide the 'Reset Core Association' option."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_OPTIONS,
|
||||
"Mostrar opciones"
|
||||
@ -7747,4 +7757,6 @@ MSG_HASH(
|
||||
MSG_HASH(
|
||||
MSG_MISSING_ASSETS,
|
||||
"ADVERTENCIA: Faltan recursos, use el Actualizador si está disponible"
|
||||
)
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_WINDOW_SAVE_POSITION,
|
||||
"Remember Window Position and Size")
|
||||
|
@ -3211,6 +3211,10 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_FAVORITES,
|
||||
"Show Add to Favorites")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES,
|
||||
"Show/hide the 'Add to Favorites' option.")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION,
|
||||
"Show Reset Core Association")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION,
|
||||
"Show/hide the 'Reset Core Association' option.")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_OPTIONS,
|
||||
"Show Options")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_OPTIONS,
|
||||
@ -3534,3 +3538,5 @@ MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_NO_FAVORITES_AVAILABLE,
|
||||
"No favorites available."
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_WINDOW_SAVE_POSITION,
|
||||
"Remember Window Position and Size")
|
||||
|
@ -3271,6 +3271,10 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_FAVORITES,
|
||||
"Visualizza Aggiungi a Preferiti")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES,
|
||||
"Mostra/nasconde l'opzione Aggiungi a Preferiti.")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION,
|
||||
"Show Reset Core Association")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION,
|
||||
"Show/hide the 'Reset Core Association' option.")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_OPTIONS,
|
||||
"Visualizza Opzioni")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_OPTIONS,
|
||||
@ -3594,3 +3598,5 @@ MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_NO_FAVORITES_AVAILABLE,
|
||||
"Nessun preferito disponibile."
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_WINDOW_SAVE_POSITION,
|
||||
"Remember Window Position and Size")
|
||||
|
@ -3397,6 +3397,10 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_FAVORITES,
|
||||
"「お気に入りに追加」を表示")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES,
|
||||
"「お気に入りに追加」オプションを表示/非表示にする。")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION,
|
||||
"Show Reset Core Association")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION,
|
||||
"Show/hide the 'Reset Core Association' option.")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_OPTIONS,
|
||||
"「オプション」を表示")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_OPTIONS,
|
||||
@ -4043,3 +4047,5 @@ MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_NO_FAVORITES_AVAILABLE,
|
||||
"No favorites available."
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_WINDOW_SAVE_POSITION,
|
||||
"Remember Window Position and Size")
|
||||
|
@ -3172,6 +3172,10 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_FAVORITES,
|
||||
"Show Add to Favorites")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES,
|
||||
"Show/hide the 'Add to Favorites' option.")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION,
|
||||
"Show Reset Core Association")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION,
|
||||
"Show/hide the 'Reset Core Association' option.")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_OPTIONS,
|
||||
"Show Options")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_OPTIONS,
|
||||
@ -3495,3 +3499,5 @@ MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_NO_FAVORITES_AVAILABLE,
|
||||
"No favorites available."
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_WINDOW_SAVE_POSITION,
|
||||
"Remember Window Position and Size")
|
||||
|
@ -3,6 +3,8 @@ MSG_HASH(MENU_ENUM_LABEL_SWITCH_GPU_PROFILE,
|
||||
"switch_gpu_profile")
|
||||
MSG_HASH(MENU_ENUM_LABEL_SWITCH_BACKLIGHT_CONTROL,
|
||||
"switch_backlight_control")
|
||||
#endif
|
||||
#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
|
||||
MSG_HASH(MENU_ENUM_LABEL_SWITCH_CPU_PROFILE,
|
||||
"switch_cpu_profile")
|
||||
#endif
|
||||
@ -259,6 +261,8 @@ MSG_HASH(MENU_ENUM_LABEL_DEFERRED_DROPDOWN_BOX_LIST,
|
||||
"deferred_dropdown_box_list")
|
||||
MSG_HASH(MENU_ENUM_LABEL_DEFERRED_DROPDOWN_BOX_LIST_SPECIAL,
|
||||
"deferred_dropdown_box_list_special")
|
||||
MSG_HASH(MENU_ENUM_LABEL_DEFERRED_DROPDOWN_BOX_LIST_RESOLUTION,
|
||||
"deferred_dropdown_box_list_resolution")
|
||||
MSG_HASH(MENU_ENUM_LABEL_DEFERRED_CONFIGURATIONS_LIST,
|
||||
"deferred_configurations_list")
|
||||
MSG_HASH(MENU_ENUM_LABEL_DEFERRED_PLAYLIST_LIST,
|
||||
@ -1511,6 +1515,8 @@ MSG_HASH(MENU_ENUM_LABEL_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE,
|
||||
"quick_menu_show_undo_save_load_state")
|
||||
MSG_HASH(MENU_ENUM_LABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES,
|
||||
"quick_menu_show_add_to_favorites")
|
||||
MSG_HASH(MENU_ENUM_LABEL_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION,
|
||||
"quick_menu_show_reset_core_association")
|
||||
MSG_HASH(MENU_ENUM_LABEL_QUICK_MENU_SHOW_OPTIONS,
|
||||
"quick_menu_show_options")
|
||||
MSG_HASH(MENU_ENUM_LABEL_QUICK_MENU_SHOW_CONTROLS,
|
||||
@ -1549,6 +1555,8 @@ MSG_HASH(MENU_ENUM_LABEL_VIDEO_MESSAGE_COLOR_BLUE,
|
||||
"video_msg_color_blue")
|
||||
MSG_HASH(MENU_ENUM_LABEL_FRAMECOUNT_SHOW,
|
||||
"framecount_show")
|
||||
MSG_HASH(MENU_ENUM_LABEL_MEMORY_SHOW,
|
||||
"memory_show")
|
||||
MSG_HASH(MENU_ENUM_LABEL_AUTOMATICALLY_ADD_CONTENT_TO_PLAYLIST,
|
||||
"automatically_add_content_to_playlist")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VIDEO_WINDOW_OPACITY,
|
||||
@ -1565,6 +1573,8 @@ MSG_HASH(MENU_ENUM_LABEL_INPUT_DRIVER_LINUXRAW,
|
||||
"linuxraw")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VIDEO_WINDOW_SHOW_DECORATIONS,
|
||||
"video_window_show_decorations")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VIDEO_WINDOW_SAVE_POSITION,
|
||||
"video_window_save_position")
|
||||
MSG_HASH(MENU_ENUM_LABEL_MENU_RGUI_BORDER_FILLER_ENABLE,
|
||||
"menu_rgui_border_filler_enable")
|
||||
MSG_HASH(MENU_ENUM_LABEL_MENU_RGUI_BORDER_FILLER_THICKNESS_ENABLE,
|
||||
|
@ -2388,9 +2388,9 @@ MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_WINDOW_WIDTH,
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_WINDOW_HEIGHT,
|
||||
"Set the custom height size for the display window. Leaving it at 0 will attempt to scale the window as large as possible.")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_FULLSCREEN_X,
|
||||
"Set the custom width size for the non-windowed fullscreen mode. Leaving it at 0 will use the desktop resolution.")
|
||||
"Set the custom width size for the non-windowed fullscreen mode. Leaving it unset will use the desktop resolution.")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_FULLSCREEN_Y,
|
||||
"Set the custom height size for the non-windowed fullscreen mode. Leaving it at 0 will use the desktop resolution")
|
||||
"Set the custom height size for the non-windowed fullscreen mode. Leaving it unset will use the desktop resolution.")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_MESSAGE_POS_X,
|
||||
"Specify custom X axis position for onscreen text.")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_MESSAGE_POS_Y,
|
||||
@ -3066,6 +3066,10 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_FAVORITES,
|
||||
"Show Add to Favorites")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES,
|
||||
"Show/hide the 'Add to Favorites' option.")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION,
|
||||
"Show Reset Core Association")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION,
|
||||
"Show/hide the 'Reset Core Association' option.")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_OPTIONS,
|
||||
"Toon Opties")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_OPTIONS,
|
||||
@ -3381,3 +3385,5 @@ MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_NO_FAVORITES_AVAILABLE,
|
||||
"Geen favorieten beschikbaar."
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_WINDOW_SAVE_POSITION,
|
||||
"Remember Window Position and Size")
|
||||
|
@ -3438,6 +3438,10 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_FAVORITES,
|
||||
"Pokaż dodaj do ulubionych")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES,
|
||||
"Pokaż/ukryj opcję 'Dodaj do ulubionych'.")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION,
|
||||
"Show Reset Core Association")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION,
|
||||
"Show/hide the 'Reset Core Association' option.")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_OPTIONS,
|
||||
"Pokaż opcje")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_OPTIONS,
|
||||
@ -3797,3 +3801,5 @@ MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_NO_FAVORITES_AVAILABLE,
|
||||
"Brak ulubionych."
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_WINDOW_SAVE_POSITION,
|
||||
"Zapamiętaj położenie i rozmiar okna")
|
||||
|
@ -15,6 +15,8 @@ MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_SWITCH_BACKLIGHT_CONTROL,
|
||||
"Aumentar ou diminuir o brilho da tela do Switch"
|
||||
)
|
||||
#endif
|
||||
#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_SWITCH_CPU_PROFILE,
|
||||
"Overclock da CPU"
|
||||
@ -6131,6 +6133,14 @@ MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES,
|
||||
"Exibir/ocultar a opção 'Adicionar aos Favoritos'."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION,
|
||||
"Show Reset Core Association"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION,
|
||||
"Show/hide the 'Reset Core Association' option."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_OPTIONS,
|
||||
"Exibir Opções"
|
||||
@ -7779,4 +7789,6 @@ MSG_HASH(
|
||||
MSG_HASH(
|
||||
MSG_MISSING_ASSETS,
|
||||
"Aviso: Recursos ausentes, use o Atualizador Online se disponível"
|
||||
)
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_WINDOW_SAVE_POSITION,
|
||||
"Remember Window Position and Size")
|
||||
|
@ -3146,6 +3146,10 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_FAVORITES,
|
||||
"Mostrar 'Adicionar aos favoritos'")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES,
|
||||
"Mostrar/esconder a opção 'Adicionar aos favoritos'.")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION,
|
||||
"Show Reset Core Association")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION,
|
||||
"Show/hide the 'Reset Core Association' option.")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_OPTIONS,
|
||||
"Mostrar 'Opções'")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_OPTIONS,
|
||||
@ -3461,3 +3465,5 @@ MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_NO_FAVORITES_AVAILABLE,
|
||||
"No favorites available."
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_WINDOW_SAVE_POSITION,
|
||||
"Remember Window Position and Size")
|
||||
|
@ -3220,6 +3220,10 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_FAVORITES,
|
||||
"Показать Добавить в избранное")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES,
|
||||
"Показать/скрыть настройку 'Добавить в избранное'.")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION,
|
||||
"Show Reset Core Association")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION,
|
||||
"Show/hide the 'Reset Core Association' option.")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_OPTIONS,
|
||||
"Показать Настройки")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_OPTIONS,
|
||||
@ -3664,3 +3668,5 @@ MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_NO_FAVORITES_AVAILABLE,
|
||||
"No favorites available."
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_WINDOW_SAVE_POSITION,
|
||||
"Remember Window Position and Size")
|
||||
|
@ -104,6 +104,10 @@ int menu_hash_get_help_us_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
snprintf(s, len,
|
||||
"Toggles onscreen keyboard.");
|
||||
break;
|
||||
case RARCH_FPS_TOGGLE:
|
||||
snprintf(s, len,
|
||||
"Toggles frames per second counter.");
|
||||
break;
|
||||
case RARCH_NETPLAY_GAME_WATCH:
|
||||
snprintf(s, len,
|
||||
"Netplay toggle play/spectate mode.");
|
||||
@ -567,6 +571,11 @@ int menu_hash_get_help_us_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
"Enables displaying the current frames \n"
|
||||
"per second.");
|
||||
break;
|
||||
case MENU_ENUM_LABEL_MEMORY_SHOW:
|
||||
snprintf(s, len,
|
||||
"Includes displaying the current memory \n"
|
||||
"usage/total with FPS/Frames.");
|
||||
break;
|
||||
case MENU_ENUM_LABEL_VIDEO_FONT_ENABLE:
|
||||
snprintf(s, len,
|
||||
"Show and/or hide onscreen messages.");
|
||||
|
@ -15,6 +15,8 @@ MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_SWITCH_BACKLIGHT_CONTROL,
|
||||
"Increase or decrease the Switch screen brightness"
|
||||
)
|
||||
#endif
|
||||
#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_SWITCH_CPU_PROFILE,
|
||||
"CPU Overclock"
|
||||
@ -843,6 +845,10 @@ MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_FPS_SHOW,
|
||||
"Display Framerate"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_MEMORY_SHOW,
|
||||
"Include Memory Details"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_FRAME_THROTTLE_ENABLE,
|
||||
"Limit Maximum Run Speed"
|
||||
@ -1247,6 +1253,10 @@ MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_META_FRAMEADVANCE,
|
||||
"Frameadvance"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_META_FPS_TOGGLE,
|
||||
"FPS toggle"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_META_FULLSCREEN_TOGGLE_KEY,
|
||||
"Fullscreen toggle"
|
||||
@ -3206,6 +3216,10 @@ MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_SCALE,
|
||||
"Windowed Scale"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_RECORD_THREADS,
|
||||
"Recording Threads"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_SCALE_INTEGER,
|
||||
"Integer Scale"
|
||||
@ -3626,6 +3640,14 @@ MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_FPS_SHOW,
|
||||
"Displays the current framerate per second onscreen."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_FRAMECOUNT_SHOW,
|
||||
"Displays the current frame count onscreen."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_MEMORY_SHOW,
|
||||
"Includes the current memory usage/total onscreen with FPS/Frames."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_INPUT_HOTKEY_BINDS,
|
||||
"Configure hotkey settings."
|
||||
@ -4886,19 +4908,23 @@ MSG_HASH(
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_VIDEO_WINDOW_WIDTH,
|
||||
"Set the custom width size for the display window. Leaving it at 0 will attempt to scale the window as large as possible."
|
||||
"Set the custom width for the display window."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_VIDEO_WINDOW_HEIGHT,
|
||||
"Set the custom height size for the display window. Leaving it at 0 will attempt to scale the window as large as possible."
|
||||
"Set the custom height for the display window."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_VIDEO_WINDOW_SAVE_POSITION,
|
||||
"Remember window size and position, enabling this has precedence over Windowed Scale"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_VIDEO_FULLSCREEN_X,
|
||||
"Set the custom width size for the non-windowed fullscreen mode. Leaving it at 0 will use the desktop resolution."
|
||||
"Set the custom width size for the non-windowed fullscreen mode. Leaving it unset will use the desktop resolution."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_VIDEO_FULLSCREEN_Y,
|
||||
"Set the custom height size for the non-windowed fullscreen mode. Leaving it at 0 will use the desktop resolution"
|
||||
"Set the custom height size for the non-windowed fullscreen mode. Leaving it unset will use the desktop resolution."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_VIDEO_MESSAGE_POS_X,
|
||||
@ -6131,6 +6157,14 @@ MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES,
|
||||
"Show/hide the 'Add to Favorites' option."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION,
|
||||
"Show Reset Core Association"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION,
|
||||
"Show/hide the 'Reset Core Association' option."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_OPTIONS,
|
||||
"Show Options"
|
||||
@ -6257,7 +6291,7 @@ MSG_HASH(
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_FRAMECOUNT_SHOW,
|
||||
"Show frame count on FPS display"
|
||||
"Display Frame Count"
|
||||
)
|
||||
MSG_HASH(
|
||||
MSG_CONFIG_OVERRIDE_LOADED,
|
||||
@ -7788,3 +7822,7 @@ MSG_HASH(
|
||||
MSG_MISSING_ASSETS,
|
||||
"Warning: Missing assets, use the Online Updater if available"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_WINDOW_SAVE_POSITION,
|
||||
"Remember Window Position and Size"
|
||||
)
|
||||
|
@ -2537,9 +2537,9 @@ MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_WINDOW_WIDTH,
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_WINDOW_HEIGHT,
|
||||
"Set the custom height size for the display window. Leaving it at 0 will attempt to scale the window as large as possible.")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_FULLSCREEN_X,
|
||||
"Set the custom width size for the non-windowed fullscreen mode. Leaving it at 0 will use the desktop resolution.")
|
||||
"Set the custom width size for the non-windowed fullscreen mode. Leaving it unset will use the desktop resolution.")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_FULLSCREEN_Y,
|
||||
"Set the custom height size for the non-windowed fullscreen mode. Leaving it at 0 will use the desktop resolution")
|
||||
"Set the custom height size for the non-windowed fullscreen mode. Leaving it unset will use the desktop resolution.")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_MESSAGE_POS_X,
|
||||
"Specify custom X axis position for onscreen text.")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_MESSAGE_POS_Y,
|
||||
@ -3209,6 +3209,10 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_FAVORITES,
|
||||
"Show Add to Favorites")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES,
|
||||
"Show/hide the 'Add to Favorites' option.")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION,
|
||||
"Show Reset Core Association")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION,
|
||||
"Show/hide the 'Reset Core Association' option.")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_OPTIONS,
|
||||
"Show Options")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_OPTIONS,
|
||||
@ -3534,3 +3538,5 @@ MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_NO_FAVORITES_AVAILABLE,
|
||||
"No favorites available."
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_WINDOW_SAVE_POSITION,
|
||||
"Remember Window Position and Size")
|
||||
|
63
lakka.h
63
lakka.h
@ -24,67 +24,6 @@
|
||||
#define LAKKA_UPDATE_DIR "/storage/.update/"
|
||||
#define LAKKA_CONNMAN_DIR "/storage/.cache/connman/"
|
||||
|
||||
#ifdef HAVE_LAKKA_SWITCH
|
||||
static char* SWITCH_GPU_PROFILES[] = {
|
||||
"docked-overclock-3",
|
||||
"docked-overclock-2",
|
||||
"docked-overclock-1",
|
||||
"docked",
|
||||
"non-docked-overclock-5",
|
||||
"non-docked-overclock-4",
|
||||
"non-docked-overclock-3",
|
||||
"non-docked-overclock-2",
|
||||
"non-docked-overclock-1",
|
||||
"non-docked",
|
||||
"non-docked-underclock-1",
|
||||
"non-docked-underclock-2",
|
||||
"non-docked-underclock-3",
|
||||
};
|
||||
|
||||
static char* SWITCH_GPU_SPEEDS[] = {
|
||||
"998 Mhz",
|
||||
"921 Mhz",
|
||||
"844 Mhz",
|
||||
"768 Mhz",
|
||||
"691 Mhz",
|
||||
"614 Mhz",
|
||||
"537 Mhz",
|
||||
"460 Mhz",
|
||||
"384 Mhz",
|
||||
"307 Mhz",
|
||||
"230 Mhz",
|
||||
"153 Mhz",
|
||||
"76 Mhz"
|
||||
};
|
||||
|
||||
static int SWITCH_BRIGHTNESS[] = {
|
||||
10,
|
||||
20,
|
||||
30,
|
||||
40,
|
||||
50,
|
||||
60,
|
||||
70,
|
||||
80,
|
||||
90,
|
||||
100
|
||||
};
|
||||
|
||||
static char* SWITCH_CPU_PROFILES[] = {
|
||||
"overclock-4",
|
||||
"overclock-3",
|
||||
"overclock-2",
|
||||
"overclock-1",
|
||||
"default",
|
||||
};
|
||||
|
||||
static char* SWITCH_CPU_SPEEDS[] = {
|
||||
"1912 MHz",
|
||||
"1734 MHz",
|
||||
"1530 MHz",
|
||||
"1224 MHz",
|
||||
"1020 MHz"
|
||||
};
|
||||
#endif
|
||||
#include "switch_performance_profiles.h"
|
||||
|
||||
#endif
|
||||
|
@ -187,10 +187,13 @@ generic_deferred_push(deferred_push_core_content_dirs_subdir_list, DISPLAYLIST_
|
||||
generic_deferred_push(deferred_push_lakka_list, DISPLAYLIST_LAKKA)
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
|
||||
generic_deferred_push(deferred_push_switch_cpu_profile, DISPLAYLIST_SWITCH_CPU_PROFILE)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LAKKA_SWITCH
|
||||
generic_deferred_push(deferred_push_switch_gpu_profile, DISPLAYLIST_SWITCH_GPU_PROFILE)
|
||||
generic_deferred_push(deferred_push_switch_backlight_control, DISPLAYLIST_SWITCH_BACKLIGHT_CONTROL)
|
||||
generic_deferred_push(deferred_push_switch_cpu_profile, DISPLAYLIST_SWITCH_CPU_PROFILE)
|
||||
#endif
|
||||
|
||||
static int deferred_push_cursor_manager_list_deferred(
|
||||
@ -613,6 +616,7 @@ generic_deferred_push_clear_general(deferred_image_history_list, PUSH_DEFAULT, D
|
||||
generic_deferred_push_clear_general(deferred_video_history_list, PUSH_DEFAULT, DISPLAYLIST_VIDEO_HISTORY)
|
||||
generic_deferred_push_clear_general(deferred_push_dropdown_box_list, PUSH_DEFAULT, DISPLAYLIST_DROPDOWN_LIST)
|
||||
generic_deferred_push_clear_general(deferred_push_dropdown_box_list_special, PUSH_DEFAULT, DISPLAYLIST_DROPDOWN_LIST_SPECIAL)
|
||||
generic_deferred_push_clear_general(deferred_push_dropdown_box_list_resolution, PUSH_DEFAULT, DISPLAYLIST_DROPDOWN_LIST_RESOLUTION)
|
||||
|
||||
static int menu_cbs_init_bind_deferred_push_compare_label(
|
||||
menu_file_list_cbs_t *cbs,
|
||||
@ -633,6 +637,11 @@ static int menu_cbs_init_bind_deferred_push_compare_label(
|
||||
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_dropdown_box_list_special);
|
||||
return 0;
|
||||
}
|
||||
else if (string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_DROPDOWN_BOX_LIST_RESOLUTION)))
|
||||
{
|
||||
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_dropdown_box_list_resolution);
|
||||
return 0;
|
||||
}
|
||||
else if (string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_BROWSE_URL_LIST)))
|
||||
{
|
||||
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_browse_url_list);
|
||||
@ -900,6 +909,8 @@ static int menu_cbs_init_bind_deferred_push_compare_label(
|
||||
{
|
||||
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_switch_backlight_control);
|
||||
}
|
||||
#endif
|
||||
#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
|
||||
else if (strstr(label,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_SWITCH_CPU_PROFILE)))
|
||||
{
|
||||
|
@ -60,6 +60,7 @@
|
||||
#include "../../verbosity.h"
|
||||
#include "../../lakka.h"
|
||||
#include "../../wifi/wifi_driver.h"
|
||||
#include "../../gfx/video_display_server.h"
|
||||
|
||||
#include <net/net_http.h>
|
||||
|
||||
@ -150,6 +151,8 @@ static enum msg_hash_enums action_ok_dl_to_enum(unsigned lbl)
|
||||
return MENU_ENUM_LABEL_DEFERRED_DROPDOWN_BOX_LIST;
|
||||
case ACTION_OK_DL_DROPDOWN_BOX_LIST_SPECIAL:
|
||||
return MENU_ENUM_LABEL_DEFERRED_DROPDOWN_BOX_LIST_SPECIAL;
|
||||
case ACTION_OK_DL_DROPDOWN_BOX_LIST_RESOLUTION:
|
||||
return MENU_ENUM_LABEL_DEFERRED_DROPDOWN_BOX_LIST_RESOLUTION;
|
||||
case ACTION_OK_DL_MIXER_STREAM_SETTINGS_LIST:
|
||||
return MENU_ENUM_LABEL_DEFERRED_MIXER_STREAM_SETTINGS_LIST;
|
||||
case ACTION_OK_DL_ACCOUNTS_LIST:
|
||||
@ -323,6 +326,15 @@ int generic_action_ok_displaylist_push(const char *path,
|
||||
info.enum_idx = MENU_ENUM_LABEL_DEFERRED_DROPDOWN_BOX_LIST_SPECIAL;
|
||||
dl_type = DISPLAYLIST_GENERIC;
|
||||
break;
|
||||
case ACTION_OK_DL_DROPDOWN_BOX_LIST_RESOLUTION:
|
||||
info.type = type;
|
||||
info.directory_ptr = idx;
|
||||
info_path = path;
|
||||
info_label = msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_DEFERRED_DROPDOWN_BOX_LIST_RESOLUTION);
|
||||
info.enum_idx = MENU_ENUM_LABEL_DEFERRED_DROPDOWN_BOX_LIST_RESOLUTION;
|
||||
dl_type = DISPLAYLIST_GENERIC;
|
||||
break;
|
||||
case ACTION_OK_DL_USER_BINDS_LIST:
|
||||
info.type = type;
|
||||
info.directory_ptr = idx;
|
||||
@ -509,24 +521,36 @@ int generic_action_ok_displaylist_push(const char *path,
|
||||
}
|
||||
break;
|
||||
case ACTION_OK_DL_DISK_IMAGE_APPEND_LIST:
|
||||
filebrowser_clear_type();
|
||||
info.type = type;
|
||||
info.directory_ptr = idx;
|
||||
info_path = settings->paths.directory_menu_content;
|
||||
info_label = label;
|
||||
dl_type = DISPLAYLIST_FILE_BROWSER_SELECT_FILE;
|
||||
{
|
||||
char game_dir[PATH_MAX_LENGTH];
|
||||
filebrowser_clear_type();
|
||||
strlcpy(game_dir, path_get(RARCH_PATH_CONTENT), sizeof(game_dir));
|
||||
path_basedir(game_dir);
|
||||
|
||||
info.type = type;
|
||||
info.directory_ptr = idx;
|
||||
info_path = !string_is_empty(game_dir) ? game_dir : settings->paths.directory_menu_content;
|
||||
info_label = label;
|
||||
dl_type = DISPLAYLIST_FILE_BROWSER_SELECT_FILE;
|
||||
}
|
||||
break;
|
||||
case ACTION_OK_DL_SUBSYSTEM_ADD_LIST:
|
||||
filebrowser_clear_type();
|
||||
if (content_get_subsystem() != type - MENU_SETTINGS_SUBSYSTEM_ADD)
|
||||
content_clear_subsystem();
|
||||
content_set_subsystem(type - MENU_SETTINGS_SUBSYSTEM_ADD);
|
||||
filebrowser_set_type(FILEBROWSER_SELECT_FILE_SUBSYSTEM);
|
||||
info.type = type;
|
||||
info.directory_ptr = idx;
|
||||
info_path = settings->paths.directory_menu_content;
|
||||
info_label = label;
|
||||
dl_type = DISPLAYLIST_FILE_BROWSER_SELECT_FILE;
|
||||
{
|
||||
char game_dir[PATH_MAX_LENGTH];
|
||||
filebrowser_clear_type();
|
||||
strlcpy(game_dir, path_get(RARCH_PATH_CONTENT), sizeof(game_dir));
|
||||
path_basedir(game_dir);
|
||||
|
||||
if (content_get_subsystem() != type - MENU_SETTINGS_SUBSYSTEM_ADD)
|
||||
content_clear_subsystem();
|
||||
content_set_subsystem(type - MENU_SETTINGS_SUBSYSTEM_ADD);
|
||||
filebrowser_set_type(FILEBROWSER_SELECT_FILE_SUBSYSTEM);
|
||||
info.type = type;
|
||||
info.directory_ptr = idx;
|
||||
info_path = !string_is_empty(game_dir) ? game_dir : settings->paths.directory_menu_content;
|
||||
info_label = label;
|
||||
dl_type = DISPLAYLIST_FILE_BROWSER_SELECT_FILE;
|
||||
}
|
||||
break;
|
||||
case ACTION_OK_DL_SUBSYSTEM_LOAD:
|
||||
{
|
||||
@ -2512,25 +2536,34 @@ static int action_ok_deferred_list_stub(const char *path,
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef HAVE_LAKKA_SWITCH
|
||||
|
||||
#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
|
||||
static int action_ok_set_switch_cpu_profile(const char *path,
|
||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||
{
|
||||
char* profile_name = SWITCH_CPU_PROFILES[entry_idx];
|
||||
|
||||
char command[PATH_MAX_LENGTH] = {0};
|
||||
|
||||
#ifdef HAVE_LAKKA_SWITCH
|
||||
snprintf(command, sizeof(command), "cpu-profile set %s", profile_name);
|
||||
|
||||
system(command);
|
||||
|
||||
snprintf(command, sizeof(command), "Current profile set to %s", profile_name);
|
||||
|
||||
#else
|
||||
config_get_ptr()->uints.libnx_overclock = entry_idx;
|
||||
|
||||
unsigned profile_clock = SWITCH_CPU_SPEEDS_VALUES[entry_idx];
|
||||
pcvSetClockRate(PcvModule_Cpu, (u32)profile_clock);
|
||||
snprintf(command, sizeof(command), "Current Clock set to %i", profile_clock);
|
||||
#endif
|
||||
|
||||
runloop_msg_queue_push(command, 1, 90, true);
|
||||
|
||||
return menu_cbs_exit();
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LAKKA_SWITCH
|
||||
|
||||
static int action_ok_set_switch_gpu_profile(const char *path,
|
||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||
@ -4449,6 +4482,45 @@ static int action_ok_push_dropdown_item(const char *path,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int action_ok_push_dropdown_item_resolution(const char *path,
|
||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||
{
|
||||
char str[100];
|
||||
char *pch = NULL;
|
||||
unsigned width = 0;
|
||||
unsigned height = 0;
|
||||
unsigned refreshrate = 0;
|
||||
|
||||
snprintf(str, sizeof(str), "%s", path);
|
||||
|
||||
pch = strtok(str, "x");
|
||||
if (pch)
|
||||
width = strtoul(pch, NULL, 0);
|
||||
pch = strtok(NULL, " ");
|
||||
if (pch)
|
||||
height = strtoul(pch, NULL, 0);
|
||||
pch = strtok(NULL, "(");
|
||||
if (pch)
|
||||
refreshrate = strtoul(pch, NULL, 0);
|
||||
|
||||
if (video_display_server_set_resolution(width, height,
|
||||
refreshrate, (float)refreshrate, 0))
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
video_monitor_set_refresh_rate((float)refreshrate);
|
||||
|
||||
settings->uints.video_fullscreen_x = width;
|
||||
settings->uints.video_fullscreen_y = height;
|
||||
|
||||
/* TODO/FIXME - menu drivers like XMB don't rescale
|
||||
* automatically */
|
||||
return menu_cbs_exit();
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int action_ok_push_default(const char *path,
|
||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||
{
|
||||
@ -4587,6 +4659,7 @@ default_action_ok_help(action_ok_help_load_content, MENU_ENUM_LABEL_HELP_LOADING
|
||||
static int action_ok_video_resolution(const char *path,
|
||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||
{
|
||||
#if defined(__CELLOS_LV2__) || defined(GEKKO)
|
||||
unsigned width = 0;
|
||||
unsigned height = 0;
|
||||
|
||||
@ -4610,6 +4683,12 @@ static int action_ok_video_resolution(const char *path,
|
||||
width, height);
|
||||
runloop_msg_queue_push(msg, 1, 100, true);
|
||||
}
|
||||
#else
|
||||
generic_action_ok_displaylist_push(
|
||||
NULL,
|
||||
NULL, NULL, 0, 0, 0,
|
||||
ACTION_OK_DL_DROPDOWN_BOX_LIST_RESOLUTION);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -5129,6 +5208,8 @@ static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs,
|
||||
#ifdef HAVE_LAKKA_SWITCH
|
||||
case MENU_ENUM_LABEL_SWITCH_GPU_PROFILE:
|
||||
case MENU_ENUM_LABEL_SWITCH_BACKLIGHT_CONTROL:
|
||||
#endif
|
||||
#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
|
||||
case MENU_ENUM_LABEL_SWITCH_CPU_PROFILE:
|
||||
#endif
|
||||
BIND_ACTION_OK(cbs, action_ok_push_default);
|
||||
@ -5555,6 +5636,9 @@ static int menu_cbs_init_bind_ok_compare_type(menu_file_list_cbs_t *cbs,
|
||||
case MENU_SETTING_DROPDOWN_ITEM:
|
||||
BIND_ACTION_OK(cbs, action_ok_push_dropdown_item);
|
||||
break;
|
||||
case MENU_SETTING_DROPDOWN_ITEM_RESOLUTION:
|
||||
BIND_ACTION_OK(cbs, action_ok_push_dropdown_item_resolution);
|
||||
break;
|
||||
case MENU_SETTING_ACTION_CORE_DISK_OPTIONS:
|
||||
BIND_ACTION_OK(cbs, action_ok_push_default);
|
||||
break;
|
||||
@ -5579,6 +5663,8 @@ static int menu_cbs_init_bind_ok_compare_type(menu_file_list_cbs_t *cbs,
|
||||
case MENU_SET_SWITCH_BRIGHTNESS:
|
||||
BIND_ACTION_OK(cbs, action_ok_set_switch_backlight);
|
||||
break;
|
||||
#endif
|
||||
#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
|
||||
case MENU_SET_SWITCH_CPU_PROFILE:
|
||||
BIND_ACTION_OK(cbs, action_ok_set_switch_cpu_profile);
|
||||
break;
|
||||
|
@ -40,6 +40,7 @@
|
||||
|
||||
#include "../../retroarch.h"
|
||||
#include "../../content.h"
|
||||
#include "../../dynamic.h"
|
||||
#include "../../configuration.h"
|
||||
#include "../../managers/cheat_manager.h"
|
||||
|
||||
@ -123,6 +124,8 @@ default_sublabel_macro(action_bind_sublabel_user_language, MENU_
|
||||
default_sublabel_macro(action_bind_sublabel_max_swapchain_images, MENU_ENUM_SUBLABEL_VIDEO_MAX_SWAPCHAIN_IMAGES )
|
||||
default_sublabel_macro(action_bind_sublabel_online_updater, MENU_ENUM_SUBLABEL_ONLINE_UPDATER)
|
||||
default_sublabel_macro(action_bind_sublabel_fps_show, MENU_ENUM_SUBLABEL_FPS_SHOW)
|
||||
default_sublabel_macro(action_bind_sublabel_framecount_show, MENU_ENUM_SUBLABEL_FRAMECOUNT_SHOW)
|
||||
default_sublabel_macro(action_bind_sublabel_memory_show, MENU_ENUM_SUBLABEL_MEMORY_SHOW)
|
||||
default_sublabel_macro(action_bind_sublabel_statistics_show, MENU_ENUM_SUBLABEL_STATISTICS_SHOW)
|
||||
default_sublabel_macro(action_bind_sublabel_netplay_settings, MENU_ENUM_SUBLABEL_NETPLAY)
|
||||
default_sublabel_macro(action_bind_sublabel_user_bind_settings, MENU_ENUM_SUBLABEL_INPUT_USER_BINDS)
|
||||
@ -194,6 +197,7 @@ default_sublabel_macro(action_bind_sublabel_video_window_width, MENU_
|
||||
default_sublabel_macro(action_bind_sublabel_video_window_height, MENU_ENUM_SUBLABEL_VIDEO_WINDOW_HEIGHT)
|
||||
default_sublabel_macro(action_bind_sublabel_video_fullscreen_x, MENU_ENUM_SUBLABEL_VIDEO_FULLSCREEN_X)
|
||||
default_sublabel_macro(action_bind_sublabel_video_fullscreen_y, MENU_ENUM_SUBLABEL_VIDEO_FULLSCREEN_Y)
|
||||
default_sublabel_macro(action_bind_sublabel_video_save_window_position, MENU_ENUM_SUBLABEL_VIDEO_WINDOW_SAVE_POSITION)
|
||||
default_sublabel_macro(action_bind_sublabel_video_message_pos_x, MENU_ENUM_SUBLABEL_VIDEO_MESSAGE_POS_X)
|
||||
default_sublabel_macro(action_bind_sublabel_video_message_pos_y, MENU_ENUM_SUBLABEL_VIDEO_MESSAGE_POS_Y)
|
||||
default_sublabel_macro(action_bind_sublabel_video_font_size, MENU_ENUM_SUBLABEL_VIDEO_FONT_SIZE)
|
||||
@ -384,6 +388,7 @@ default_sublabel_macro(action_bind_sublabel_quick_menu_show_take_screenshot,
|
||||
default_sublabel_macro(action_bind_sublabel_quick_menu_show_save_load_state, MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_LOAD_STATE)
|
||||
default_sublabel_macro(action_bind_sublabel_quick_menu_show_undo_save_load_state, MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE)
|
||||
default_sublabel_macro(action_bind_sublabel_quick_menu_show_add_to_favorites, MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES)
|
||||
default_sublabel_macro(action_bind_sublabel_quick_menu_show_reset_core_association, MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION)
|
||||
default_sublabel_macro(action_bind_sublabel_quick_menu_show_options, MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_OPTIONS)
|
||||
default_sublabel_macro(action_bind_sublabel_quick_menu_show_controls, MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CONTROLS)
|
||||
default_sublabel_macro(action_bind_sublabel_quick_menu_show_cheats, MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CHEATS)
|
||||
@ -481,9 +486,12 @@ default_sublabel_macro(action_bind_sublabel_show_wimp,
|
||||
#endif
|
||||
default_sublabel_macro(action_bind_sublabel_discord_allow, MENU_ENUM_SUBLABEL_DISCORD_ALLOW)
|
||||
|
||||
#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
|
||||
default_sublabel_macro(action_bind_sublabel_switch_cpu_profile, MENU_ENUM_SUBLABEL_SWITCH_CPU_PROFILE)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LAKKA_SWITCH
|
||||
default_sublabel_macro(action_bind_sublabel_switch_gpu_profile, MENU_ENUM_SUBLABEL_SWITCH_GPU_PROFILE)
|
||||
default_sublabel_macro(action_bind_sublabel_switch_cpu_profile, MENU_ENUM_SUBLABEL_SWITCH_CPU_PROFILE)
|
||||
default_sublabel_macro(action_bind_sublabel_switch_backlight_control, MENU_ENUM_SUBLABEL_SWITCH_BACKLIGHT_CONTROL)
|
||||
#endif
|
||||
|
||||
@ -513,14 +521,23 @@ static int action_bind_sublabel_subsystem_add(
|
||||
char *s, size_t len)
|
||||
{
|
||||
rarch_system_info_t *system = runloop_get_system_info();
|
||||
const struct retro_subsystem_info *subsystem = (system && system->subsystem.data) ?
|
||||
system->subsystem.data + (type - MENU_SETTINGS_SUBSYSTEM_ADD) : NULL;
|
||||
const struct retro_subsystem_info *subsystem;
|
||||
|
||||
if (subsystem && content_get_subsystem_rom_id() < subsystem->num_roms)
|
||||
snprintf(s, len, " Current Content: %s",
|
||||
content_get_subsystem() == type - MENU_SETTINGS_SUBSYSTEM_ADD
|
||||
? subsystem->roms[content_get_subsystem_rom_id()].desc
|
||||
: subsystem->roms[0].desc);
|
||||
/* Core fully loaded, use the subsystem data */
|
||||
if (system->subsystem.data)
|
||||
subsystem = system->subsystem.data + (type - MENU_SETTINGS_SUBSYSTEM_ADD);
|
||||
/* Core not loaded completely, use the data we peeked on load core */
|
||||
else
|
||||
subsystem = subsystem_data + (type - MENU_SETTINGS_SUBSYSTEM_ADD);
|
||||
|
||||
if (subsystem && subsystem_current_count > 0)
|
||||
{
|
||||
if (content_get_subsystem_rom_id() < subsystem->num_roms)
|
||||
snprintf(s, len, " Current Content: %s",
|
||||
content_get_subsystem() == type - MENU_SETTINGS_SUBSYSTEM_ADD
|
||||
? subsystem->roms[content_get_subsystem_rom_id()].desc
|
||||
: subsystem->roms[0].desc);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -539,8 +556,8 @@ static int action_bind_sublabel_remap_kbd_sublabel(
|
||||
input_config_get_device_display_name(user_idx) ?
|
||||
input_config_get_device_display_name(user_idx) :
|
||||
(input_config_get_device_name(user_idx) ?
|
||||
input_config_get_device_name(user_idx) :
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE)));
|
||||
input_config_get_device_name(user_idx) :
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE)));
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -981,6 +998,9 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
|
||||
case MENU_ENUM_LABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_quick_menu_show_add_to_favorites);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_quick_menu_show_reset_core_association);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_QUICK_MENU_SHOW_OPTIONS:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_quick_menu_show_options);
|
||||
break;
|
||||
@ -1624,6 +1644,9 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
|
||||
case MENU_ENUM_LABEL_VIDEO_FULLSCREEN_Y:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_video_fullscreen_y);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_VIDEO_WINDOW_SAVE_POSITION:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_video_save_window_position);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_QUIT_RETROARCH:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_quit_retroarch);
|
||||
break;
|
||||
@ -1868,6 +1891,12 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
|
||||
case MENU_ENUM_LABEL_FPS_SHOW:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_fps_show);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_FRAMECOUNT_SHOW:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_framecount_show);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_MEMORY_SHOW:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_memory_show);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_MENU_VIEWS_SETTINGS:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_menu_views_settings_list);
|
||||
break;
|
||||
@ -2023,10 +2052,12 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_show_wimp);
|
||||
break;
|
||||
#endif
|
||||
#ifdef HAVE_LAKKA_SWITCH
|
||||
#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
|
||||
case MENU_ENUM_LABEL_SWITCH_CPU_PROFILE:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_switch_cpu_profile);
|
||||
break;
|
||||
#endif
|
||||
#ifdef HAVE_LAKKA_SWITCH
|
||||
case MENU_ENUM_LABEL_SWITCH_GPU_PROFILE:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_switch_gpu_profile);
|
||||
break;
|
||||
|
@ -210,9 +210,12 @@ default_title_copy_macro(action_get_title_cheevos_list, MENU_ENUM_LABE
|
||||
default_title_copy_macro(action_get_title_video_shader_parameters,MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PARAMETERS)
|
||||
default_title_copy_macro(action_get_title_video_shader_preset_parameters,MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_PARAMETERS)
|
||||
|
||||
#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
|
||||
default_title_macro(action_get_title_switch_cpu_profile, MENU_ENUM_LABEL_VALUE_SWITCH_CPU_PROFILE)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LAKKA_SWITCH
|
||||
default_title_macro(action_get_title_switch_gpu_profile, MENU_ENUM_LABEL_VALUE_SWITCH_GPU_PROFILE)
|
||||
default_title_macro(action_get_title_switch_cpu_profile, MENU_ENUM_LABEL_VALUE_SWITCH_CPU_PROFILE)
|
||||
default_title_macro(action_get_title_switch_backlight_control, MENU_ENUM_LABEL_VALUE_SWITCH_BACKLIGHT_CONTROL)
|
||||
#endif
|
||||
|
||||
@ -879,13 +882,15 @@ static int menu_cbs_init_bind_title_compare_label(menu_file_list_cbs_t *cbs,
|
||||
case MENU_ENUM_LABEL_LIBRETRO_INFO_PATH:
|
||||
BIND_ACTION_GET_TITLE(cbs, action_get_title_core_info_directory);
|
||||
break;
|
||||
#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
|
||||
case MENU_ENUM_LABEL_SWITCH_CPU_PROFILE:
|
||||
BIND_ACTION_GET_TITLE(cbs, action_get_title_switch_cpu_profile);
|
||||
break;
|
||||
#endif
|
||||
#ifdef HAVE_LAKKA_SWITCH
|
||||
case MENU_ENUM_LABEL_SWITCH_GPU_PROFILE:
|
||||
BIND_ACTION_GET_TITLE(cbs, action_get_title_switch_gpu_profile);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_SWITCH_CPU_PROFILE:
|
||||
BIND_ACTION_GET_TITLE(cbs, action_get_title_switch_cpu_profile);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_SWITCH_BACKLIGHT_CONTROL:
|
||||
BIND_ACTION_GET_TITLE(cbs, action_get_title_switch_backlight_control);
|
||||
break;
|
||||
@ -1176,13 +1181,15 @@ static int menu_cbs_init_bind_title_compare_label(menu_file_list_cbs_t *cbs,
|
||||
case MENU_LABEL_LIBRETRO_INFO_PATH:
|
||||
BIND_ACTION_GET_TITLE(cbs, action_get_title_core_info_directory);
|
||||
break;
|
||||
#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
|
||||
case MENU_ENUM_LABEL_SWITCH_CPU_PROFILE:
|
||||
BIND_ACTION_GET_TITLE(cbs, action_get_title_switch_cpu_profile);
|
||||
break;
|
||||
#endif
|
||||
#ifdef HAVE_LAKKA_SWITCH
|
||||
case MENU_ENUM_LABEL_SWITCH_GPU_PROFILE:
|
||||
BIND_ACTION_GET_TITLE(cbs, action_get_title_switch_gpu_profile);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_SWITCH_CPU_PROFILE:
|
||||
BIND_ACTION_GET_TITLE(cbs, action_get_title_switch_cpu_profile);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_SWITCH_BACKLIGHT_CONTROL:
|
||||
BIND_ACTION_GET_TITLE(cbs, action_get_title_switch_backlight_control);
|
||||
break;
|
||||
@ -1251,6 +1258,12 @@ int menu_cbs_init_bind_title(menu_file_list_cbs_t *cbs,
|
||||
BIND_ACTION_GET_TITLE(cbs, action_get_title_dropdown_item);
|
||||
return 0;
|
||||
}
|
||||
if (string_is_equal(label,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_DROPDOWN_BOX_LIST_RESOLUTION)))
|
||||
{
|
||||
BIND_ACTION_GET_TITLE(cbs, action_get_title_dropdown_item);
|
||||
return 0;
|
||||
}
|
||||
if (string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_RPL_ENTRY_ACTIONS)))
|
||||
{
|
||||
BIND_ACTION_GET_TITLE(cbs, action_get_quick_menu_views_settings_list);
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2011-2017 - Daniel De Matteis
|
||||
* Copyright (C) 2014-2017 - Jean-Andr<EFBFBD> Santoni
|
||||
* Copyright (C) 2016-2017 - Andr<EFBFBD>s Su<EFBFBD>rez
|
||||
* Copyright (C) 2014-2017 - Jean-André Santoni
|
||||
* Copyright (C) 2016-2017 - Andrés Suárez
|
||||
*
|
||||
* 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-
|
||||
|
@ -45,6 +45,7 @@
|
||||
#include "../../../core.h"
|
||||
#include "../../../verbosity.h"
|
||||
#include "../../../tasks/tasks_internal.h"
|
||||
#include "../../../dynamic.h"
|
||||
|
||||
ozone_node_t *ozone_alloc_node()
|
||||
{
|
||||
@ -108,7 +109,7 @@ void ozone_free_list_nodes(file_list_t *list, bool actiondata)
|
||||
}
|
||||
}
|
||||
|
||||
static void *ozone_init(void **userdata, bool video_is_threaded)
|
||||
static void *ozone_init(void **userdata, bool video_is_threaded)
|
||||
{
|
||||
bool fallback_color_theme = false;
|
||||
unsigned width, height, color_theme = 0;
|
||||
@ -183,7 +184,7 @@ static void *ozone_init(void **userdata, bool video_is_threaded)
|
||||
if (settings->bools.menu_use_preferred_system_color_theme)
|
||||
{
|
||||
#ifdef HAVE_LIBNX
|
||||
if (R_SUCCEEDED(setsysInitialize()))
|
||||
if (R_SUCCEEDED(setsysInitialize()))
|
||||
{
|
||||
ColorSetId theme;
|
||||
setsysGetColorSetId(&theme);
|
||||
@ -205,7 +206,7 @@ static void *ozone_init(void **userdata, bool video_is_threaded)
|
||||
color_theme = settings->uints.menu_ozone_color_theme;
|
||||
ozone_set_color_theme(ozone, color_theme);
|
||||
}
|
||||
|
||||
|
||||
ozone->need_compute = false;
|
||||
ozone->animations.scroll_y = 0.0f;
|
||||
ozone->animations.scroll_y_sidebar = 0.0f;
|
||||
@ -351,7 +352,10 @@ static void ozone_context_reset(void *data, bool is_threaded)
|
||||
strlcat(filename, ".png", sizeof(filename));
|
||||
|
||||
if (!menu_display_reset_textures_list(filename, ozone->png_path, &ozone->textures[i], TEXTURE_FILTER_MIPMAP_LINEAR))
|
||||
{
|
||||
ozone->has_all_assets = false;
|
||||
RARCH_WARN("[OZONE] Asset missing: %s%s%s\n", ozone->png_path, path_default_slash(), filename);
|
||||
}
|
||||
}
|
||||
|
||||
/* Sidebar textures */
|
||||
@ -362,7 +366,10 @@ static void ozone_context_reset(void *data, bool is_threaded)
|
||||
strlcat(filename, ".png", sizeof(filename));
|
||||
|
||||
if (!menu_display_reset_textures_list(filename, ozone->tab_path, &ozone->tab_textures[i], TEXTURE_FILTER_MIPMAP_LINEAR))
|
||||
{
|
||||
ozone->has_all_assets = false;
|
||||
RARCH_WARN("[OZONE] Asset missing: %s%s%s\n", ozone->tab_path, path_default_slash(), filename);
|
||||
}
|
||||
}
|
||||
|
||||
/* Theme textures */
|
||||
@ -371,8 +378,11 @@ static void ozone_context_reset(void *data, bool is_threaded)
|
||||
|
||||
/* Icons textures init */
|
||||
for (i = 0; i < OZONE_ENTRIES_ICONS_TEXTURE_LAST; i++)
|
||||
if (!menu_display_reset_textures_list(ozone_entries_icon_texture_path(ozone, i), ozone->icons_path, &ozone->icons_textures[i], TEXTURE_FILTER_MIPMAP_LINEAR))
|
||||
if (!menu_display_reset_textures_list(ozone_entries_icon_texture_path(i), ozone->icons_path, &ozone->icons_textures[i], TEXTURE_FILTER_MIPMAP_LINEAR))
|
||||
{
|
||||
ozone->has_all_assets = false;
|
||||
RARCH_WARN("[OZONE] Asset missing: %s%s%s\n", ozone->icons_path, path_default_slash(), ozone_entries_icon_texture_path(i));
|
||||
}
|
||||
|
||||
menu_display_allocate_white_texture();
|
||||
|
||||
@ -427,7 +437,7 @@ static void ozone_context_destroy(void *data)
|
||||
/* Textures */
|
||||
for (i = 0; i < OZONE_TEXTURE_LAST; i++)
|
||||
video_driver_texture_unload(&ozone->textures[i]);
|
||||
|
||||
|
||||
/* Icons */
|
||||
for (i = 0; i < OZONE_TAB_TEXTURE_LAST; i++)
|
||||
video_driver_texture_unload(&ozone->tab_textures[i]);
|
||||
@ -492,6 +502,7 @@ static int ozone_list_push(void *data, void *userdata,
|
||||
unsigned i = 0;
|
||||
core_info_list_t *list = NULL;
|
||||
menu_handle_t *menu = (menu_handle_t*)data;
|
||||
const struct retro_subsystem_info* subsystem;
|
||||
|
||||
switch (type)
|
||||
{
|
||||
@ -583,62 +594,17 @@ static int ozone_list_push(void *data, void *userdata,
|
||||
|
||||
if (settings->bools.menu_show_load_content)
|
||||
{
|
||||
const struct retro_subsystem_info* subsystem = NULL;
|
||||
|
||||
entry.enum_idx = MENU_ENUM_LABEL_LOAD_CONTENT_LIST;
|
||||
menu_displaylist_setting(&entry);
|
||||
|
||||
subsystem = system->subsystem.data;
|
||||
/* Core fully loaded, use the subsystem data */
|
||||
if (system->subsystem.data)
|
||||
subsystem = system->subsystem.data;
|
||||
/* Core not loaded completely, use the data we peeked on load core */
|
||||
else
|
||||
subsystem = subsystem_data;
|
||||
|
||||
if (subsystem)
|
||||
{
|
||||
for (i = 0; i < (unsigned)system->subsystem.size; i++, subsystem++)
|
||||
{
|
||||
char s[PATH_MAX_LENGTH];
|
||||
if (content_get_subsystem() == i)
|
||||
{
|
||||
if (content_get_subsystem_rom_id() < subsystem->num_roms)
|
||||
{
|
||||
snprintf(s, sizeof(s),
|
||||
"Load %s %s",
|
||||
subsystem->desc,
|
||||
i == content_get_subsystem()
|
||||
? "\u2605" : " ");
|
||||
menu_entries_append_enum(info->list,
|
||||
s,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_SUBSYSTEM_ADD),
|
||||
MENU_ENUM_LABEL_SUBSYSTEM_ADD,
|
||||
MENU_SETTINGS_SUBSYSTEM_ADD + i, 0, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
snprintf(s, sizeof(s),
|
||||
"Start %s %s",
|
||||
subsystem->desc,
|
||||
i == content_get_subsystem()
|
||||
? "\u2605" : " ");
|
||||
menu_entries_append_enum(info->list,
|
||||
s,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_SUBSYSTEM_LOAD),
|
||||
MENU_ENUM_LABEL_SUBSYSTEM_LOAD,
|
||||
MENU_SETTINGS_SUBSYSTEM_LOAD, 0, 0);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
snprintf(s, sizeof(s),
|
||||
"Load %s %s",
|
||||
subsystem->desc,
|
||||
i == content_get_subsystem()
|
||||
? "\u2605" : " ");
|
||||
menu_entries_append_enum(info->list,
|
||||
s,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_SUBSYSTEM_ADD),
|
||||
MENU_ENUM_LABEL_SUBSYSTEM_ADD,
|
||||
MENU_SETTINGS_SUBSYSTEM_ADD + i, 0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
menu_subsystem_populate(subsystem, info);
|
||||
}
|
||||
|
||||
entry.enum_idx = MENU_ENUM_LABEL_ADD_CONTENT_LIST;
|
||||
@ -675,10 +641,12 @@ static int ozone_list_push(void *data, void *userdata,
|
||||
menu_displaylist_setting(&entry);
|
||||
}
|
||||
|
||||
#ifdef HAVE_LAKKA_SWITCH
|
||||
#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
|
||||
entry.enum_idx = MENU_ENUM_LABEL_SWITCH_CPU_PROFILE;
|
||||
menu_displaylist_setting(&entry);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LAKKA_SWITCH
|
||||
entry.enum_idx = MENU_ENUM_LABEL_SWITCH_GPU_PROFILE;
|
||||
menu_displaylist_setting(&entry);
|
||||
|
||||
@ -774,15 +742,14 @@ static void ozone_update_scroll(ozone_handle_t *ozone, bool allow_animation, ozo
|
||||
bottom_boundary = video_info_height - 87 - 78;
|
||||
entries_middle = video_info_height/2;
|
||||
|
||||
if (current_selection_middle_onscreen != entries_middle)
|
||||
new_scroll = ozone->animations.scroll_y - (current_selection_middle_onscreen - entries_middle);
|
||||
|
||||
new_scroll = ozone->animations.scroll_y - (current_selection_middle_onscreen - entries_middle);
|
||||
|
||||
if (new_scroll + ozone->entries_height < bottom_boundary)
|
||||
new_scroll = -(78 + ozone->entries_height - bottom_boundary);
|
||||
|
||||
if (new_scroll > 0)
|
||||
new_scroll = 0;
|
||||
|
||||
|
||||
if (allow_animation)
|
||||
{
|
||||
/* Cursor animation */
|
||||
@ -812,7 +779,6 @@ static void ozone_update_scroll(ozone_handle_t *ozone, bool allow_animation, ozo
|
||||
else
|
||||
{
|
||||
ozone->selection_old = ozone->selection;
|
||||
ozone->animations.cursor_alpha = 1.0f;
|
||||
ozone->animations.scroll_y = new_scroll;
|
||||
}
|
||||
}
|
||||
@ -849,7 +815,7 @@ static void ozone_compute_entries_position(ozone_handle_t *ozone)
|
||||
/* Entry */
|
||||
menu_entry_t entry;
|
||||
ozone_node_t *node = NULL;
|
||||
|
||||
|
||||
menu_entry_init(&entry);
|
||||
menu_entry_get(&entry, 0, (unsigned)i, NULL, true);
|
||||
|
||||
@ -912,7 +878,7 @@ static void ozone_render(void *data, bool is_idle)
|
||||
ozone_handle_t *ozone = (ozone_handle_t*)data;
|
||||
if (!data)
|
||||
return;
|
||||
|
||||
|
||||
if (ozone->need_compute)
|
||||
{
|
||||
ozone_compute_entries_position(ozone);
|
||||
@ -1067,12 +1033,12 @@ static void ozone_draw_footer(ozone_handle_t *ozone, video_frame_info_t *video_i
|
||||
menu_display_blend_end(video_info);
|
||||
|
||||
ozone_draw_text(video_info, ozone,
|
||||
do_swap ?
|
||||
do_swap ?
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_BASIC_MENU_CONTROLS_OK) :
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_BASIC_MENU_CONTROLS_BACK),
|
||||
video_info->width - back_width, video_info->height - back_height + FONT_SIZE_FOOTER, TEXT_ALIGN_LEFT, video_info->width, video_info->height, ozone->fonts.footer, ozone->theme->text_rgba, false);
|
||||
ozone_draw_text(video_info, ozone,
|
||||
do_swap ?
|
||||
do_swap ?
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_BASIC_MENU_CONTROLS_BACK) :
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_BASIC_MENU_CONTROLS_OK),
|
||||
video_info->width - ok_width, video_info->height - ok_height + FONT_SIZE_FOOTER, TEXT_ALIGN_LEFT, video_info->width, video_info->height, ozone->fonts.footer, ozone->theme->text_rgba, false);
|
||||
@ -1201,9 +1167,9 @@ static void ozone_frame(void *data, video_frame_info_t *video_info)
|
||||
ozone->raster_blocks.sidebar.carr.coords.vertices = 0;
|
||||
|
||||
/* Background */
|
||||
menu_display_draw_quad(video_info,
|
||||
0, 0, video_info->width, video_info->height,
|
||||
video_info->width, video_info->height,
|
||||
menu_display_draw_quad(video_info,
|
||||
0, 0, video_info->width, video_info->height,
|
||||
video_info->width, video_info->height,
|
||||
!video_info->libretro_running ? ozone->theme->background : ozone->theme->background_libretro_running
|
||||
);
|
||||
|
||||
@ -1227,7 +1193,7 @@ static void ozone_frame(void *data, video_frame_info_t *video_info)
|
||||
ozone->animations.scroll_y,
|
||||
ozone->is_playlist
|
||||
);
|
||||
|
||||
|
||||
/* Old list */
|
||||
if (ozone->draw_old_list)
|
||||
ozone_draw_entries(ozone,
|
||||
@ -1437,7 +1403,7 @@ static int ozone_menu_iterate(menu_handle_t *menu, void *userdata, enum menu_act
|
||||
|
||||
if (!ozone)
|
||||
return generic_menu_iterate(menu, userdata, action);
|
||||
|
||||
|
||||
selection_buf = menu_entries_get_selection_buf_ptr(0);
|
||||
tag = (uintptr_t)selection_buf;
|
||||
new_action = action;
|
||||
@ -1467,7 +1433,7 @@ static int ozone_menu_iterate(menu_handle_t *menu, void *userdata, enum menu_act
|
||||
tag = (uintptr_t)ozone;
|
||||
|
||||
new_selection = ozone->categories_selection_ptr - 1;
|
||||
|
||||
|
||||
if (new_selection < 0)
|
||||
new_selection = horizontal_list_size + ozone->system_tab_end;
|
||||
|
||||
@ -1707,7 +1673,7 @@ static void ozone_list_cache(void *data,
|
||||
bottom_boundary = video_info_height - 87 - 78;
|
||||
|
||||
for (i = 0; i < entries_end; i++)
|
||||
{
|
||||
{
|
||||
ozone_node_t *node = (ozone_node_t*) file_list_get_userdata_at_offset(selection_buf, i);
|
||||
|
||||
if (!node)
|
||||
|
@ -42,7 +42,7 @@ typedef struct ozone_handle ozone_handle_t;
|
||||
#define INTERVAL_BATTERY_LEVEL_CHECK (30 * 1000000)
|
||||
#define INTERVAL_OSK_CURSOR (0.5f * 1000000)
|
||||
|
||||
typedef struct ozone_handle
|
||||
struct ozone_handle
|
||||
{
|
||||
uint64_t frame_count;
|
||||
|
||||
@ -152,7 +152,7 @@ typedef struct ozone_handle
|
||||
unsigned old_list_offset_y;
|
||||
|
||||
file_list_t *horizontal_list; /* console tabs */
|
||||
} ozone_handle_t;
|
||||
};
|
||||
|
||||
/* If you change this struct, also
|
||||
change ozone_alloc_node and
|
||||
@ -207,4 +207,4 @@ void ozone_free_list_nodes(file_list_t *list, bool actiondata);
|
||||
|
||||
bool ozone_is_playlist(ozone_handle_t *ozone);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@ -244,7 +244,7 @@ border_iterate:
|
||||
|
||||
sublabel_str = menu_entry_get_sublabel(&entry);
|
||||
|
||||
if (node->wrap)
|
||||
if (node->wrap && sublabel_str)
|
||||
word_wrap(sublabel_str, sublabel_str, (video_info->width - 548) / ozone->sublabel_font_glyph_width, false);
|
||||
|
||||
/* Icon */
|
||||
@ -271,19 +271,28 @@ border_iterate:
|
||||
))
|
||||
{
|
||||
icon_color = ozone->theme_dynamic.entries_icon;
|
||||
ozone_color_alpha(ozone->theme_dynamic.entries_icon, alpha);
|
||||
}
|
||||
else
|
||||
{
|
||||
icon_color = ozone_pure_white;
|
||||
}
|
||||
|
||||
ozone_color_alpha(icon_color, alpha);
|
||||
|
||||
menu_display_blend_begin(video_info);
|
||||
ozone_draw_icon(video_info, 46, 46, texture, x_offset + 451+5+10, y + scroll_y, video_info->width, video_info->height, 0, 1, icon_color);
|
||||
menu_display_blend_end(video_info);
|
||||
|
||||
if (icon_color == ozone_pure_white)
|
||||
ozone_color_alpha(icon_color, 1.0f);
|
||||
|
||||
text_offset = 0;
|
||||
}
|
||||
|
||||
/* Draw text */
|
||||
ozone_draw_text(video_info, ozone, rich_label, text_offset + x_offset + 521, y + FONT_SIZE_ENTRIES_LABEL + 8 - 1 + scroll_y, TEXT_ALIGN_LEFT, video_info->width, video_info->height, ozone->fonts.entries_label, COLOR_TEXT_ALPHA(ozone->theme->text_rgba, alpha_uint32), false);
|
||||
ozone_draw_text(video_info, ozone, sublabel_str, x_offset + 470, y + FONT_SIZE_ENTRIES_SUBLABEL + 80 - 20 - 3 + scroll_y, TEXT_ALIGN_LEFT, video_info->width, video_info->height, ozone->fonts.entries_sublabel, COLOR_TEXT_ALPHA(ozone->theme->text_sublabel_rgba, alpha_uint32), false);
|
||||
if (sublabel_str)
|
||||
ozone_draw_text(video_info, ozone, sublabel_str, x_offset + 470, y + FONT_SIZE_ENTRIES_SUBLABEL + 80 - 20 - 3 + scroll_y, TEXT_ALIGN_LEFT, video_info->width, video_info->height, ozone->fonts.entries_sublabel, COLOR_TEXT_ALPHA(ozone->theme->text_sublabel_rgba, alpha_uint32), false);
|
||||
|
||||
/* Value */
|
||||
ticker.idx = ozone->frame_count / 20;
|
||||
@ -296,7 +305,9 @@ border_iterate:
|
||||
ozone_draw_entry_value(ozone, video_info, entry_value_ticker, x_offset + 426 + entry_width, y + FONT_SIZE_ENTRIES_LABEL + 8 - 1 + scroll_y,alpha_uint32, &entry);
|
||||
|
||||
free(entry_rich_label);
|
||||
free(sublabel_str);
|
||||
|
||||
if (sublabel_str)
|
||||
free(sublabel_str);
|
||||
|
||||
icons_iterate:
|
||||
y += node->height;
|
||||
|
@ -45,6 +45,9 @@ menu_texture_item ozone_entries_icon_get_texture(ozone_handle_t *ozone,
|
||||
case MENU_ENUM_LABEL_CORE_CHEAT_OPTIONS:
|
||||
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_CHEAT_OPTIONS];
|
||||
case MENU_ENUM_LABEL_DISK_OPTIONS:
|
||||
case MENU_ENUM_LABEL_DISK_CYCLE_TRAY_STATUS:
|
||||
case MENU_ENUM_LABEL_DISK_IMAGE_APPEND:
|
||||
case MENU_ENUM_LABEL_DISK_INDEX:
|
||||
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_DISK_OPTIONS];
|
||||
case MENU_ENUM_LABEL_SHADER_OPTIONS:
|
||||
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_SHADER_OPTIONS];
|
||||
@ -208,7 +211,10 @@ menu_texture_item ozone_entries_icon_get_texture(ozone_handle_t *ozone,
|
||||
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_UI];
|
||||
#ifdef HAVE_LAKKA_SWITCH
|
||||
case MENU_ENUM_LABEL_SWITCH_GPU_PROFILE:
|
||||
#endif
|
||||
#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
|
||||
case MENU_ENUM_LABEL_SWITCH_CPU_PROFILE:
|
||||
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_POWER];
|
||||
#endif
|
||||
case MENU_ENUM_LABEL_POWER_MANAGEMENT_SETTINGS:
|
||||
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_POWER];
|
||||
@ -266,6 +272,15 @@ menu_texture_item ozone_entries_icon_get_texture(ozone_handle_t *ozone,
|
||||
case MENU_ENUM_LABEL_CHEAT_APPLY_CHANGES:
|
||||
case MENU_ENUM_LABEL_SHADER_APPLY_CHANGES:
|
||||
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_CHECKMARK];
|
||||
case MENU_ENUM_LABEL_CHEAT_ADD_NEW_AFTER:
|
||||
case MENU_ENUM_LABEL_CHEAT_ADD_NEW_BEFORE:
|
||||
case MENU_ENUM_LABEL_CHEAT_ADD_NEW_TOP:
|
||||
case MENU_ENUM_LABEL_CHEAT_ADD_NEW_BOTTOM:
|
||||
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_MENU_ADD];
|
||||
case MENU_ENUM_LABEL_CHEAT_APPLY_AFTER_TOGGLE:
|
||||
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_MENU_APPLY_TOGGLE];
|
||||
case MENU_ENUM_LABEL_CHEAT_APPLY_AFTER_LOAD:
|
||||
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_MENU_APPLY_COG];
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -299,8 +314,9 @@ menu_texture_item ozone_entries_icon_get_texture(ozone_handle_t *ozone,
|
||||
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_CURSOR];
|
||||
case FILE_TYPE_PLAYLIST_ENTRY:
|
||||
case MENU_SETTING_ACTION_RUN:
|
||||
case MENU_SETTING_ACTION_RESUME_ACHIEVEMENTS:
|
||||
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_RUN];
|
||||
case MENU_SETTING_ACTION_RESUME_ACHIEVEMENTS:
|
||||
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_RESUME];
|
||||
case MENU_SETTING_ACTION_CLOSE:
|
||||
case MENU_SETTING_ACTION_DELETE_ENTRY:
|
||||
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_CLOSE];
|
||||
@ -326,13 +342,13 @@ menu_texture_item ozone_entries_icon_get_texture(ozone_handle_t *ozone,
|
||||
case MENU_SETTING_ACTION_RESET:
|
||||
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_RELOAD];
|
||||
case MENU_SETTING_ACTION_PAUSE_ACHIEVEMENTS:
|
||||
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_RESUME];
|
||||
|
||||
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_PAUSE];
|
||||
case MENU_SETTING_GROUP:
|
||||
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_SETTING];
|
||||
#ifdef HAVE_LAKKA_SWITCH
|
||||
case MENU_SET_SWITCH_BRIGHTNESS:
|
||||
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_BRIGHTNESS];
|
||||
#endif
|
||||
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_SETTING];
|
||||
case MENU_INFO_MESSAGE:
|
||||
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_CORE_INFO];
|
||||
case MENU_WIFI:
|
||||
@ -440,342 +456,234 @@ menu_texture_item ozone_entries_icon_get_texture(ozone_handle_t *ozone,
|
||||
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_SUBSETTING];
|
||||
}
|
||||
|
||||
const char *ozone_entries_icon_texture_path(ozone_handle_t *ozone, unsigned id)
|
||||
const char *ozone_entries_icon_texture_path(unsigned id)
|
||||
{
|
||||
char icon_fullpath[255];
|
||||
char *icon_name = NULL;
|
||||
|
||||
switch (id)
|
||||
{
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_MAIN_MENU:
|
||||
#if defined(HAVE_LAKKA)
|
||||
icon_name = "lakka.png";
|
||||
break;
|
||||
return "lakka.png";
|
||||
#else
|
||||
icon_name = "retroarch.png";
|
||||
break;
|
||||
return "retroarch.png";
|
||||
#endif
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_SETTINGS:
|
||||
icon_name = "settings.png";
|
||||
break;
|
||||
return "settings.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_HISTORY:
|
||||
icon_name = "history.png";
|
||||
break;
|
||||
return "history.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_FAVORITES:
|
||||
icon_name = "favorites.png";
|
||||
break;
|
||||
return "favorites.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_ADD_FAVORITE:
|
||||
icon_name = "add-favorite.png";
|
||||
break;
|
||||
return "add-favorite.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_MUSICS:
|
||||
icon_name = "musics.png";
|
||||
break;
|
||||
return "musics.png";
|
||||
#if defined(HAVE_FFMPEG) || defined(HAVE_MPV)
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_MOVIES:
|
||||
icon_name = "movies.png";
|
||||
break;
|
||||
return "movies.png";
|
||||
#endif
|
||||
#ifdef HAVE_IMAGEVIEWER
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_IMAGES:
|
||||
icon_name = "images.png";
|
||||
break;
|
||||
return "images.png";
|
||||
#endif
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_SETTING:
|
||||
icon_name = "setting.png";
|
||||
break;
|
||||
return "setting.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_SUBSETTING:
|
||||
icon_name = "subsetting.png";
|
||||
break;
|
||||
return "subsetting.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_ARROW:
|
||||
icon_name = "arrow.png";
|
||||
break;
|
||||
return "arrow.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_RUN:
|
||||
icon_name = "run.png";
|
||||
break;
|
||||
return "run.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_CLOSE:
|
||||
icon_name = "close.png";
|
||||
break;
|
||||
return "close.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_RESUME:
|
||||
icon_name = "resume.png";
|
||||
break;
|
||||
return "resume.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_CLOCK:
|
||||
icon_name = "clock.png";
|
||||
break;
|
||||
return "clock.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_BATTERY_FULL:
|
||||
icon_name = "battery-full.png";
|
||||
break;
|
||||
return "battery-full.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_BATTERY_CHARGING:
|
||||
icon_name = "battery-charging.png";
|
||||
break;
|
||||
return "battery-charging.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_POINTER:
|
||||
icon_name = "pointer.png";
|
||||
break;
|
||||
return "pointer.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_SAVESTATE:
|
||||
icon_name = "savestate.png";
|
||||
break;
|
||||
return "savestate.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_LOADSTATE:
|
||||
icon_name = "loadstate.png";
|
||||
break;
|
||||
return "loadstate.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_UNDO:
|
||||
icon_name = "undo.png";
|
||||
break;
|
||||
return "undo.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_CORE_INFO:
|
||||
icon_name = "core-infos.png";
|
||||
break;
|
||||
return "core-infos.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_WIFI:
|
||||
icon_name = "wifi.png";
|
||||
break;
|
||||
return "wifi.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_CORE_OPTIONS:
|
||||
icon_name = "core-options.png";
|
||||
break;
|
||||
return "core-options.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_INPUT_REMAPPING_OPTIONS:
|
||||
icon_name = "core-input-remapping-options.png";
|
||||
break;
|
||||
return "core-input-remapping-options.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_CHEAT_OPTIONS:
|
||||
icon_name = "core-cheat-options.png";
|
||||
break;
|
||||
return "core-cheat-options.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_DISK_OPTIONS:
|
||||
icon_name = "core-disk-options.png";
|
||||
break;
|
||||
return "core-disk-options.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_SHADER_OPTIONS:
|
||||
icon_name = "core-shader-options.png";
|
||||
break;
|
||||
return "core-shader-options.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_ACHIEVEMENT_LIST:
|
||||
icon_name = "achievement-list.png";
|
||||
break;
|
||||
return "achievement-list.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_SCREENSHOT:
|
||||
icon_name = "screenshot.png";
|
||||
break;
|
||||
return "screenshot.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_RELOAD:
|
||||
icon_name = "reload.png";
|
||||
break;
|
||||
return "reload.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_RENAME:
|
||||
icon_name = "rename.png";
|
||||
break;
|
||||
return "rename.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_FILE:
|
||||
icon_name = "file.png";
|
||||
break;
|
||||
return "file.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_FOLDER:
|
||||
icon_name = "folder.png";
|
||||
break;
|
||||
return "folder.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_ZIP:
|
||||
icon_name = "zip.png";
|
||||
break;
|
||||
return "zip.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_MUSIC:
|
||||
icon_name = "music.png";
|
||||
break;
|
||||
return "music.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_FAVORITE:
|
||||
icon_name = "favorites-content.png";
|
||||
break;
|
||||
return "favorites-content.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_IMAGE:
|
||||
icon_name = "image.png";
|
||||
break;
|
||||
return "image.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_MOVIE:
|
||||
icon_name = "movie.png";
|
||||
break;
|
||||
return "movie.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_CORE:
|
||||
icon_name = "core.png";
|
||||
break;
|
||||
return "core.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_RDB:
|
||||
icon_name = "database.png";
|
||||
break;
|
||||
return "database.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_CURSOR:
|
||||
icon_name = "cursor.png";
|
||||
break;
|
||||
return "cursor.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_SWITCH_ON:
|
||||
icon_name = "on.png";
|
||||
break;
|
||||
return "on.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_SWITCH_OFF:
|
||||
icon_name = "off.png";
|
||||
break;
|
||||
return "off.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_ADD:
|
||||
icon_name = "add.png";
|
||||
break;
|
||||
return "add.png";
|
||||
#ifdef HAVE_NETWORKING
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_NETPLAY:
|
||||
icon_name = "netplay.png";
|
||||
break;
|
||||
return "netplay.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_ROOM:
|
||||
icon_name = "menu_room.png";
|
||||
break;
|
||||
return "menu_room.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_ROOM_LAN:
|
||||
icon_name = "menu_room_lan.png";
|
||||
break;
|
||||
return "menu_room_lan.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_ROOM_RELAY:
|
||||
icon_name = "menu_room_relay.png";
|
||||
break;
|
||||
return "menu_room_relay.png";
|
||||
#endif
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_KEY:
|
||||
icon_name = "key.png";
|
||||
break;
|
||||
return "key.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_KEY_HOVER:
|
||||
icon_name = "key-hover.png";
|
||||
break;
|
||||
return "key-hover.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_DIALOG_SLICE:
|
||||
icon_name = "dialog-slice.png";
|
||||
break;
|
||||
return "dialog-slice.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_ACHIEVEMENTS:
|
||||
icon_name = "menu_achievements.png";
|
||||
break;
|
||||
return "menu_achievements.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_AUDIO:
|
||||
icon_name = "menu_audio.png";
|
||||
break;
|
||||
return "menu_audio.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_DRIVERS:
|
||||
icon_name = "menu_drivers.png";
|
||||
break;
|
||||
return "menu_drivers.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_EXIT:
|
||||
icon_name = "menu_exit.png";
|
||||
break;
|
||||
return "menu_exit.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_FRAMESKIP:
|
||||
icon_name = "menu_frameskip.png";
|
||||
break;
|
||||
return "menu_frameskip.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_HELP:
|
||||
icon_name = "menu_help.png";
|
||||
break;
|
||||
return "menu_help.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_INFO:
|
||||
icon_name = "menu_info.png";
|
||||
break;
|
||||
return "menu_info.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_INPUT_SETTINGS:
|
||||
icon_name = "Libretro - Pad.png";
|
||||
break;
|
||||
return "Libretro - Pad.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_LATENCY:
|
||||
icon_name = "menu_latency.png";
|
||||
break;
|
||||
return "menu_latency.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_NETWORK:
|
||||
icon_name = "menu_network.png";
|
||||
break;
|
||||
return "menu_network.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_POWER:
|
||||
icon_name = "menu_power.png";
|
||||
break;
|
||||
return "menu_power.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_RECORD:
|
||||
icon_name = "menu_record.png";
|
||||
break;
|
||||
return "menu_record.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_SAVING:
|
||||
icon_name = "menu_saving.png";
|
||||
break;
|
||||
return "menu_saving.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_UPDATER:
|
||||
icon_name = "menu_updater.png";
|
||||
break;
|
||||
return "menu_updater.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_VIDEO:
|
||||
icon_name = "menu_video.png";
|
||||
break;
|
||||
return "menu_video.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_MIXER:
|
||||
icon_name = "menu_mixer.png";
|
||||
break;
|
||||
return "menu_mixer.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_LOG:
|
||||
icon_name = "menu_log.png";
|
||||
break;
|
||||
return "menu_log.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_OSD:
|
||||
icon_name = "menu_osd.png";
|
||||
break;
|
||||
return "menu_osd.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_UI:
|
||||
icon_name = "menu_ui.png";
|
||||
break;
|
||||
return "menu_ui.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_USER:
|
||||
icon_name = "menu_user.png";
|
||||
break;
|
||||
return "menu_user.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_PRIVACY:
|
||||
icon_name = "menu_privacy.png";
|
||||
break;
|
||||
return "menu_privacy.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_PLAYLIST:
|
||||
icon_name = "menu_playlist.png";
|
||||
break;
|
||||
return "menu_playlist.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_QUICKMENU:
|
||||
icon_name = "menu_quickmenu.png";
|
||||
break;
|
||||
return "menu_quickmenu.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_REWIND:
|
||||
icon_name = "menu_rewind.png";
|
||||
break;
|
||||
return "menu_rewind.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_OVERLAY:
|
||||
icon_name = "menu_overlay.png";
|
||||
break;
|
||||
return "menu_overlay.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_OVERRIDE:
|
||||
icon_name = "menu_override.png";
|
||||
break;
|
||||
return "menu_override.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_NOTIFICATIONS:
|
||||
icon_name = "menu_notifications.png";
|
||||
break;
|
||||
return "menu_notifications.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_STREAM:
|
||||
icon_name = "menu_stream.png";
|
||||
break;
|
||||
return "menu_stream.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_SHUTDOWN:
|
||||
icon_name = "menu_shutdown.png";
|
||||
break;
|
||||
return "menu_shutdown.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_INPUT_DPAD_U:
|
||||
icon_name = "input_DPAD-U.png";
|
||||
break;
|
||||
return "input_DPAD-U.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_INPUT_DPAD_D:
|
||||
icon_name = "input_DPAD-D.png";
|
||||
break;
|
||||
return "input_DPAD-D.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_INPUT_DPAD_L:
|
||||
icon_name = "input_DPAD-L.png";
|
||||
break;
|
||||
return "input_DPAD-L.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_INPUT_DPAD_R:
|
||||
icon_name = "input_DPAD-R.png";
|
||||
break;
|
||||
return "input_DPAD-R.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_INPUT_STCK_U:
|
||||
icon_name = "input_STCK-U.png";
|
||||
break;
|
||||
return "input_STCK-U.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_INPUT_STCK_D:
|
||||
icon_name = "input_STCK-D.png";
|
||||
break;
|
||||
return "input_STCK-D.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_INPUT_STCK_L:
|
||||
icon_name = "input_STCK-L.png";
|
||||
break;
|
||||
return "input_STCK-L.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_INPUT_STCK_R:
|
||||
icon_name = "input_STCK-R.png";
|
||||
break;
|
||||
return "input_STCK-R.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_INPUT_STCK_P:
|
||||
icon_name = "input_STCK-P.png";
|
||||
break;
|
||||
return "input_STCK-P.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_INPUT_BTN_U:
|
||||
icon_name = "input_BTN-U.png";
|
||||
break;
|
||||
return "input_BTN-U.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_INPUT_BTN_D:
|
||||
icon_name = "input_BTN-D.png";
|
||||
break;
|
||||
return "input_BTN-D.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_INPUT_BTN_L:
|
||||
icon_name = "input_BTN-L.png";
|
||||
break;
|
||||
return "input_BTN-L.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_INPUT_BTN_R:
|
||||
icon_name = "input_BTN-R.png";
|
||||
break;
|
||||
return "input_BTN-R.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_INPUT_LB:
|
||||
icon_name = "input_LB.png";
|
||||
break;
|
||||
return "input_LB.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_INPUT_RB:
|
||||
icon_name = "input_RB.png";
|
||||
break;
|
||||
return "input_RB.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_INPUT_LT:
|
||||
icon_name = "input_LT.png";
|
||||
break;
|
||||
return "input_LT.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_INPUT_RT:
|
||||
icon_name = "input_RT.png";
|
||||
break;
|
||||
return "input_RT.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_INPUT_SELECT:
|
||||
icon_name = "input_SELECT.png";
|
||||
break;
|
||||
return "input_SELECT.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_INPUT_START:
|
||||
icon_name = "input_START.png";
|
||||
break;
|
||||
return "input_START.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_CHECKMARK:
|
||||
icon_name = "menu_check.png";
|
||||
break;
|
||||
return "menu_check.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_MENU_ADD:
|
||||
return "menu_add.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_BRIGHTNESS:
|
||||
return "menu_brightness.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_PAUSE:
|
||||
return "menu_pause.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_MENU_APPLY_TOGGLE:
|
||||
return "menu_apply_toggle.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_MENU_APPLY_COG:
|
||||
return "menu_apply_cog.png";
|
||||
}
|
||||
|
||||
fill_pathname_join(
|
||||
icon_fullpath,
|
||||
ozone->icons_path,
|
||||
icon_name,
|
||||
sizeof(icon_fullpath)
|
||||
);
|
||||
|
||||
if (!filestream_exists(icon_fullpath))
|
||||
{
|
||||
return "subsetting.png";
|
||||
}
|
||||
else
|
||||
return icon_name;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void ozone_unload_theme_textures(ozone_handle_t *ozone)
|
||||
@ -821,4 +729,4 @@ bool ozone_reset_theme_textures(ozone_handle_t *ozone)
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
@ -193,10 +193,15 @@ enum
|
||||
OZONE_ENTRIES_ICONS_TEXTURE_INPUT_LT,
|
||||
OZONE_ENTRIES_ICONS_TEXTURE_INPUT_RT,
|
||||
OZONE_ENTRIES_ICONS_TEXTURE_CHECKMARK,
|
||||
OZONE_ENTRIES_ICONS_TEXTURE_MENU_ADD,
|
||||
OZONE_ENTRIES_ICONS_TEXTURE_BRIGHTNESS,
|
||||
OZONE_ENTRIES_ICONS_TEXTURE_PAUSE,
|
||||
OZONE_ENTRIES_ICONS_TEXTURE_MENU_APPLY_TOGGLE,
|
||||
OZONE_ENTRIES_ICONS_TEXTURE_MENU_APPLY_COG,
|
||||
OZONE_ENTRIES_ICONS_TEXTURE_LAST
|
||||
};
|
||||
|
||||
const char *ozone_entries_icon_texture_path(ozone_handle_t *ozone, unsigned id);
|
||||
const char *ozone_entries_icon_texture_path(unsigned id);
|
||||
|
||||
menu_texture_item ozone_entries_icon_get_texture(ozone_handle_t *ozone,
|
||||
enum msg_hash_enums enum_idx, unsigned type, bool active);
|
||||
@ -204,4 +209,4 @@ menu_texture_item ozone_entries_icon_get_texture(ozone_handle_t *ozone,
|
||||
bool ozone_reset_theme_textures(ozone_handle_t *ozone);
|
||||
void ozone_unload_theme_textures(ozone_handle_t *ozone);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@ -118,10 +118,10 @@ void ozone_set_color_theme(ozone_handle_t *ozone, unsigned color_theme)
|
||||
last_color_theme = color_theme;
|
||||
}
|
||||
|
||||
unsigned ozone_get_system_theme()
|
||||
unsigned ozone_get_system_theme(void)
|
||||
{
|
||||
unsigned ret = 0;
|
||||
#ifdef HAVE_LIBNX
|
||||
unsigned ret = 0;
|
||||
if (R_SUCCEEDED(setsysInitialize()))
|
||||
{
|
||||
ColorSetId theme;
|
||||
@ -133,4 +133,4 @@ unsigned ozone_get_system_theme()
|
||||
return ret;
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -45,6 +45,7 @@ enum
|
||||
ACTION_OK_DL_DEFAULT = 0,
|
||||
ACTION_OK_DL_DROPDOWN_BOX_LIST,
|
||||
ACTION_OK_DL_DROPDOWN_BOX_LIST_SPECIAL,
|
||||
ACTION_OK_DL_DROPDOWN_BOX_LIST_RESOLUTION,
|
||||
ACTION_OK_DL_OPEN_ARCHIVE,
|
||||
ACTION_OK_DL_OPEN_ARCHIVE_DETECT_CORE,
|
||||
ACTION_OK_DL_MUSIC,
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2011-2017 - Daniel De Matteis
|
||||
* Copyright (C) 2014-2017 - Jean-André Santoni
|
||||
* Copyright (C) 2015-2017 - Andrés Suárez
|
||||
* Copyright (C) 2014-2017 - Jean-André Santoni
|
||||
* Copyright (C) 2015-2017 - Andrés Suárez
|
||||
* Copyright (C) 2016-2017 - Brad Parker
|
||||
*
|
||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
||||
@ -51,6 +51,11 @@
|
||||
#include "../../lakka.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LIBNX
|
||||
#include <switch.h>
|
||||
#include "../../switch_performance_profiles.h"
|
||||
#endif
|
||||
|
||||
#if defined(__linux__) || (defined(BSD) && !defined(__MACH__))
|
||||
#include "../frontend/drivers/platform_unix.h"
|
||||
#endif
|
||||
@ -373,7 +378,7 @@ static int menu_displaylist_parse_system_info(menu_displaylist_info_t *info)
|
||||
#if defined(HAVE_OPENGL) || defined(HAVE_OPENGLES)
|
||||
gfx_ctx_ident_t ident_info;
|
||||
#endif
|
||||
char tmp[PATH_MAX_LENGTH];
|
||||
char tmp[8192];
|
||||
char feat_str[255];
|
||||
#ifdef ANDROID
|
||||
bool perms = false;
|
||||
@ -432,7 +437,7 @@ static int menu_displaylist_parse_system_info(menu_displaylist_info_t *info)
|
||||
}
|
||||
|
||||
{
|
||||
char cpu_str[255];
|
||||
char cpu_str[8192];
|
||||
char cpu_arch_str[PATH_MAX_LENGTH];
|
||||
char cpu_text_str[PATH_MAX_LENGTH];
|
||||
enum frontend_architecture arch = frontend_driver_get_cpu_architecture();
|
||||
@ -1445,7 +1450,7 @@ static int menu_displaylist_parse_shader_options(menu_displaylist_info_t *info)
|
||||
for (i = 0; i < pass_count; i++)
|
||||
{
|
||||
char buf_tmp[64];
|
||||
char buf[64];
|
||||
char buf[128];
|
||||
|
||||
buf[0] = buf_tmp[0] = '\0';
|
||||
|
||||
@ -2584,25 +2589,6 @@ static int menu_displaylist_parse_load_content_settings(
|
||||
#endif
|
||||
rarch_system_info_t *system = runloop_get_system_info();
|
||||
|
||||
#if 0
|
||||
const struct retro_subsystem_info* subsystem = system ? system->subsystem.data : NULL;
|
||||
|
||||
if (subsystem)
|
||||
{
|
||||
unsigned p;
|
||||
|
||||
for (p = 0; p < system->subsystem.size; p++, subsystem++)
|
||||
{
|
||||
char s[PATH_MAX_LENGTH];
|
||||
snprintf(s, sizeof(s), "%s (%s)", msg_hash_to_str(MENU_ENUM_LABEL_VALUE_LOAD_CONTENT_LIST), subsystem->desc);
|
||||
menu_entries_append_enum(info->list,
|
||||
s,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_LOAD_CONTENT_SPECIAL),
|
||||
MENU_ENUM_LABEL_LOAD_CONTENT_SPECIAL,
|
||||
MENU_SETTING_ACTION, 0, 0);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
menu_entries_append_enum(info->list,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_RESUME_CONTENT),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_RESUME_CONTENT),
|
||||
@ -2633,7 +2619,7 @@ static int menu_displaylist_parse_load_content_settings(
|
||||
|
||||
if (settings->bools.quick_menu_show_save_load_state
|
||||
#ifdef HAVE_CHEEVOS
|
||||
&& !cheevos_hardcore_active
|
||||
&& !cheevos_hardcore_active
|
||||
#endif
|
||||
)
|
||||
{
|
||||
@ -2901,7 +2887,7 @@ static int menu_displaylist_parse_horizontal_content_actions(
|
||||
MENU_ENUM_LABEL_ADD_TO_FAVORITES_PLAYLIST, FILE_TYPE_PLAYLIST_ENTRY, 0, 0);
|
||||
}
|
||||
|
||||
if (settings->bools.quick_menu_show_add_to_favorites)
|
||||
if (settings->bools.quick_menu_show_reset_core_association)
|
||||
{
|
||||
menu_entries_append_enum(info->list,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_RESET_CORE_ASSOCIATION),
|
||||
@ -3381,8 +3367,8 @@ static int menu_displaylist_parse_options_remappings(
|
||||
{
|
||||
for (retro_id = 0; retro_id < RARCH_FIRST_CUSTOM_BIND + 8; retro_id++)
|
||||
{
|
||||
char desc_label[64];
|
||||
char descriptor[255];
|
||||
char desc_label[400];
|
||||
char descriptor[300];
|
||||
const struct retro_keybind *auto_bind = NULL;
|
||||
const struct retro_keybind *keybind = NULL;
|
||||
|
||||
@ -3472,16 +3458,19 @@ static int menu_displaylist_parse_playlists(
|
||||
if (!horizontal)
|
||||
{
|
||||
#ifdef HAVE_LIBRETRODB
|
||||
menu_entries_append_enum(info->list,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SCAN_DIRECTORY),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_SCAN_DIRECTORY),
|
||||
MENU_ENUM_LABEL_SCAN_DIRECTORY,
|
||||
MENU_SETTING_ACTION, 0, 0);
|
||||
menu_entries_append_enum(info->list,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SCAN_FILE),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_SCAN_FILE),
|
||||
MENU_ENUM_LABEL_SCAN_FILE,
|
||||
MENU_SETTING_ACTION, 0, 0);
|
||||
if (settings->bools.menu_content_show_add)
|
||||
{
|
||||
menu_entries_append_enum(info->list,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SCAN_DIRECTORY),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_SCAN_DIRECTORY),
|
||||
MENU_ENUM_LABEL_SCAN_DIRECTORY,
|
||||
MENU_SETTING_ACTION, 0, 0);
|
||||
menu_entries_append_enum(info->list,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SCAN_FILE),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_SCAN_FILE),
|
||||
MENU_ENUM_LABEL_SCAN_FILE,
|
||||
MENU_SETTING_ACTION, 0, 0);
|
||||
}
|
||||
#endif
|
||||
if (settings->bools.menu_content_show_favorites)
|
||||
menu_entries_append_enum(info->list,
|
||||
@ -4284,7 +4273,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, menu_displaylist
|
||||
|
||||
switch (type)
|
||||
{
|
||||
#ifdef HAVE_LAKKA_SWITCH
|
||||
#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
|
||||
case DISPLAYLIST_SWITCH_CPU_PROFILE:
|
||||
{
|
||||
unsigned i;
|
||||
@ -4293,17 +4282,22 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, menu_displaylist
|
||||
FILE *profile = NULL;
|
||||
const size_t profiles_count = sizeof(SWITCH_CPU_PROFILES)/sizeof(SWITCH_CPU_PROFILES[1]);
|
||||
|
||||
runloop_msg_queue_push("Warning : extented overclocking can damage the Switch", 1, 90, true);
|
||||
runloop_msg_queue_push("Warning : extended overclocking can damage the Switch", 1, 90, true);
|
||||
|
||||
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
|
||||
|
||||
#ifdef HAVE_LAKKA_SWITCH
|
||||
profile = popen("cpu-profile get", "r");
|
||||
fgets(current_profile, PATH_MAX_LENGTH, profile);
|
||||
pclose(profile);
|
||||
|
||||
|
||||
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
|
||||
|
||||
snprintf(text, sizeof(text),
|
||||
"Current profile : %s", current_profile);
|
||||
|
||||
snprintf(text, sizeof(text), "Current profile : %s", current_profile);
|
||||
#else
|
||||
u32 currentClock = 0;
|
||||
pcvGetClockRate(PcvModule_Cpu, ¤tClock);
|
||||
snprintf(text, sizeof(text), "Current Clock : %i", currentClock);
|
||||
#endif
|
||||
menu_entries_append_enum(info->list,
|
||||
text,
|
||||
"",
|
||||
@ -4332,6 +4326,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, menu_displaylist
|
||||
|
||||
break;
|
||||
}
|
||||
#if defined(HAVE_LAKKA_SWITCH)
|
||||
case DISPLAYLIST_SWITCH_GPU_PROFILE:
|
||||
{
|
||||
unsigned i;
|
||||
@ -4349,7 +4344,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, menu_displaylist
|
||||
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
|
||||
|
||||
snprintf(text, sizeof(text), "Current profile : %s", current_profile);
|
||||
|
||||
|
||||
menu_entries_append_enum(info->list,
|
||||
text,
|
||||
"",
|
||||
@ -4402,7 +4397,8 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, menu_displaylist
|
||||
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
#endif // HAVE_LAKKA_SWITCH
|
||||
#endif // HAVE_LAKKA_SWITCH || HAVE_LIBNX
|
||||
case DISPLAYLIST_MUSIC_LIST:
|
||||
{
|
||||
char combined_path[PATH_MAX_LENGTH];
|
||||
@ -5619,11 +5615,14 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, menu_displaylist
|
||||
menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_FPS_SHOW,
|
||||
PARSE_ONLY_BOOL, false);
|
||||
menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_FRAMECOUNT_SHOW,
|
||||
PARSE_ONLY_BOOL, false);
|
||||
menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_STATISTICS_SHOW,
|
||||
PARSE_ONLY_BOOL, false);
|
||||
menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_FRAMECOUNT_SHOW,
|
||||
MENU_ENUM_LABEL_MEMORY_SHOW,
|
||||
PARSE_ONLY_BOOL, false);
|
||||
menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_VIDEO_FONT_PATH,
|
||||
@ -5838,6 +5837,10 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, menu_displaylist
|
||||
MENU_ENUM_LABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES,
|
||||
PARSE_ONLY_BOOL, false);
|
||||
|
||||
menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION,
|
||||
PARSE_ONLY_BOOL, false);
|
||||
|
||||
menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_QUICK_MENU_SHOW_OPTIONS,
|
||||
PARSE_ONLY_BOOL, false);
|
||||
@ -6546,9 +6549,16 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, menu_displaylist
|
||||
menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_SUSPEND_SCREENSAVER_ENABLE,
|
||||
PARSE_ONLY_BOOL, false);
|
||||
menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_SCREEN_RESOLUTION,
|
||||
PARSE_ACTION, false);
|
||||
#if defined(GEKKO) || defined(__CELLOS_LV2__)
|
||||
if (true)
|
||||
#else
|
||||
if (!string_is_equal(video_display_server_get_ident(), "null"))
|
||||
#endif
|
||||
{
|
||||
menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_SCREEN_RESOLUTION,
|
||||
PARSE_ACTION, false);
|
||||
}
|
||||
menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_PAL60_ENABLE,
|
||||
PARSE_ONLY_BOOL, false);
|
||||
@ -6570,6 +6580,9 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, menu_displaylist
|
||||
menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_VIDEO_WINDOWED_FULLSCREEN,
|
||||
PARSE_ONLY_BOOL, false);
|
||||
menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_SCREEN_RESOLUTION,
|
||||
PARSE_ACTION, false);
|
||||
menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_VIDEO_FULLSCREEN_X,
|
||||
PARSE_ONLY_UINT, false);
|
||||
@ -6609,18 +6622,21 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, menu_displaylist
|
||||
menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_VIDEO_SCALE,
|
||||
PARSE_ONLY_FLOAT, false);
|
||||
menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_VIDEO_WINDOW_WIDTH,
|
||||
PARSE_ONLY_UINT, false);
|
||||
menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_VIDEO_WINDOW_HEIGHT,
|
||||
PARSE_ONLY_UINT, false);
|
||||
menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_VIDEO_WINDOW_OPACITY,
|
||||
PARSE_ONLY_UINT, false);
|
||||
menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_VIDEO_WINDOW_SHOW_DECORATIONS,
|
||||
PARSE_ONLY_BOOL, false);
|
||||
menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_VIDEO_WINDOW_SAVE_POSITION,
|
||||
PARSE_ONLY_BOOL, false);
|
||||
menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_VIDEO_WINDOW_WIDTH,
|
||||
PARSE_ONLY_UINT, false);
|
||||
menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_VIDEO_WINDOW_HEIGHT,
|
||||
PARSE_ONLY_UINT, false);
|
||||
menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_VIDEO_SCALE_INTEGER,
|
||||
PARSE_ONLY_BOOL, false);
|
||||
@ -7303,6 +7319,10 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, menu_displaylist
|
||||
MENU_ENUM_LABEL_STREAMING_MODE,
|
||||
PARSE_ONLY_UINT, false) == 0)
|
||||
count++;
|
||||
if (menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_VIDEO_RECORD_THREADS,
|
||||
PARSE_ONLY_UINT, true) == 0)
|
||||
count++;
|
||||
if (menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_STREAMING_TITLE,
|
||||
PARSE_ONLY_STRING, false) == 0)
|
||||
@ -8322,56 +8342,204 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, menu_displaylist
|
||||
info->need_push = true;
|
||||
}
|
||||
break;
|
||||
case DISPLAYLIST_DROPDOWN_LIST_SPECIAL:
|
||||
case DISPLAYLIST_DROPDOWN_LIST_RESOLUTION:
|
||||
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
|
||||
{
|
||||
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
|
||||
unsigned i, size = 0;
|
||||
struct video_display_config *list = video_display_server_get_resolution_list(&size);
|
||||
|
||||
if (strstr(info->path, "core_option_"))
|
||||
if (list)
|
||||
{
|
||||
struct string_list *tmp_str_list = string_split(info->path, "_");
|
||||
|
||||
if (tmp_str_list && tmp_str_list->size > 0)
|
||||
for (i = 0; i < size; i++)
|
||||
{
|
||||
core_option_manager_t *coreopts = NULL;
|
||||
char val_d[256], str[256];
|
||||
snprintf(str, sizeof(str), "%dx%d (%d Hz)", list[i].width, list[i].height, list[i].refreshrate);
|
||||
snprintf(val_d, sizeof(val_d), "%d", i);
|
||||
menu_entries_append_enum(info->list,
|
||||
str,
|
||||
val_d,
|
||||
MENU_ENUM_LABEL_NO_ITEMS,
|
||||
MENU_SETTING_DROPDOWN_ITEM_RESOLUTION, list[i].idx, 0);
|
||||
|
||||
rarch_ctl(RARCH_CTL_CORE_OPTIONS_LIST_GET, &coreopts);
|
||||
if (list[i].current)
|
||||
menu_entries_set_checked(info->list, i, true);
|
||||
}
|
||||
|
||||
if (coreopts)
|
||||
free(list);
|
||||
}
|
||||
else
|
||||
menu_entries_append_enum(info->list,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NO_ENTRIES_TO_DISPLAY),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_NO_ENTRIES_TO_DISPLAY),
|
||||
MENU_ENUM_LABEL_NO_ENTRIES_TO_DISPLAY,
|
||||
FILE_TYPE_NONE, 0, 0);
|
||||
|
||||
}
|
||||
info->need_refresh = true;
|
||||
info->need_push = true;
|
||||
break;
|
||||
case DISPLAYLIST_DROPDOWN_LIST_SPECIAL:
|
||||
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
|
||||
|
||||
if (strstr(info->path, "core_option_"))
|
||||
{
|
||||
struct string_list *tmp_str_list = string_split(info->path, "_");
|
||||
|
||||
if (tmp_str_list && tmp_str_list->size > 0)
|
||||
{
|
||||
core_option_manager_t *coreopts = NULL;
|
||||
|
||||
rarch_ctl(RARCH_CTL_CORE_OPTIONS_LIST_GET, &coreopts);
|
||||
|
||||
if (coreopts)
|
||||
{
|
||||
unsigned size = (unsigned)tmp_str_list->size;
|
||||
unsigned i = atoi(tmp_str_list->elems[size-1].data);
|
||||
struct core_option *option = NULL;
|
||||
bool checked_found = false;
|
||||
unsigned checked = 0;
|
||||
const char *val = core_option_manager_get_val(coreopts, i-1);
|
||||
|
||||
i--;
|
||||
|
||||
option = (struct core_option*)&coreopts->opts[i];
|
||||
|
||||
if (option)
|
||||
{
|
||||
unsigned size = (unsigned)tmp_str_list->size;
|
||||
unsigned i = atoi(tmp_str_list->elems[size-1].data);
|
||||
struct core_option *option = NULL;
|
||||
bool checked_found = false;
|
||||
unsigned checked = 0;
|
||||
const char *val = core_option_manager_get_val(coreopts, i-1);
|
||||
|
||||
i--;
|
||||
|
||||
option = (struct core_option*)&coreopts->opts[i];
|
||||
|
||||
if (option)
|
||||
unsigned k;
|
||||
for (k = 0; k < option->vals->size; k++)
|
||||
{
|
||||
unsigned k;
|
||||
for (k = 0; k < option->vals->size; k++)
|
||||
{
|
||||
const char *str = option->vals->elems[k].data;
|
||||
const char *str = option->vals->elems[k].data;
|
||||
|
||||
if (!string_is_empty(str))
|
||||
if (!string_is_empty(str))
|
||||
{
|
||||
char val_d[256];
|
||||
snprintf(val_d, sizeof(val_d), "%d", i);
|
||||
menu_entries_append_enum(info->list,
|
||||
str,
|
||||
val_d,
|
||||
MENU_ENUM_LABEL_NO_ITEMS,
|
||||
MENU_SETTING_DROPDOWN_SETTING_CORE_OPTIONS_ITEM_SPECIAL, k, 0);
|
||||
|
||||
if (!checked_found && string_is_equal(str, val))
|
||||
{
|
||||
checked = k;
|
||||
checked_found = true;
|
||||
}
|
||||
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
||||
if (checked_found)
|
||||
menu_entries_set_checked(info->list, checked, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
enum msg_hash_enums enum_idx = (enum msg_hash_enums)atoi(info->path);
|
||||
rarch_setting_t *setting = menu_setting_find_enum(enum_idx);
|
||||
|
||||
if (setting)
|
||||
{
|
||||
switch (setting->type)
|
||||
{
|
||||
case ST_STRING_OPTIONS:
|
||||
{
|
||||
struct string_list *tmp_str_list = string_split(setting->values, "|");
|
||||
|
||||
if (tmp_str_list && tmp_str_list->size > 0)
|
||||
{
|
||||
unsigned i;
|
||||
unsigned size = (unsigned)tmp_str_list->size;
|
||||
bool checked_found = false;
|
||||
unsigned checked = 0;
|
||||
|
||||
for (i = 0; i < size; i++)
|
||||
{
|
||||
char val_d[256];
|
||||
snprintf(val_d, sizeof(val_d), "%d", i);
|
||||
snprintf(val_d, sizeof(val_d), "%d", setting->enum_idx);
|
||||
menu_entries_append_enum(info->list,
|
||||
str,
|
||||
tmp_str_list->elems[i].data,
|
||||
val_d,
|
||||
MENU_ENUM_LABEL_NO_ITEMS,
|
||||
MENU_SETTING_DROPDOWN_SETTING_CORE_OPTIONS_ITEM_SPECIAL, k, 0);
|
||||
MENU_SETTING_DROPDOWN_SETTING_STRING_OPTIONS_ITEM_SPECIAL, i, 0);
|
||||
|
||||
if (!checked_found && string_is_equal(str, val))
|
||||
if (!checked_found && string_is_equal(tmp_str_list->elems[i].data, setting->value.target.string))
|
||||
{
|
||||
checked = k;
|
||||
checked = i;
|
||||
checked_found = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (checked_found)
|
||||
menu_entries_set_checked(info->list, checked, true);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case ST_INT:
|
||||
{
|
||||
float i;
|
||||
int32_t orig_value = *setting->value.target.integer;
|
||||
unsigned setting_type = MENU_SETTING_DROPDOWN_SETTING_INT_ITEM_SPECIAL;
|
||||
float step = setting->step;
|
||||
double min = setting->enforce_minrange ? setting->min : 0.00;
|
||||
double max = setting->enforce_maxrange ? setting->max : 999.00;
|
||||
bool checked_found = false;
|
||||
unsigned checked = 0;
|
||||
|
||||
if (setting->get_string_representation)
|
||||
{
|
||||
for (i = min; i <= max; i += step)
|
||||
{
|
||||
char val_s[256], val_d[256];
|
||||
int val = (int)i;
|
||||
|
||||
*setting->value.target.integer = val;
|
||||
|
||||
setting->get_string_representation(setting,
|
||||
val_s, sizeof(val_s));
|
||||
snprintf(val_d, sizeof(val_d), "%d", setting->enum_idx);
|
||||
menu_entries_append_enum(info->list,
|
||||
val_s,
|
||||
val_d,
|
||||
MENU_ENUM_LABEL_NO_ITEMS,
|
||||
setting_type, val, 0);
|
||||
|
||||
if (!checked_found && val == orig_value)
|
||||
{
|
||||
checked = count;
|
||||
checked_found = true;
|
||||
}
|
||||
count++;
|
||||
}
|
||||
|
||||
*setting->value.target.integer = orig_value;
|
||||
}
|
||||
else
|
||||
{
|
||||
for (i = min; i <= max; i += step)
|
||||
{
|
||||
char val_s[16], val_d[16];
|
||||
int val = (int)i;
|
||||
|
||||
snprintf(val_s, sizeof(val_s), "%d", val);
|
||||
snprintf(val_d, sizeof(val_d), "%d", setting->enum_idx);
|
||||
|
||||
menu_entries_append_enum(info->list,
|
||||
val_s,
|
||||
val_d,
|
||||
MENU_ENUM_LABEL_NO_ITEMS,
|
||||
setting_type, val, 0);
|
||||
|
||||
if (!checked_found && val == orig_value)
|
||||
{
|
||||
checked = count;
|
||||
checked_found = true;
|
||||
}
|
||||
count++;
|
||||
}
|
||||
}
|
||||
@ -8379,263 +8547,149 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, menu_displaylist
|
||||
if (checked_found)
|
||||
menu_entries_set_checked(info->list, checked, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case ST_FLOAT:
|
||||
{
|
||||
float i;
|
||||
float orig_value = *setting->value.target.fraction;
|
||||
unsigned setting_type = MENU_SETTING_DROPDOWN_SETTING_FLOAT_ITEM_SPECIAL;
|
||||
float step = setting->step;
|
||||
double min = setting->enforce_minrange ? setting->min : 0.00;
|
||||
double max = setting->enforce_maxrange ? setting->max : 999.00;
|
||||
bool checked_found = false;
|
||||
unsigned checked = 0;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
enum msg_hash_enums enum_idx = (enum msg_hash_enums)atoi(info->path);
|
||||
rarch_setting_t *setting = menu_setting_find_enum(enum_idx);
|
||||
|
||||
if (setting)
|
||||
{
|
||||
switch (setting->type)
|
||||
{
|
||||
case ST_STRING_OPTIONS:
|
||||
if (setting->get_string_representation)
|
||||
{
|
||||
struct string_list *tmp_str_list = string_split(setting->values, "|");
|
||||
|
||||
if (tmp_str_list && tmp_str_list->size > 0)
|
||||
for (i = min; i <= max; i += step)
|
||||
{
|
||||
unsigned i;
|
||||
unsigned size = (unsigned)tmp_str_list->size;
|
||||
bool checked_found = false;
|
||||
unsigned checked = 0;
|
||||
char val_s[256], val_d[256];
|
||||
|
||||
for (i = 0; i < size; i++)
|
||||
*setting->value.target.fraction = i;
|
||||
|
||||
setting->get_string_representation(setting,
|
||||
val_s, sizeof(val_s));
|
||||
snprintf(val_d, sizeof(val_d), "%d", setting->enum_idx);
|
||||
menu_entries_append_enum(info->list,
|
||||
val_s,
|
||||
val_d,
|
||||
MENU_ENUM_LABEL_NO_ITEMS,
|
||||
setting_type, 0, 0);
|
||||
|
||||
if (!checked_found && fabs(i - orig_value) <= 0.01f)
|
||||
{
|
||||
char val_d[256];
|
||||
snprintf(val_d, sizeof(val_d), "%d", setting->enum_idx);
|
||||
menu_entries_append_enum(info->list,
|
||||
tmp_str_list->elems[i].data,
|
||||
val_d,
|
||||
MENU_ENUM_LABEL_NO_ITEMS,
|
||||
MENU_SETTING_DROPDOWN_SETTING_STRING_OPTIONS_ITEM_SPECIAL, i, 0);
|
||||
|
||||
if (!checked_found && string_is_equal(tmp_str_list->elems[i].data, setting->value.target.string))
|
||||
{
|
||||
checked = i;
|
||||
checked_found = true;
|
||||
}
|
||||
checked = count;
|
||||
checked_found = true;
|
||||
}
|
||||
count++;
|
||||
}
|
||||
|
||||
if (checked_found)
|
||||
menu_entries_set_checked(info->list, checked, true);
|
||||
*setting->value.target.fraction = orig_value;
|
||||
}
|
||||
else
|
||||
{
|
||||
for (i = min; i <= max; i += step)
|
||||
{
|
||||
char val_s[16], val_d[16];
|
||||
|
||||
snprintf(val_s, sizeof(val_s), "%.2f", i);
|
||||
snprintf(val_d, sizeof(val_d), "%d", setting->enum_idx);
|
||||
|
||||
menu_entries_append_enum(info->list,
|
||||
val_s,
|
||||
val_d,
|
||||
MENU_ENUM_LABEL_NO_ITEMS,
|
||||
setting_type, 0, 0);
|
||||
|
||||
if (!checked_found && fabs(i - orig_value) <= 0.01f)
|
||||
{
|
||||
checked = count;
|
||||
checked_found = true;
|
||||
}
|
||||
count++;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case ST_INT:
|
||||
|
||||
if (checked_found)
|
||||
menu_entries_set_checked(info->list, checked, true);
|
||||
}
|
||||
break;
|
||||
case ST_UINT:
|
||||
{
|
||||
float i;
|
||||
unsigned orig_value = *setting->value.target.unsigned_integer;
|
||||
unsigned setting_type = MENU_SETTING_DROPDOWN_SETTING_UINT_ITEM_SPECIAL;
|
||||
float step = setting->step;
|
||||
double min = setting->enforce_minrange ? setting->min : 0.00;
|
||||
double max = setting->enforce_maxrange ? setting->max : 999.00;
|
||||
bool checked_found = false;
|
||||
unsigned checked = 0;
|
||||
|
||||
if (setting->get_string_representation)
|
||||
{
|
||||
float i;
|
||||
int32_t orig_value = *setting->value.target.integer;
|
||||
unsigned setting_type = MENU_SETTING_DROPDOWN_SETTING_INT_ITEM_SPECIAL;
|
||||
float step = setting->step;
|
||||
double min = setting->enforce_minrange ? setting->min : 0.00;
|
||||
double max = setting->enforce_maxrange ? setting->max : 999.00;
|
||||
bool checked_found = false;
|
||||
unsigned checked = 0;
|
||||
|
||||
if (setting->get_string_representation)
|
||||
for (i = min; i <= max; i += step)
|
||||
{
|
||||
for (i = min; i <= max; i += step)
|
||||
char val_s[256], val_d[256];
|
||||
int val = (int)i;
|
||||
|
||||
*setting->value.target.unsigned_integer = val;
|
||||
|
||||
setting->get_string_representation(setting,
|
||||
val_s, sizeof(val_s));
|
||||
snprintf(val_d, sizeof(val_d), "%d", setting->enum_idx);
|
||||
menu_entries_append_enum(info->list,
|
||||
val_s,
|
||||
val_d,
|
||||
MENU_ENUM_LABEL_NO_ITEMS,
|
||||
setting_type, val, 0);
|
||||
|
||||
if (!checked_found && val == orig_value)
|
||||
{
|
||||
char val_s[256], val_d[256];
|
||||
int val = (int)i;
|
||||
|
||||
*setting->value.target.integer = val;
|
||||
|
||||
setting->get_string_representation(setting,
|
||||
val_s, sizeof(val_s));
|
||||
snprintf(val_d, sizeof(val_d), "%d", setting->enum_idx);
|
||||
menu_entries_append_enum(info->list,
|
||||
val_s,
|
||||
val_d,
|
||||
MENU_ENUM_LABEL_NO_ITEMS,
|
||||
setting_type, val, 0);
|
||||
|
||||
if (!checked_found && val == orig_value)
|
||||
{
|
||||
checked = count;
|
||||
checked_found = true;
|
||||
}
|
||||
count++;
|
||||
}
|
||||
|
||||
*setting->value.target.integer = orig_value;
|
||||
}
|
||||
else
|
||||
{
|
||||
for (i = min; i <= max; i += step)
|
||||
{
|
||||
char val_s[16], val_d[16];
|
||||
int val = (int)i;
|
||||
|
||||
snprintf(val_s, sizeof(val_s), "%d", val);
|
||||
snprintf(val_d, sizeof(val_d), "%d", setting->enum_idx);
|
||||
|
||||
menu_entries_append_enum(info->list,
|
||||
val_s,
|
||||
val_d,
|
||||
MENU_ENUM_LABEL_NO_ITEMS,
|
||||
setting_type, val, 0);
|
||||
|
||||
if (!checked_found && val == orig_value)
|
||||
{
|
||||
checked = count;
|
||||
checked_found = true;
|
||||
}
|
||||
count++;
|
||||
checked = count;
|
||||
checked_found = true;
|
||||
}
|
||||
count++;
|
||||
}
|
||||
|
||||
if (checked_found)
|
||||
menu_entries_set_checked(info->list, checked, true);
|
||||
*setting->value.target.unsigned_integer = orig_value;
|
||||
}
|
||||
break;
|
||||
case ST_FLOAT:
|
||||
else
|
||||
{
|
||||
float i;
|
||||
float orig_value = *setting->value.target.fraction;
|
||||
unsigned setting_type = MENU_SETTING_DROPDOWN_SETTING_FLOAT_ITEM_SPECIAL;
|
||||
float step = setting->step;
|
||||
double min = setting->enforce_minrange ? setting->min : 0.00;
|
||||
double max = setting->enforce_maxrange ? setting->max : 999.00;
|
||||
bool checked_found = false;
|
||||
unsigned checked = 0;
|
||||
|
||||
if (setting->get_string_representation)
|
||||
for (i = min; i <= max; i += step)
|
||||
{
|
||||
for (i = min; i <= max; i += step)
|
||||
char val_s[16], val_d[16];
|
||||
int val = (int)i;
|
||||
|
||||
snprintf(val_s, sizeof(val_s), "%d", val);
|
||||
snprintf(val_d, sizeof(val_d), "%d", setting->enum_idx);
|
||||
|
||||
menu_entries_append_enum(info->list,
|
||||
val_s,
|
||||
val_d,
|
||||
MENU_ENUM_LABEL_NO_ITEMS,
|
||||
setting_type, val, 0);
|
||||
|
||||
if (!checked_found && val == orig_value)
|
||||
{
|
||||
char val_s[256], val_d[256];
|
||||
|
||||
*setting->value.target.fraction = i;
|
||||
|
||||
setting->get_string_representation(setting,
|
||||
val_s, sizeof(val_s));
|
||||
snprintf(val_d, sizeof(val_d), "%d", setting->enum_idx);
|
||||
menu_entries_append_enum(info->list,
|
||||
val_s,
|
||||
val_d,
|
||||
MENU_ENUM_LABEL_NO_ITEMS,
|
||||
setting_type, 0, 0);
|
||||
|
||||
if (!checked_found && fabs(i - orig_value) <= 0.01f)
|
||||
{
|
||||
checked = count;
|
||||
checked_found = true;
|
||||
}
|
||||
count++;
|
||||
checked = count;
|
||||
checked_found = true;
|
||||
}
|
||||
|
||||
*setting->value.target.fraction = orig_value;
|
||||
count++;
|
||||
}
|
||||
else
|
||||
{
|
||||
for (i = min; i <= max; i += step)
|
||||
{
|
||||
char val_s[16], val_d[16];
|
||||
|
||||
snprintf(val_s, sizeof(val_s), "%.2f", i);
|
||||
snprintf(val_d, sizeof(val_d), "%d", setting->enum_idx);
|
||||
|
||||
menu_entries_append_enum(info->list,
|
||||
val_s,
|
||||
val_d,
|
||||
MENU_ENUM_LABEL_NO_ITEMS,
|
||||
setting_type, 0, 0);
|
||||
|
||||
if (!checked_found && fabs(i - orig_value) <= 0.01f)
|
||||
{
|
||||
checked = count;
|
||||
checked_found = true;
|
||||
}
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
||||
if (checked_found)
|
||||
menu_entries_set_checked(info->list, checked, true);
|
||||
}
|
||||
break;
|
||||
case ST_UINT:
|
||||
{
|
||||
float i;
|
||||
unsigned orig_value = *setting->value.target.unsigned_integer;
|
||||
unsigned setting_type = MENU_SETTING_DROPDOWN_SETTING_UINT_ITEM_SPECIAL;
|
||||
float step = setting->step;
|
||||
double min = setting->enforce_minrange ? setting->min : 0.00;
|
||||
double max = setting->enforce_maxrange ? setting->max : 999.00;
|
||||
bool checked_found = false;
|
||||
unsigned checked = 0;
|
||||
|
||||
if (setting->get_string_representation)
|
||||
{
|
||||
for (i = min; i <= max; i += step)
|
||||
{
|
||||
char val_s[256], val_d[256];
|
||||
int val = (int)i;
|
||||
|
||||
*setting->value.target.unsigned_integer = val;
|
||||
|
||||
setting->get_string_representation(setting,
|
||||
val_s, sizeof(val_s));
|
||||
snprintf(val_d, sizeof(val_d), "%d", setting->enum_idx);
|
||||
menu_entries_append_enum(info->list,
|
||||
val_s,
|
||||
val_d,
|
||||
MENU_ENUM_LABEL_NO_ITEMS,
|
||||
setting_type, val, 0);
|
||||
|
||||
if (!checked_found && val == orig_value)
|
||||
{
|
||||
checked = count;
|
||||
checked_found = true;
|
||||
}
|
||||
count++;
|
||||
}
|
||||
|
||||
*setting->value.target.unsigned_integer = orig_value;
|
||||
}
|
||||
else
|
||||
{
|
||||
for (i = min; i <= max; i += step)
|
||||
{
|
||||
char val_s[16], val_d[16];
|
||||
int val = (int)i;
|
||||
|
||||
snprintf(val_s, sizeof(val_s), "%d", val);
|
||||
snprintf(val_d, sizeof(val_d), "%d", setting->enum_idx);
|
||||
|
||||
menu_entries_append_enum(info->list,
|
||||
val_s,
|
||||
val_d,
|
||||
MENU_ENUM_LABEL_NO_ITEMS,
|
||||
setting_type, val, 0);
|
||||
|
||||
if (!checked_found && val == orig_value)
|
||||
{
|
||||
checked = count;
|
||||
checked_found = true;
|
||||
}
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
||||
if (checked_found)
|
||||
menu_entries_set_checked(info->list, checked, true);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (checked_found)
|
||||
menu_entries_set_checked(info->list, checked, true);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
info->need_refresh = true;
|
||||
info->need_push = true;
|
||||
}
|
||||
|
||||
info->need_refresh = true;
|
||||
info->need_push = true;
|
||||
break;
|
||||
case DISPLAYLIST_NONE:
|
||||
break;
|
||||
|
@ -56,6 +56,7 @@ enum menu_displaylist_ctl_state
|
||||
DISPLAYLIST_NONE = 0,
|
||||
DISPLAYLIST_DROPDOWN_LIST,
|
||||
DISPLAYLIST_DROPDOWN_LIST_SPECIAL,
|
||||
DISPLAYLIST_DROPDOWN_LIST_RESOLUTION,
|
||||
DISPLAYLIST_INFO,
|
||||
DISPLAYLIST_HELP,
|
||||
DISPLAYLIST_HELP_SCREEN_LIST,
|
||||
@ -182,6 +183,8 @@ enum menu_displaylist_ctl_state
|
||||
#ifdef HAVE_LAKKA_SWITCH
|
||||
DISPLAYLIST_SWITCH_GPU_PROFILE,
|
||||
DISPLAYLIST_SWITCH_BACKLIGHT_CONTROL,
|
||||
#endif
|
||||
#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
|
||||
DISPLAYLIST_SWITCH_CPU_PROFILE,
|
||||
#endif
|
||||
DISPLAYLIST_PENDING_CLEAR
|
||||
|
@ -2654,3 +2654,57 @@ void hex32_to_rgba_normalized(uint32_t hex, float* rgba, float alpha)
|
||||
rgba[2] = rgba[6] = rgba[10] = rgba[14] = ((hex >> 0 ) & 0xFF) * (1.0f / 255.0f); /* b */
|
||||
rgba[3] = rgba[7] = rgba[11] = rgba[15] = alpha;
|
||||
}
|
||||
|
||||
void menu_subsystem_populate(const struct retro_subsystem_info* subsystem, menu_displaylist_info_t *info)
|
||||
{
|
||||
int i = 0;
|
||||
if (subsystem && subsystem_current_count > 0)
|
||||
{
|
||||
for (i = 0; i < subsystem_current_count; i++, subsystem++)
|
||||
{
|
||||
char s[PATH_MAX_LENGTH];
|
||||
if (content_get_subsystem() == i)
|
||||
{
|
||||
if (content_get_subsystem_rom_id() < subsystem->num_roms)
|
||||
{
|
||||
snprintf(s, sizeof(s),
|
||||
"Load %s %s",
|
||||
subsystem->desc,
|
||||
i == content_get_subsystem()
|
||||
? "\u2605" : " ");
|
||||
menu_entries_append_enum(info->list,
|
||||
s,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_SUBSYSTEM_ADD),
|
||||
MENU_ENUM_LABEL_SUBSYSTEM_ADD,
|
||||
MENU_SETTINGS_SUBSYSTEM_ADD + i, 0, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
snprintf(s, sizeof(s),
|
||||
"Start %s %s",
|
||||
subsystem->desc,
|
||||
i == content_get_subsystem()
|
||||
? "\u2605" : " ");
|
||||
menu_entries_append_enum(info->list,
|
||||
s,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_SUBSYSTEM_LOAD),
|
||||
MENU_ENUM_LABEL_SUBSYSTEM_LOAD,
|
||||
MENU_SETTINGS_SUBSYSTEM_LOAD, 0, 0);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
snprintf(s, sizeof(s),
|
||||
"Load %s %s",
|
||||
subsystem->desc,
|
||||
i == content_get_subsystem()
|
||||
? "\u2605" : " ");
|
||||
menu_entries_append_enum(info->list,
|
||||
s,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_SUBSYSTEM_ADD),
|
||||
MENU_ENUM_LABEL_SUBSYSTEM_ADD,
|
||||
MENU_SETTINGS_SUBSYSTEM_ADD + i, 0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user