mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-27 18:20:27 +00:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
30d4df7634
@ -1,4 +1,13 @@
|
||||
# 1.7.6 (future)
|
||||
- DATE: Add Date / Time style options.
|
||||
- MIDI: Add a Linux ALSA driver for MIDI.
|
||||
- LOCALIZATION: Update German translation.
|
||||
- LOCALIZATION: Update Italian translation.
|
||||
- LOCALIZATION: Update Simplified Chinese translation.
|
||||
- LOCALIZATION: Update Japanese translation.
|
||||
- SCANNER: Fix GDI disc scanning.
|
||||
- SWITCH/LIBNX: Improve touch scaling calculation.
|
||||
- SWITCH: Proper button labels.
|
||||
|
||||
# 1.7.5
|
||||
- CAMERA: Fix Video4Linux2 driver that broke years ago.
|
||||
|
@ -252,6 +252,7 @@ OBJ += frontend/frontend.o \
|
||||
$(LIBRETRO_COMM_DIR)/audio/resampler/drivers/sinc_resampler.o \
|
||||
$(LIBRETRO_COMM_DIR)/audio/resampler/drivers/nearest_resampler.o \
|
||||
$(LIBRETRO_COMM_DIR)/audio/resampler/drivers/null_resampler.o \
|
||||
$(LIBRETRO_COMM_DIR)/utils/md5.o \
|
||||
location/drivers/nulllocation.o \
|
||||
camera/drivers/nullcamera.o \
|
||||
wifi/drivers/nullwifi.o \
|
||||
@ -544,6 +545,7 @@ endif
|
||||
|
||||
ifeq ($(HAVE_ALSA), 1)
|
||||
OBJ += audio/drivers/alsa.o
|
||||
OBJ += midi/drivers/alsa_midi.o
|
||||
|
||||
ifeq ($(HAVE_THREADS), 1)
|
||||
OBJ += audio/drivers/alsathread.o
|
||||
@ -720,6 +722,10 @@ ifeq ($(HAVE_LAKKA), 1)
|
||||
DEFINES += -DHAVE_LAKKA
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_LAKKA_SWITCH), 1)
|
||||
DEFINES += -DHAVE_LAKKA_SWITCH
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_MENU_COMMON), 1)
|
||||
OBJ += menu/menu_driver.o \
|
||||
menu/menu_content.o \
|
||||
@ -1619,8 +1625,6 @@ ifeq ($(HAVE_NETWORKING), 1)
|
||||
cheevos/var.o \
|
||||
cheevos/cond.o
|
||||
|
||||
OBJ += \
|
||||
$(LIBRETRO_COMM_DIR)/utils/md5.o
|
||||
|
||||
ifeq ($(HAVE_LUA), 1)
|
||||
DEFINES += -DHAVE_LUA \
|
||||
|
12
Makefile.ctr
12
Makefile.ctr
@ -52,7 +52,7 @@ ifeq ($(GRIFFIN_BUILD), 1)
|
||||
OBJ += griffin/griffin.o
|
||||
DEFINES += -DHAVE_GRIFFIN=1 -DHAVE_MENU -DHAVE_RGUI -DHAVE_XMB -DHAVE_MATERIALUI -DHAVE_LIBRETRODB -DHAVE_CC_RESAMPLER
|
||||
DEFINES += -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA -DWANT_ZLIB
|
||||
DEFINES += -DHAVE_NETWORKING -DHAVE_CHEEVOS -DRC_DISABLE_LUA -DHAVE_SOCKET_LEGACY -DHAVE_THREADS
|
||||
#DEFINES += -DHAVE_NETWORKING -DHAVE_CHEEVOS -DRC_DISABLE_LUA -DHAVE_SOCKET_LEGACY -DHAVE_THREADS
|
||||
#-DHAVE_SSL -DMBEDTLS_SSL_DEBUG_ALL
|
||||
#ssl is currently incompatible with griffin due to use of the "static" flag on repeating functions that will conflict when included in one file
|
||||
else
|
||||
@ -72,11 +72,11 @@ else
|
||||
HAVE_XMB = 1
|
||||
HAVE_STATIC_VIDEO_FILTERS = 1
|
||||
HAVE_STATIC_AUDIO_FILTERS = 1
|
||||
HAVE_NETWORKING = 1
|
||||
HAVE_CHEEVOS = 1
|
||||
HAVE_SOCKET_LEGACY = 1
|
||||
HAVE_THREADS = 1
|
||||
HAVE_SSL = 1
|
||||
#HAVE_NETWORKING = 1
|
||||
#HAVE_CHEEVOS = 1
|
||||
#HAVE_SOCKET_LEGACY = 1
|
||||
#HAVE_THREADS = 1
|
||||
#HAVE_SSL = 1
|
||||
|
||||
include Makefile.common
|
||||
BLACKLIST :=
|
||||
|
@ -46,6 +46,7 @@ HAVE_FREETYPE = 0
|
||||
HAVE_SWITCH = 1
|
||||
HAVE_LIBNX = 1
|
||||
HAVE_OPENGL = 1
|
||||
HAVE_LANGEXTRA = 1
|
||||
|
||||
ifeq ($(HAVE_OPENGL), 1)
|
||||
HAVE_EGL = 1
|
||||
|
@ -124,8 +124,8 @@ static const audio_driver_t *audio_drivers[] = {
|
||||
&audio_ctr_dsp,
|
||||
#endif
|
||||
#ifdef SWITCH
|
||||
&audio_switch,
|
||||
&audio_switch_thread,
|
||||
&audio_switch,
|
||||
#endif
|
||||
&audio_null,
|
||||
NULL,
|
||||
|
96
command.c
96
command.c
@ -117,12 +117,14 @@ struct cmd_map
|
||||
unsigned id;
|
||||
};
|
||||
|
||||
#ifdef HAVE_COMMAND
|
||||
struct cmd_action_map
|
||||
{
|
||||
const char *str;
|
||||
bool (*action)(const char *arg);
|
||||
const char *arg_desc;
|
||||
};
|
||||
#endif
|
||||
|
||||
struct command
|
||||
{
|
||||
@ -137,9 +139,50 @@ struct command
|
||||
#endif
|
||||
};
|
||||
|
||||
static bool command_version(const char *arg);
|
||||
#if defined(HAVE_COMMAND)
|
||||
static enum cmd_source_t lastcmd_source;
|
||||
#if defined(HAVE_NETWORK_CMD) && defined(HAVE_NETWORKING)
|
||||
static int lastcmd_net_fd;
|
||||
static struct sockaddr_storage lastcmd_net_source;
|
||||
static socklen_t lastcmd_net_source_len;
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_COMMAND) && defined(HAVE_CHEEVOS)
|
||||
#if defined(HAVE_CHEEVOS) && (defined(HAVE_STDIN_CMD) || defined(HAVE_NETWORK_CMD) && defined(HAVE_NETWORKING))
|
||||
static void command_reply(const char * data, size_t len)
|
||||
{
|
||||
switch (lastcmd_source)
|
||||
{
|
||||
case CMD_STDIN:
|
||||
#ifdef HAVE_STDIN_CMD
|
||||
fwrite(data, 1,len, stdout);
|
||||
#endif
|
||||
break;
|
||||
case CMD_NETWORK:
|
||||
#if defined(HAVE_NETWORKING) && defined(HAVE_NETWORK_CMD)
|
||||
sendto(lastcmd_net_fd, data, len, 0,
|
||||
(struct sockaddr*)&lastcmd_net_source, lastcmd_net_source_len);
|
||||
#endif
|
||||
break;
|
||||
case CMD_NONE:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
static bool command_version(const char* arg)
|
||||
{
|
||||
char reply[256] = {0};
|
||||
|
||||
sprintf(reply, "%s\n", PACKAGE_VERSION);
|
||||
#if defined(HAVE_CHEEVOS) && (defined(HAVE_STDIN_CMD) || defined(HAVE_NETWORK_CMD) && defined(HAVE_NETWORKING))
|
||||
command_reply(reply, strlen(reply));
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
#if defined(HAVE_CHEEVOS)
|
||||
static bool command_read_ram(const char *arg);
|
||||
static bool command_write_ram(const char *arg);
|
||||
#endif
|
||||
@ -147,7 +190,7 @@ static bool command_write_ram(const char *arg);
|
||||
static const struct cmd_action_map action_map[] = {
|
||||
{ "SET_SHADER", command_set_shader, "<shader path>" },
|
||||
{ "VERSION", command_version, "No argument"},
|
||||
#if defined(HAVE_COMMAND) && defined(HAVE_CHEEVOS)
|
||||
#if defined(HAVE_CHEEVOS)
|
||||
{ "READ_CORE_RAM", command_read_ram, "<address> <number of bytes>" },
|
||||
{ "WRITE_CORE_RAM", command_write_ram, "<address> <byte1> <byte2> ..." },
|
||||
#endif
|
||||
@ -198,41 +241,9 @@ static const struct cmd_map map[] = {
|
||||
{ "MENU_B", RETRO_DEVICE_ID_JOYPAD_B },
|
||||
{ "MENU_B", RETRO_DEVICE_ID_JOYPAD_B },
|
||||
};
|
||||
|
||||
static enum cmd_source_t lastcmd_source;
|
||||
#if defined(HAVE_NETWORKING) && defined(HAVE_NETWORK_CMD)
|
||||
static int lastcmd_net_fd;
|
||||
static struct sockaddr_storage lastcmd_net_source;
|
||||
static socklen_t lastcmd_net_source_len;
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_CHEEVOS) && (defined(HAVE_STDIN_CMD) || defined(HAVE_NETWORK_CMD) && defined(HAVE_NETWORKING))
|
||||
static bool command_reply(const char * data, size_t len)
|
||||
{
|
||||
switch (lastcmd_source)
|
||||
{
|
||||
case CMD_NONE:
|
||||
break;
|
||||
case CMD_STDIN:
|
||||
#ifdef HAVE_STDIN_CMD
|
||||
fwrite(data, 1,len, stdout);
|
||||
return true;
|
||||
#else
|
||||
break;
|
||||
#endif
|
||||
case CMD_NETWORK:
|
||||
#if defined(HAVE_NETWORKING) && defined(HAVE_NETWORK_CMD)
|
||||
sendto(lastcmd_net_fd, data, len, 0,
|
||||
(struct sockaddr*)&lastcmd_net_source, lastcmd_net_source_len);
|
||||
return true;
|
||||
#else
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
bool command_set_shader(const char *arg)
|
||||
{
|
||||
@ -261,17 +272,6 @@ bool command_set_shader(const char *arg)
|
||||
#endif
|
||||
}
|
||||
|
||||
static bool command_version(const char* arg)
|
||||
{
|
||||
char reply[256] = {0};
|
||||
|
||||
sprintf(reply, "%s\n", PACKAGE_VERSION);
|
||||
#if defined(HAVE_CHEEVOS) && (defined(HAVE_STDIN_CMD) || defined(HAVE_NETWORK_CMD) && defined(HAVE_NETWORKING))
|
||||
command_reply(reply, strlen(reply));
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
#if defined(HAVE_COMMAND) && defined(HAVE_CHEEVOS)
|
||||
#define SMY_CMD_STR "READ_CORE_RAM"
|
||||
@ -646,7 +646,7 @@ bool command_network_new(
|
||||
|
||||
return true;
|
||||
|
||||
#if (defined(HAVE_NETWORK_CMD) && defined(HAVE_NETWORKING)) || defined(HAVE_STDIN_CMD)
|
||||
#if defined(HAVE_NETWORKING) && defined(HAVE_NETWORK_CMD) && defined(HAVE_COMMAND) || defined(HAVE_STDIN_CMD)
|
||||
error:
|
||||
command_free(handle);
|
||||
return false;
|
||||
@ -1670,7 +1670,7 @@ static bool command_event_main_state(unsigned cmd)
|
||||
{
|
||||
retro_ctx_size_info_t info;
|
||||
char msg[128];
|
||||
size_t state_path_size = 8192 * sizeof(char);
|
||||
size_t state_path_size = 16384 * sizeof(char);
|
||||
char *state_path = (char*)malloc(state_path_size);
|
||||
global_t *global = global_get_ptr();
|
||||
bool ret = false;
|
||||
|
10
config.def.h
10
config.def.h
@ -181,7 +181,11 @@ static unsigned swap_interval = 1;
|
||||
/* Threaded video. Will possibly increase performance significantly
|
||||
* at the cost of worse synchronization and latency.
|
||||
*/
|
||||
#if defined(HAVE_LIBNX)
|
||||
static const bool video_threaded = true;
|
||||
#else
|
||||
static const bool video_threaded = false;
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_THREADS)
|
||||
#if defined(GEKKO) || defined(PSP)
|
||||
@ -288,7 +292,11 @@ static bool menu_show_configurations = true;
|
||||
static bool menu_show_help = true;
|
||||
static bool menu_show_quit_retroarch = true;
|
||||
static bool menu_show_reboot = true;
|
||||
#ifdef HAVE_LAKKA_SWITCH
|
||||
static bool menu_show_shutdown = false;
|
||||
#else
|
||||
static bool menu_show_shutdown = true;
|
||||
#endif
|
||||
#if defined(HAVE_LAKKA) || defined(VITA) || defined(_3DS)
|
||||
static bool menu_show_core_updater = false;
|
||||
#else
|
||||
@ -697,6 +705,8 @@ static const unsigned menu_thumbnails_default = 3;
|
||||
|
||||
static const unsigned menu_left_thumbnails_default = 0;
|
||||
|
||||
static const unsigned menu_timedate_style = 5;
|
||||
|
||||
static const bool xmb_vertical_thumbnails = false;
|
||||
|
||||
#ifdef IOS
|
||||
|
@ -300,6 +300,7 @@ enum record_driver_enum
|
||||
enum midi_driver_enum
|
||||
{
|
||||
MIDI_WINMM = RECORD_NULL + 1,
|
||||
MIDI_ALSA,
|
||||
MIDI_NULL
|
||||
};
|
||||
|
||||
@ -411,6 +412,8 @@ static enum record_driver_enum RECORD_DEFAULT_DRIVER = RECORD_NULL;
|
||||
|
||||
#ifdef HAVE_WINMM
|
||||
static enum midi_driver_enum MIDI_DEFAULT_DRIVER = MIDI_WINMM;
|
||||
#elif defined HAVE_ALSA
|
||||
static enum midi_driver_enum MIDI_DEFAULT_DRIVER = MIDI_ALSA;
|
||||
#else
|
||||
static enum midi_driver_enum MIDI_DEFAULT_DRIVER = MIDI_NULL;
|
||||
#endif
|
||||
@ -1049,6 +1052,8 @@ const char *config_get_default_midi(void)
|
||||
{
|
||||
case MIDI_WINMM:
|
||||
return "winmm";
|
||||
case MIDI_ALSA:
|
||||
return "alsa";
|
||||
case MIDI_NULL:
|
||||
break;
|
||||
}
|
||||
@ -1569,6 +1574,7 @@ static struct config_uint_setting *populate_settings_uint(settings_t *settings,
|
||||
#ifdef HAVE_MENU
|
||||
SETTING_UINT("dpi_override_value", &settings->uints.menu_dpi_override_value, true, menu_dpi_override_value, false);
|
||||
SETTING_UINT("menu_thumbnails", &settings->uints.menu_thumbnails, true, menu_thumbnails_default, false);
|
||||
SETTING_UINT("menu_timedate_style", &settings->uints.menu_timedate_style, true, menu_timedate_style, false);
|
||||
#ifdef HAVE_XMB
|
||||
SETTING_UINT("menu_left_thumbnails", &settings->uints.menu_left_thumbnails, true, menu_left_thumbnails_default, false);
|
||||
SETTING_UINT("xmb_alpha_factor", &settings->uints.menu_xmb_alpha_factor, true, xmb_alpha_factor, false);
|
||||
@ -2335,6 +2341,33 @@ error:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#if defined(HAVE_MENU) && defined(HAVE_RGUI)
|
||||
static bool check_menu_driver_compatibility(void)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
char *video_driver = settings->arrays.video_driver;
|
||||
char *menu_driver = settings->arrays.menu_driver;
|
||||
|
||||
if (string_is_equal (menu_driver, "rgui") ||
|
||||
string_is_equal(menu_driver, "null"))
|
||||
return true;
|
||||
|
||||
/* TODO/FIXME - maintenance hazard */
|
||||
if (string_is_equal(video_driver, "d3d9") ||
|
||||
string_is_equal(video_driver, "d3d10") ||
|
||||
string_is_equal(video_driver, "d3d11") ||
|
||||
string_is_equal(video_driver, "d3d12") ||
|
||||
string_is_equal(video_driver, "gl") ||
|
||||
string_is_equal(video_driver, "gx2") ||
|
||||
string_is_equal(video_driver, "vulkan") ||
|
||||
string_is_equal(video_driver, "metal") ||
|
||||
string_is_equal(video_driver, "vita"))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void read_keybinds_keyboard(config_file_t *conf, unsigned user,
|
||||
unsigned idx, struct retro_keybind *bind)
|
||||
{
|
||||
@ -3040,6 +3073,11 @@ static bool config_load_file(const char *path, bool set_defaults,
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(HAVE_MENU) && defined(HAVE_RGUI)
|
||||
if (!check_menu_driver_compatibility())
|
||||
strlcpy(settings->arrays.menu_driver, "rgui", sizeof(settings->arrays.menu_driver));
|
||||
#endif
|
||||
|
||||
frontend_driver_set_sustained_performance_mode(settings->bools.sustained_performance_mode);
|
||||
recording_driver_update_streaming_url();
|
||||
|
||||
|
@ -393,6 +393,7 @@ typedef struct settings
|
||||
unsigned video_record_scale_factor;
|
||||
unsigned video_stream_scale_factor;
|
||||
|
||||
unsigned menu_timedate_style;
|
||||
unsigned menu_thumbnails;
|
||||
unsigned menu_left_thumbnails;
|
||||
unsigned menu_dpi_override_value;
|
||||
|
23
dynamic.c
23
dynamic.c
@ -955,16 +955,10 @@ static bool dynamic_request_hw_context(enum retro_hw_context_type type,
|
||||
break;
|
||||
|
||||
case RETRO_HW_CONTEXT_OPENGL_CORE:
|
||||
{
|
||||
gfx_ctx_flags_t flags;
|
||||
flags.flags = 0;
|
||||
BIT32_SET(flags.flags, GFX_CTX_FLAGS_GL_CORE_CONTEXT);
|
||||
|
||||
video_context_driver_set_flags(&flags);
|
||||
|
||||
RARCH_LOG("Requesting core OpenGL context (%u.%u).\n",
|
||||
major, minor);
|
||||
}
|
||||
/* TODO/FIXME - we should do a check here to see if
|
||||
* the requested core GL version is supported */
|
||||
RARCH_LOG("Requesting core OpenGL context (%u.%u).\n",
|
||||
major, minor);
|
||||
break;
|
||||
#endif
|
||||
|
||||
@ -1374,6 +1368,15 @@ bool rarch_environment_cb(unsigned cmd, void *data)
|
||||
if (!dynamic_verify_hw_context(cb->context_type, cb->version_minor, cb->version_major))
|
||||
return false;
|
||||
|
||||
if (cb->context_type == RETRO_HW_CONTEXT_OPENGL_CORE)
|
||||
{
|
||||
gfx_ctx_flags_t flags;
|
||||
flags.flags = 0;
|
||||
BIT32_SET(flags.flags, GFX_CTX_FLAGS_GL_CORE_CONTEXT);
|
||||
|
||||
video_context_driver_set_flags(&flags);
|
||||
}
|
||||
|
||||
cb->get_current_framebuffer = video_driver_get_current_framebuffer;
|
||||
cb->get_proc_address = video_driver_get_proc_address;
|
||||
|
||||
|
@ -57,7 +57,7 @@ static uint64_t frontend_switch_get_mem_used(void);
|
||||
|
||||
#ifdef HAVE_LIBNX
|
||||
|
||||
// Splash
|
||||
/* Splash */
|
||||
static uint32_t *splashData = NULL;
|
||||
|
||||
static bool psmInitialized = false;
|
||||
@ -66,7 +66,7 @@ static bool psmInitialized = false;
|
||||
extern bool nxlink_connected;
|
||||
#endif
|
||||
|
||||
#endif // HAVE_LIBNX
|
||||
#endif /* HAVE_LIBNX */
|
||||
|
||||
static void get_first_valid_core(char *path_return)
|
||||
{
|
||||
@ -195,7 +195,7 @@ static void frontend_switch_deinit(void *data)
|
||||
socketExit();
|
||||
#endif
|
||||
|
||||
// Splash
|
||||
/* Splash */
|
||||
if (splashData)
|
||||
{
|
||||
free(splashData);
|
||||
@ -325,33 +325,33 @@ static void frontend_switch_exitspawn(char *s, size_t len)
|
||||
|
||||
void argb_to_rgba8(uint32_t *buff, uint32_t height, uint32_t width)
|
||||
{
|
||||
// Convert
|
||||
for (uint32_t h = 0; h < height; h++)
|
||||
uint32_t h, w;
|
||||
/* Convert */
|
||||
for (h = 0; h < height; h++)
|
||||
{
|
||||
for (uint32_t w = 0; w < width; w++)
|
||||
for (w = 0; w < width; w++)
|
||||
{
|
||||
uint32_t offset = (h * width) + w;
|
||||
uint32_t c = buff[offset];
|
||||
uint32_t c = buff[offset];
|
||||
|
||||
uint32_t a = (uint32_t)((c & 0xff000000) >> 24);
|
||||
uint32_t r = (uint32_t)((c & 0x00ff0000) >> 16);
|
||||
uint32_t g = (uint32_t)((c & 0x0000ff00) >> 8);
|
||||
uint32_t b = (uint32_t)(c & 0x000000ff);
|
||||
uint32_t a = (uint32_t)((c & 0xff000000) >> 24);
|
||||
uint32_t r = (uint32_t)((c & 0x00ff0000) >> 16);
|
||||
uint32_t g = (uint32_t)((c & 0x0000ff00) >> 8);
|
||||
uint32_t b = (uint32_t)(c & 0x000000ff);
|
||||
|
||||
buff[offset] = RGBA8(r, g, b, a);
|
||||
buff[offset] = RGBA8(r, g, b, a);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void frontend_switch_showsplash()
|
||||
void frontend_switch_showsplash(void)
|
||||
{
|
||||
printf("[Splash] Showing splashScreen\n");
|
||||
|
||||
if (splashData)
|
||||
{
|
||||
uint32_t width, height;
|
||||
width = height = 0;
|
||||
|
||||
uint32_t width = 0;
|
||||
uint32_t height = 0;
|
||||
uint32_t *frambuffer = (uint32_t *)gfxGetFramebuffer(&width, &height);
|
||||
|
||||
gfx_slow_swizzling_blit(frambuffer, splashData, width, height, 0, 0, false);
|
||||
@ -362,15 +362,15 @@ void frontend_switch_showsplash()
|
||||
}
|
||||
}
|
||||
|
||||
// From rpng_test.c
|
||||
bool rpng_load_image_argb(const char *path, uint32_t **data, unsigned *width, unsigned *height)
|
||||
/* From rpng_test.c */
|
||||
bool rpng_load_image_argb(const char *path,
|
||||
uint32_t **data, unsigned *width, unsigned *height)
|
||||
{
|
||||
int retval;
|
||||
size_t file_len;
|
||||
bool ret = true;
|
||||
rpng_t *rpng = NULL;
|
||||
void *ptr = NULL;
|
||||
|
||||
bool ret = true;
|
||||
rpng_t *rpng = NULL;
|
||||
void *ptr = NULL;
|
||||
struct nbio_t *handle = (struct nbio_t *)nbio_open(path, NBIO_READ);
|
||||
|
||||
if (!handle)
|
||||
@ -463,7 +463,7 @@ ssize_t readlink(const char *restrict path, char *restrict buf, size_t bufsize)
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Taken from glibc
|
||||
/* Taken from glibc */
|
||||
char *realpath(const char *name, char *resolved)
|
||||
{
|
||||
char *rpath, *dest, *extra_buf = NULL;
|
||||
@ -592,14 +592,14 @@ error:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#endif // HAVE_LIBNX
|
||||
#endif /* HAVE_LIBNX */
|
||||
|
||||
static void frontend_switch_shutdown(bool unused)
|
||||
{
|
||||
(void)unused;
|
||||
}
|
||||
|
||||
// runloop_get_system_info isnt initialized that early..
|
||||
/* 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)
|
||||
@ -608,21 +608,21 @@ static void frontend_switch_init(void *data)
|
||||
|
||||
#ifdef HAVE_LIBNX
|
||||
#ifndef HAVE_OPENGL
|
||||
// Init Resolution before initDefault
|
||||
/* Init Resolution before initDefault */
|
||||
gfxInitResolution(1280, 720);
|
||||
|
||||
gfxInitDefault();
|
||||
gfxSetMode(GfxMode_TiledDouble);
|
||||
|
||||
gfxConfigureTransform(0);
|
||||
#endif // HAVE_OPENGL
|
||||
#endif /* HAVE_OPENGL */
|
||||
#ifdef NXLINK
|
||||
socketInitializeDefault();
|
||||
nxlink_connected = nxlinkStdio() != -1;
|
||||
#ifndef IS_SALAMANDER
|
||||
verbosity_enable();
|
||||
#endif // IS_SALAMANDER
|
||||
#endif // NXLINK
|
||||
#endif /* IS_SALAMANDER */
|
||||
#endif /* NXLINK */
|
||||
|
||||
Result rc;
|
||||
rc = psmInitialize();
|
||||
@ -642,8 +642,8 @@ static void frontend_switch_init(void *data)
|
||||
uint32_t width, height;
|
||||
width = height = 0;
|
||||
|
||||
// Load splash
|
||||
#ifndef HAVE_OPENGL
|
||||
/* Load splash */
|
||||
if (!splashData)
|
||||
{
|
||||
if (sys_info)
|
||||
@ -685,12 +685,12 @@ static void frontend_switch_init(void *data)
|
||||
frontend_switch_showsplash();
|
||||
}
|
||||
#endif
|
||||
#endif // HAVE_LIBNX (splash)
|
||||
#endif /* HAVE_LIBNX (splash) */
|
||||
}
|
||||
|
||||
static int frontend_switch_get_rating(void)
|
||||
{
|
||||
return 1000;
|
||||
return 11;
|
||||
}
|
||||
|
||||
enum frontend_architecture frontend_switch_get_architecture(void)
|
||||
@ -718,7 +718,7 @@ static int frontend_switch_parse_drive_list(void *data, bool load_content)
|
||||
static uint64_t frontend_switch_get_mem_total(void)
|
||||
{
|
||||
uint64_t memoryTotal = 0;
|
||||
svcGetInfo(&memoryTotal, 6, 0xffff8001, 0); // avaiable
|
||||
svcGetInfo(&memoryTotal, 6, 0xffff8001, 0);
|
||||
memoryTotal += frontend_switch_get_mem_used();
|
||||
|
||||
return memoryTotal;
|
||||
@ -727,7 +727,7 @@ static uint64_t frontend_switch_get_mem_total(void)
|
||||
static uint64_t frontend_switch_get_mem_used(void)
|
||||
{
|
||||
uint64_t memoryUsed = 0;
|
||||
svcGetInfo(&memoryUsed, 7, 0xffff8001, 0); // used
|
||||
svcGetInfo(&memoryUsed, 7, 0xffff8001, 0);
|
||||
|
||||
return memoryUsed;
|
||||
}
|
||||
@ -769,7 +769,7 @@ static void frontend_switch_get_os(char *s, size_t len, int *major, int *minor)
|
||||
strlcpy(s, "Horizon OS", len);
|
||||
|
||||
#ifdef HAVE_LIBNX
|
||||
// There is pretty sure a better way, but this will do just fine
|
||||
/* There is pretty sure a better way, but this will do just fine */
|
||||
if (kernelAbove600())
|
||||
{
|
||||
*major = 6;
|
||||
@ -796,18 +796,18 @@ static void frontend_switch_get_os(char *s, size_t len, int *major, int *minor)
|
||||
}
|
||||
else
|
||||
{
|
||||
// either 1.0 or > 5.x
|
||||
/* either 1.0 or > 5.x */
|
||||
*major = 1;
|
||||
*minor = 0;
|
||||
}
|
||||
#else
|
||||
// defaults in case we error out
|
||||
/* defaults in case we error out */
|
||||
*major = 0;
|
||||
*minor = 0;
|
||||
|
||||
char firmware_version[0x100];
|
||||
|
||||
result_t r; // used by LIB_ASSERT_OK macros
|
||||
result_t r; /* used by LIB_ASSERT_OK macros */
|
||||
LIB_ASSERT_OK(fail, sm_init());
|
||||
|
||||
ipc_object_t set_sys;
|
||||
@ -835,7 +835,7 @@ fail:
|
||||
|
||||
static void frontend_switch_get_name(char *s, size_t len)
|
||||
{
|
||||
// TODO: Add Mariko at some point
|
||||
/* TODO: Add Mariko at some point */
|
||||
strlcpy(s, "Nintendo Switch", len);
|
||||
}
|
||||
|
||||
@ -853,12 +853,12 @@ frontend_ctx_driver_t frontend_ctx_switch =
|
||||
#else
|
||||
frontend_switch_set_fork,
|
||||
#endif
|
||||
#else // HAVE_LIBNX
|
||||
#else /* HAVE_LIBNX */
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
#endif // HAVE_LIBNX
|
||||
#endif /* HAVE_LIBNX */
|
||||
frontend_switch_shutdown,
|
||||
frontend_switch_get_name,
|
||||
frontend_switch_get_os,
|
||||
|
@ -59,12 +59,12 @@ typedef struct
|
||||
} dispserv_win32_t;
|
||||
|
||||
/*
|
||||
NOTE: When an application displays a window, its taskbar button is created
|
||||
by the system. When the button is in place, the taskbar sends a
|
||||
TaskbarButtonCreated message to the window. Its value is computed by
|
||||
calling RegisterWindowMessage(L("TaskbarButtonCreated")). That message must
|
||||
be received by your application before it calls any ITaskbarList3 method.
|
||||
*/
|
||||
NOTE: When an application displays a window, its taskbar button is created
|
||||
by the system. When the button is in place, the taskbar sends a
|
||||
TaskbarButtonCreated message to the window. Its value is computed by
|
||||
calling RegisterWindowMessage(L("TaskbarButtonCreated")). That message must
|
||||
be received by your application before it calls any ITaskbarList3 method.
|
||||
*/
|
||||
|
||||
static unsigned win32_orig_width = 0;
|
||||
static unsigned win32_orig_height = 0;
|
||||
@ -105,10 +105,10 @@ static void* win32_display_server_init(void)
|
||||
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 )
|
||||
|
||||
if (win32_orig_width > 0 && win32_orig_height > 0)
|
||||
video_display_server_switch_resolution(win32_orig_width, win32_orig_height,
|
||||
win32_orig_refresh , (float)win32_orig_refresh, crt_center );
|
||||
win32_orig_refresh, (float)win32_orig_refresh, crt_center );
|
||||
|
||||
#ifdef HAS_TASKBAR_EXT
|
||||
if (g_taskbarList && win32_taskbar_is_created())
|
||||
@ -124,7 +124,7 @@ static void win32_display_server_destroy(void *data)
|
||||
|
||||
static bool win32_display_server_set_window_opacity(void *data, unsigned opacity)
|
||||
{
|
||||
HWND hwnd = win32_get_window();
|
||||
HWND hwnd = win32_get_window();
|
||||
dispserv_win32_t *serv = (dispserv_win32_t*)data;
|
||||
|
||||
if (serv)
|
||||
@ -132,11 +132,11 @@ static bool win32_display_server_set_window_opacity(void *data, unsigned opacity
|
||||
|
||||
#if defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x0500
|
||||
/* Set window transparency on Windows 2000 and above */
|
||||
if(opacity < 100)
|
||||
if (opacity < 100)
|
||||
{
|
||||
SetWindowLongPtr(hwnd,
|
||||
GWL_EXSTYLE,
|
||||
GetWindowLongPtr(hwnd, GWL_EXSTYLE) | WS_EX_LAYERED);
|
||||
GWL_EXSTYLE,
|
||||
GetWindowLongPtr(hwnd, GWL_EXSTYLE) | WS_EX_LAYERED);
|
||||
return SetLayeredWindowAttributes(hwnd, 0, (255 * opacity) / 100, LWA_ALPHA);
|
||||
}
|
||||
|
||||
@ -151,7 +151,7 @@ static bool win32_display_server_set_window_opacity(void *data, unsigned opacity
|
||||
|
||||
static bool win32_display_server_set_window_progress(void *data, int progress, bool finished)
|
||||
{
|
||||
HWND hwnd = win32_get_window();
|
||||
HWND hwnd = win32_get_window();
|
||||
dispserv_win32_t *serv = (dispserv_win32_t*)data;
|
||||
|
||||
if (serv)
|
||||
@ -164,23 +164,23 @@ static bool win32_display_server_set_window_progress(void *data, int progress, b
|
||||
if (progress == -1)
|
||||
{
|
||||
if (ITaskbarList3_SetProgressState(
|
||||
g_taskbarList, hwnd, TBPF_INDETERMINATE) != S_OK)
|
||||
g_taskbarList, hwnd, TBPF_INDETERMINATE) != S_OK)
|
||||
return false;
|
||||
}
|
||||
else if (finished)
|
||||
{
|
||||
if (ITaskbarList3_SetProgressState(
|
||||
g_taskbarList, hwnd, TBPF_NOPROGRESS) != S_OK)
|
||||
g_taskbarList, hwnd, TBPF_NOPROGRESS) != S_OK)
|
||||
return false;
|
||||
}
|
||||
else if (progress >= 0)
|
||||
{
|
||||
if (ITaskbarList3_SetProgressState(
|
||||
g_taskbarList, hwnd, TBPF_NORMAL) != S_OK)
|
||||
g_taskbarList, hwnd, TBPF_NORMAL) != S_OK)
|
||||
return false;
|
||||
|
||||
if (ITaskbarList3_SetProgressValue(
|
||||
g_taskbarList, hwnd, progress, 100) != S_OK)
|
||||
g_taskbarList, hwnd, progress, 100) != S_OK)
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
@ -195,7 +195,7 @@ static bool win32_display_server_set_window_decorations(void *data, bool on)
|
||||
if (serv)
|
||||
serv->decorations = on;
|
||||
|
||||
/* menu_setting performs a reinit instead to properly
|
||||
/* menu_setting performs a reinit instead to properly
|
||||
* apply decoration changes */
|
||||
|
||||
return true;
|
||||
@ -216,74 +216,73 @@ static bool win32_display_server_set_resolution(void *data,
|
||||
|
||||
if (!serv)
|
||||
return false;
|
||||
|
||||
|
||||
EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &curDevmode);
|
||||
|
||||
|
||||
if (win32_orig_width == 0)
|
||||
win32_orig_width = GetSystemMetrics(SM_CXSCREEN);
|
||||
win32_orig_refresh = curDevmode.dmDisplayFrequency;
|
||||
win32_orig_width = GetSystemMetrics(SM_CXSCREEN);
|
||||
win32_orig_refresh = curDevmode.dmDisplayFrequency;
|
||||
if (win32_orig_height == 0)
|
||||
win32_orig_height = GetSystemMetrics(SM_CYSCREEN);
|
||||
win32_orig_height = GetSystemMetrics(SM_CYSCREEN);
|
||||
|
||||
/* Used to stop super resolution bug */
|
||||
if (width == curDevmode.dmPelsWidth)
|
||||
width = 0;
|
||||
if (width == 0)
|
||||
width = 0;
|
||||
if (width == 0)
|
||||
width = curDevmode.dmPelsWidth;
|
||||
if (height == 0)
|
||||
if (height == 0)
|
||||
height = curDevmode.dmPelsHeight;
|
||||
if (depth == 0)
|
||||
if (depth == 0)
|
||||
depth = curDevmode.dmBitsPerPel;
|
||||
if (freq == 0)
|
||||
if (freq == 0)
|
||||
freq = curDevmode.dmDisplayFrequency;
|
||||
|
||||
for (iModeNum = 0; ; iModeNum++)
|
||||
for (iModeNum = 0;; iModeNum++)
|
||||
{
|
||||
if (!EnumDisplaySettings(NULL, iModeNum, &devmode))
|
||||
if (!EnumDisplaySettings(NULL, iModeNum, &devmode))
|
||||
break;
|
||||
|
||||
if (devmode.dmPelsWidth != width)
|
||||
if (devmode.dmPelsWidth != width)
|
||||
continue;
|
||||
|
||||
if (devmode.dmPelsHeight != height)
|
||||
if (devmode.dmPelsHeight != height)
|
||||
continue;
|
||||
|
||||
if (devmode.dmBitsPerPel != depth)
|
||||
if (devmode.dmBitsPerPel != depth)
|
||||
continue;
|
||||
|
||||
if (devmode.dmDisplayFrequency != freq)
|
||||
if (devmode.dmDisplayFrequency != freq)
|
||||
continue;
|
||||
|
||||
devmode.dmFields |=
|
||||
DM_PELSWIDTH | DM_PELSHEIGHT | DM_BITSPERPEL | DM_DISPLAYFREQUENCY;
|
||||
res =
|
||||
win32_change_display_settings(NULL, &devmode, CDS_TEST);
|
||||
devmode.dmFields |=
|
||||
DM_PELSWIDTH | DM_PELSHEIGHT | DM_BITSPERPEL | DM_DISPLAYFREQUENCY;
|
||||
res =
|
||||
win32_change_display_settings(NULL, &devmode, CDS_TEST);
|
||||
|
||||
switch (res)
|
||||
switch (res)
|
||||
{
|
||||
case DISP_CHANGE_SUCCESSFUL:
|
||||
res = win32_change_display_settings(NULL, &devmode, flags);
|
||||
switch (res)
|
||||
{
|
||||
case DISP_CHANGE_SUCCESSFUL:
|
||||
res = win32_change_display_settings(NULL, &devmode, flags);
|
||||
switch (res)
|
||||
{
|
||||
case DISP_CHANGE_SUCCESSFUL:
|
||||
return true;
|
||||
case DISP_CHANGE_NOTUPDATED:
|
||||
return true;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case DISP_CHANGE_RESTART:
|
||||
break;
|
||||
return true;
|
||||
case DISP_CHANGE_NOTUPDATED:
|
||||
return true;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case DISP_CHANGE_RESTART:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
const video_display_server_t dispserv_win32 = {
|
||||
win32_display_server_init,
|
||||
win32_display_server_destroy,
|
||||
@ -294,4 +293,3 @@ const video_display_server_t dispserv_win32 = {
|
||||
NULL, /* get_output_options */
|
||||
"win32"
|
||||
};
|
||||
|
||||
|
@ -50,28 +50,29 @@ static void* x11_display_server_init(void)
|
||||
|
||||
static void x11_display_server_destroy(void *data)
|
||||
{
|
||||
dispserv_x11_t *dispserv = (dispserv_x11_t*)data;
|
||||
dispserv_x11_t *dispserv = (dispserv_x11_t*)data;
|
||||
int i = 0;
|
||||
if (crt_en == true)
|
||||
{
|
||||
sprintf(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);
|
||||
system(output);
|
||||
sprintf(output,"xrandr --delmode %s-%d %s", "VGA",i ,old_mode);
|
||||
system(output);
|
||||
|
||||
sprintf(output,"xrandr --delmode %s%d %s", "DVI",i ,old_mode);
|
||||
system(output);
|
||||
sprintf(output,"xrandr --delmode %s-%d %s", "DVI",i ,old_mode);
|
||||
system(output);
|
||||
}
|
||||
|
||||
sprintf(output,"xrandr --rmmode %s", old_mode);
|
||||
system(output);
|
||||
if (crt_en)
|
||||
{
|
||||
sprintf(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);
|
||||
system(output);
|
||||
sprintf(output, "xrandr --delmode %s-%d %s", "VGA", i, old_mode);
|
||||
system(output);
|
||||
|
||||
sprintf(output, "xrandr --delmode %s%d %s", "DVI", i, old_mode);
|
||||
system(output);
|
||||
sprintf(output, "xrandr --delmode %s-%d %s", "DVI", i, old_mode);
|
||||
system(output);
|
||||
}
|
||||
|
||||
sprintf(output, "xrandr --rmmode %s", old_mode);
|
||||
system(output);
|
||||
}
|
||||
|
||||
if (dispserv)
|
||||
@ -90,7 +91,7 @@ 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
|
||||
else
|
||||
XChangeProperty(g_x11_dpy, g_x11_win, net_wm_opacity, cardinal, 32, PropModeReplace, (const unsigned char*)&opacity, 1);
|
||||
|
||||
return true;
|
||||
@ -126,62 +127,62 @@ static bool x11_display_server_set_resolution(void *data,
|
||||
float pixel_clock = 0;
|
||||
|
||||
crt_en = true;
|
||||
|
||||
/* set core refresh from hz */
|
||||
video_monitor_set_refresh_rate(hz);
|
||||
|
||||
/* following code is the mode line genorator */
|
||||
|
||||
hsp = width*1.140;
|
||||
hfp = width*1.055;
|
||||
/* set core refresh from hz */
|
||||
video_monitor_set_refresh_rate(hz);
|
||||
|
||||
/* following code is the mode line genorator */
|
||||
|
||||
hsp = width * 1.140;
|
||||
hfp = width * 1.055;
|
||||
|
||||
pwidth = width;
|
||||
|
||||
if (height < 400 && width > 400 )
|
||||
pwidth = width/2;
|
||||
|
||||
if (height < 400 && width > 400)
|
||||
pwidth = width / 2;
|
||||
|
||||
roundw = roundf((float)pwidth/(float)height * 100)/100;
|
||||
roundw = roundf((float)pwidth / (float)height * 100) / 100;
|
||||
|
||||
if (height > width ) {
|
||||
roundw = roundf((float)height/(float)width * 100)/100;
|
||||
if (height > width)
|
||||
{
|
||||
roundw = roundf((float)height / (float)width * 100) / 100;
|
||||
}
|
||||
|
||||
if (roundw > 1.35)
|
||||
roundw = 1.25;
|
||||
|
||||
if (roundw < 1.20)
|
||||
if (roundw < 1.20)
|
||||
roundw = 1.34;
|
||||
|
||||
hbp = width*roundw-8;
|
||||
hbp = width * roundw - 8;
|
||||
hmax = hbp;
|
||||
|
||||
|
||||
if (height < 241)
|
||||
{
|
||||
{
|
||||
vmax = 261;
|
||||
}
|
||||
if (height < 241 && hz > 56 && hz < 58)
|
||||
{
|
||||
{
|
||||
vmax = 280;
|
||||
}
|
||||
if (height < 241 && hz < 55)
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
@ -202,33 +203,32 @@ static bool x11_display_server_set_resolution(void *data,
|
||||
{
|
||||
vmax = 624;
|
||||
}
|
||||
if (height > 300)
|
||||
if (height > 300)
|
||||
{
|
||||
pdefault = pdefault*2;
|
||||
pdefault = pdefault * 2;
|
||||
}
|
||||
|
||||
|
||||
vfp = height+((vmax-height)/2)-pdefault;
|
||||
vfp = height + ((vmax - height) / 2) - pdefault;
|
||||
|
||||
if (height < 300)
|
||||
{
|
||||
vsp = vfp+3; /* needs to me 3 for progressive */
|
||||
}
|
||||
vsp = vfp + 3; /* needs to me 3 for progressive */
|
||||
}
|
||||
if (height > 300)
|
||||
{
|
||||
vsp = vfp+6; /* needs to me 6 for interlaced */
|
||||
vsp = vfp + 6; /* needs to me 6 for interlaced */
|
||||
}
|
||||
|
||||
|
||||
vbp = vmax;
|
||||
|
||||
if (height < 300)
|
||||
{
|
||||
pixel_clock = (hmax*vmax*hz)/1000000;
|
||||
pixel_clock = (hmax * vmax * hz) / 1000000;
|
||||
}
|
||||
|
||||
|
||||
if (height > 300)
|
||||
{
|
||||
pixel_clock = ((hmax*vmax*hz)/1000000)/2;
|
||||
pixel_clock = ((hmax * vmax * hz) / 1000000) / 2;
|
||||
}
|
||||
/* above code is the modeline genorator */
|
||||
|
||||
@ -237,60 +237,63 @@ static bool x11_display_server_set_resolution(void *data,
|
||||
{
|
||||
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);
|
||||
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 */
|
||||
for (i =0; i < 3; i++)
|
||||
{
|
||||
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);
|
||||
system(output);
|
||||
}
|
||||
for (i =0; i < 3; i++)
|
||||
{
|
||||
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);
|
||||
system(output);
|
||||
}
|
||||
for (i =0; i < 3; i++)
|
||||
{
|
||||
snprintf(output, sizeof(output), "xrandr --addmode %s%d %s", "VGA",i ,new_mode);
|
||||
system(output);
|
||||
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);
|
||||
system(output);
|
||||
snprintf(output, sizeof(output), "xrandr --delmode %s-%d %s", "VGA",i ,old_mode);
|
||||
system(output);
|
||||
}
|
||||
|
||||
snprintf(output, sizeof(output), "xrandr -s %s", new_mode);
|
||||
/* 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 */
|
||||
for (i = 0; i < 3; i++)
|
||||
{
|
||||
snprintf(output, sizeof(output), "xrandr --addmode %s%d %s", "DVI", i, new_mode);
|
||||
system(output);
|
||||
/* remove old mode */
|
||||
snprintf(output, sizeof(output), "xrandr --rmmode %s", old_mode);
|
||||
system(output);
|
||||
system("xdotool windowactivate $(xdotool search --class RetroArch)"); /* needs xdotool installed. needed to recaputure window. */
|
||||
/* 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 recaputure window. */
|
||||
/* Second run needed as some times it runs to fast to capture first time */
|
||||
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);
|
||||
system(output);
|
||||
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);
|
||||
system(output);
|
||||
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);
|
||||
system(output);
|
||||
snprintf(output, sizeof(output), "xrandr --delmode %s-%d %s", "VGA", i, old_mode);
|
||||
system(output);
|
||||
}
|
||||
|
||||
return true;
|
||||
snprintf(output, sizeof(output), "xrandr -s %s", new_mode);
|
||||
system(output);
|
||||
|
||||
/* remove old mode */
|
||||
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. */
|
||||
|
||||
/* 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. */
|
||||
/* 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)
|
||||
@ -309,4 +312,3 @@ const video_display_server_t dispserv_x11 = {
|
||||
x11_display_server_get_output_options,
|
||||
"x11"
|
||||
};
|
||||
|
||||
|
@ -953,7 +953,7 @@ static bool gl_frame(void *data, const void *frame,
|
||||
return false;
|
||||
|
||||
#ifdef HAVE_LIBNX
|
||||
// Should be called once per frame
|
||||
/* Should be called once per frame */
|
||||
if(!appletMainLoop())
|
||||
return false;
|
||||
#endif
|
||||
@ -1506,31 +1506,38 @@ static const gfx_ctx_driver_t *gl_get_context(gl_t *gl)
|
||||
struct retro_hw_render_callback *hwr = video_driver_get_hw_context();
|
||||
unsigned major = hwr->version_major;
|
||||
unsigned minor = hwr->version_minor;
|
||||
enum retro_hw_context_type ctx_type = hwr->context_type;
|
||||
bool hw_context_in_use = ctx_type != RETRO_HW_CONTEXT_NONE;
|
||||
|
||||
#ifdef HAVE_OPENGLES
|
||||
api = GFX_CTX_OPENGL_ES_API;
|
||||
api_name = "OpenGL ES 2.0";
|
||||
|
||||
if (hwr->context_type == RETRO_HW_CONTEXT_OPENGLES3)
|
||||
switch (ctx_type)
|
||||
{
|
||||
major = 3;
|
||||
minor = 0;
|
||||
api_name = "OpenGL ES 3.0";
|
||||
case RETRO_HW_CONTEXT_OPENGLES3:
|
||||
major = 3;
|
||||
minor = 0;
|
||||
api_name = "OpenGL ES 3.0";
|
||||
break;
|
||||
case RETRO_HW_CONTEXT_OPENGLES_VERSION:
|
||||
api_name = "OpenGL ES 3.1+";
|
||||
break;
|
||||
case RETRO_HW_CONTEXT_NONE:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
else if (hwr->context_type == RETRO_HW_CONTEXT_OPENGLES_VERSION)
|
||||
api_name = "OpenGL ES 3.1+";
|
||||
#else
|
||||
api = GFX_CTX_OPENGL_API;
|
||||
api_name = "OpenGL";
|
||||
api = GFX_CTX_OPENGL_API;
|
||||
api_name = "OpenGL";
|
||||
#endif
|
||||
|
||||
(void)api_name;
|
||||
|
||||
gl_shared_context_use = settings->bools.video_shared_context
|
||||
&& hwr->context_type != RETRO_HW_CONTEXT_NONE;
|
||||
&& hw_context_in_use;
|
||||
|
||||
if ( (libretro_get_shared_context())
|
||||
&& (hwr->context_type != RETRO_HW_CONTEXT_NONE))
|
||||
if (libretro_get_shared_context() && hw_context_in_use)
|
||||
gl_shared_context_use = true;
|
||||
|
||||
return video_context_driver_init_first(gl,
|
||||
|
@ -1,210 +1,206 @@
|
||||
/* CRT SwitchRes Core
|
||||
* Copyright (C) 2018 Alphanu / Ben Templeman.
|
||||
*
|
||||
* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
||||
* Copyright (C) 2011-2017 - Daniel De Matteis
|
||||
*
|
||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with RetroArch.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include <stddef.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "video_driver.h"
|
||||
#include "video_crt_switch.h"
|
||||
#include "video_display_server.h"
|
||||
|
||||
static unsigned ra_core_width = 0;
|
||||
static unsigned ra_core_height = 0;
|
||||
static unsigned ra_tmp_width = 0;
|
||||
static unsigned ra_tmp_height = 0;
|
||||
static unsigned ra_set_core_hz = 0;
|
||||
static unsigned orig_width = 0;
|
||||
static unsigned orig_height = 0;
|
||||
static int crt_center_adjust = 0;
|
||||
|
||||
static bool first_run = true;
|
||||
|
||||
static float ra_tmp_core_hz = 0.0f;
|
||||
static float fly_aspect = 0.0f;
|
||||
static float ra_core_hz = 0.0f;
|
||||
|
||||
static void crt_check_first_run(void)
|
||||
{
|
||||
if (!first_run)
|
||||
return;
|
||||
|
||||
|
||||
|
||||
first_run = false;
|
||||
}
|
||||
|
||||
static void switch_crt_hz(void)
|
||||
{
|
||||
if (ra_core_hz == ra_tmp_core_hz)
|
||||
return;
|
||||
/* set hz float to an int for windows switching */
|
||||
if (ra_core_hz < 100)
|
||||
{
|
||||
if (ra_core_hz < 53)
|
||||
ra_set_core_hz = 50;
|
||||
if (ra_core_hz >= 53 && ra_core_hz < 57)
|
||||
ra_set_core_hz = 55;
|
||||
if (ra_core_hz >= 57)
|
||||
ra_set_core_hz = 60;
|
||||
}
|
||||
|
||||
if (ra_core_hz > 100)
|
||||
{
|
||||
if (ra_core_hz < 106)
|
||||
ra_set_core_hz = 120;
|
||||
if (ra_core_hz >= 106 && ra_core_hz < 114)
|
||||
ra_set_core_hz = 110;
|
||||
if (ra_core_hz >= 114)
|
||||
ra_set_core_hz = 120;
|
||||
}
|
||||
|
||||
video_monitor_set_refresh_rate(ra_set_core_hz);
|
||||
|
||||
ra_tmp_core_hz = ra_core_hz;
|
||||
}
|
||||
|
||||
|
||||
void crt_aspect_ratio_switch(unsigned width, unsigned height)
|
||||
{
|
||||
/* send aspect float to videeo_driver */
|
||||
fly_aspect = (float)width / height;
|
||||
video_driver_set_aspect_ratio_value((float)fly_aspect);
|
||||
}
|
||||
|
||||
static void switch_res_crt(unsigned width, unsigned height)
|
||||
{
|
||||
if (height > 100)
|
||||
{
|
||||
video_display_server_switch_resolution(width, height,
|
||||
ra_set_core_hz, ra_core_hz, crt_center_adjust);
|
||||
video_driver_apply_state_changes();
|
||||
}
|
||||
}
|
||||
|
||||
/* Create correct aspect to fit video if resolution does not exist */
|
||||
static void crt_screen_setup_aspect(unsigned width, unsigned height)
|
||||
{
|
||||
|
||||
switch_crt_hz();
|
||||
/* get original resolution of core */
|
||||
if (height == 4)
|
||||
{
|
||||
/* detect menu only */
|
||||
if (width < 1920)
|
||||
width = 320;
|
||||
|
||||
height = 240;
|
||||
|
||||
crt_aspect_ratio_switch(width, height);
|
||||
}
|
||||
|
||||
if (height < 200 && height != 144)
|
||||
{
|
||||
crt_aspect_ratio_switch(width, height);
|
||||
height = 200;
|
||||
}
|
||||
|
||||
if (height > 200)
|
||||
crt_aspect_ratio_switch(width, height);
|
||||
|
||||
if (height == 144 && ra_set_core_hz == 50)
|
||||
{
|
||||
height = 288;
|
||||
crt_aspect_ratio_switch(width, height);
|
||||
}
|
||||
|
||||
if (height > 200 && height < 224)
|
||||
{
|
||||
crt_aspect_ratio_switch(width, height);
|
||||
height = 224;
|
||||
}
|
||||
|
||||
if (height > 224 && height < 240)
|
||||
{
|
||||
crt_aspect_ratio_switch(width, height);
|
||||
height = 240;
|
||||
}
|
||||
|
||||
if (height > 240 && height < 255)
|
||||
{
|
||||
crt_aspect_ratio_switch(width, height);
|
||||
height = 254;
|
||||
}
|
||||
|
||||
if (height == 528 && ra_set_core_hz == 60)
|
||||
{
|
||||
crt_aspect_ratio_switch(width, height);
|
||||
height = 480;
|
||||
}
|
||||
|
||||
if (height >= 240 && height < 255 && ra_set_core_hz == 55)
|
||||
{
|
||||
crt_aspect_ratio_switch(width, height);
|
||||
height = 254;
|
||||
}
|
||||
|
||||
switch_res_crt(width, height);
|
||||
}
|
||||
|
||||
|
||||
void crt_switch_res_core(unsigned width, unsigned height, float hz, unsigned crt_mode, int crt_switch_center_adjust)
|
||||
{
|
||||
/* ra_core_hz float passed from within
|
||||
* void video_driver_monitor_adjust_system_rates(void) */
|
||||
ra_core_width = width;
|
||||
ra_core_height = height;
|
||||
ra_core_hz = hz;
|
||||
crt_center_adjust = crt_switch_center_adjust;
|
||||
|
||||
if (crt_mode == 2)
|
||||
{
|
||||
if (hz > 53)
|
||||
ra_core_hz = hz*2;
|
||||
|
||||
if (hz <= 53)
|
||||
ra_core_hz = 120.0f;
|
||||
}
|
||||
|
||||
crt_check_first_run();
|
||||
|
||||
/* Detect resolution change and switch */
|
||||
if (
|
||||
(ra_tmp_height != ra_core_height) ||
|
||||
(ra_core_width != ra_tmp_width)
|
||||
)
|
||||
crt_screen_setup_aspect(width, height);
|
||||
|
||||
ra_tmp_height = ra_core_height;
|
||||
ra_tmp_width = ra_core_width;
|
||||
|
||||
/* Check if aspect is correct, if notchange */
|
||||
if (video_driver_get_aspect_ratio() != fly_aspect)
|
||||
{
|
||||
video_driver_set_aspect_ratio_value((float)fly_aspect);
|
||||
video_driver_apply_state_changes();
|
||||
}
|
||||
}
|
||||
|
||||
void crt_video_restore(void)
|
||||
{
|
||||
if (first_run)
|
||||
return;
|
||||
|
||||
first_run = true;
|
||||
}
|
||||
/* CRT SwitchRes Core
|
||||
* Copyright (C) 2018 Alphanu / Ben Templeman.
|
||||
*
|
||||
* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
||||
* Copyright (C) 2011-2017 - Daniel De Matteis
|
||||
*
|
||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with RetroArch.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include <stddef.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "video_driver.h"
|
||||
#include "video_crt_switch.h"
|
||||
#include "video_display_server.h"
|
||||
|
||||
static unsigned ra_core_width = 0;
|
||||
static unsigned ra_core_height = 0;
|
||||
static unsigned ra_tmp_width = 0;
|
||||
static unsigned ra_tmp_height = 0;
|
||||
static unsigned ra_set_core_hz = 0;
|
||||
static unsigned orig_width = 0;
|
||||
static unsigned orig_height = 0;
|
||||
static int crt_center_adjust = 0;
|
||||
|
||||
static bool first_run = true;
|
||||
|
||||
static float ra_tmp_core_hz = 0.0f;
|
||||
static float fly_aspect = 0.0f;
|
||||
static float ra_core_hz = 0.0f;
|
||||
|
||||
static void crt_check_first_run(void)
|
||||
{
|
||||
if (!first_run)
|
||||
return;
|
||||
|
||||
first_run = false;
|
||||
}
|
||||
|
||||
static void switch_crt_hz(void)
|
||||
{
|
||||
if (ra_core_hz == ra_tmp_core_hz)
|
||||
return;
|
||||
/* set hz float to an int for windows switching */
|
||||
if (ra_core_hz < 100)
|
||||
{
|
||||
if (ra_core_hz < 53)
|
||||
ra_set_core_hz = 50;
|
||||
if (ra_core_hz >= 53 && ra_core_hz < 57)
|
||||
ra_set_core_hz = 55;
|
||||
if (ra_core_hz >= 57)
|
||||
ra_set_core_hz = 60;
|
||||
}
|
||||
|
||||
if (ra_core_hz > 100)
|
||||
{
|
||||
if (ra_core_hz < 106)
|
||||
ra_set_core_hz = 120;
|
||||
if (ra_core_hz >= 106 && ra_core_hz < 114)
|
||||
ra_set_core_hz = 110;
|
||||
if (ra_core_hz >= 114)
|
||||
ra_set_core_hz = 120;
|
||||
}
|
||||
|
||||
video_monitor_set_refresh_rate(ra_set_core_hz);
|
||||
|
||||
ra_tmp_core_hz = ra_core_hz;
|
||||
}
|
||||
|
||||
void crt_aspect_ratio_switch(unsigned width, unsigned height)
|
||||
{
|
||||
/* send aspect float to videeo_driver */
|
||||
fly_aspect = (float)width / height;
|
||||
video_driver_set_aspect_ratio_value((float)fly_aspect);
|
||||
}
|
||||
|
||||
static void switch_res_crt(unsigned width, unsigned height)
|
||||
{
|
||||
if (height > 100)
|
||||
{
|
||||
video_display_server_switch_resolution(width, height,
|
||||
ra_set_core_hz, ra_core_hz, crt_center_adjust);
|
||||
video_driver_apply_state_changes();
|
||||
}
|
||||
}
|
||||
|
||||
/* Create correct aspect to fit video if resolution does not exist */
|
||||
static void crt_screen_setup_aspect(unsigned width, unsigned height)
|
||||
{
|
||||
|
||||
switch_crt_hz();
|
||||
/* get original resolution of core */
|
||||
if (height == 4)
|
||||
{
|
||||
/* detect menu only */
|
||||
if (width < 1920)
|
||||
width = 320;
|
||||
|
||||
height = 240;
|
||||
|
||||
crt_aspect_ratio_switch(width, height);
|
||||
}
|
||||
|
||||
if (height < 200 && height != 144)
|
||||
{
|
||||
crt_aspect_ratio_switch(width, height);
|
||||
height = 200;
|
||||
}
|
||||
|
||||
if (height > 200)
|
||||
crt_aspect_ratio_switch(width, height);
|
||||
|
||||
if (height == 144 && ra_set_core_hz == 50)
|
||||
{
|
||||
height = 288;
|
||||
crt_aspect_ratio_switch(width, height);
|
||||
}
|
||||
|
||||
if (height > 200 && height < 224)
|
||||
{
|
||||
crt_aspect_ratio_switch(width, height);
|
||||
height = 224;
|
||||
}
|
||||
|
||||
if (height > 224 && height < 240)
|
||||
{
|
||||
crt_aspect_ratio_switch(width, height);
|
||||
height = 240;
|
||||
}
|
||||
|
||||
if (height > 240 && height < 255)
|
||||
{
|
||||
crt_aspect_ratio_switch(width, height);
|
||||
height = 254;
|
||||
}
|
||||
|
||||
if (height == 528 && ra_set_core_hz == 60)
|
||||
{
|
||||
crt_aspect_ratio_switch(width, height);
|
||||
height = 480;
|
||||
}
|
||||
|
||||
if (height >= 240 && height < 255 && ra_set_core_hz == 55)
|
||||
{
|
||||
crt_aspect_ratio_switch(width, height);
|
||||
height = 254;
|
||||
}
|
||||
|
||||
switch_res_crt(width, height);
|
||||
}
|
||||
|
||||
void crt_switch_res_core(unsigned width, unsigned height, float hz, unsigned crt_mode, int crt_switch_center_adjust)
|
||||
{
|
||||
/* ra_core_hz float passed from within
|
||||
* void video_driver_monitor_adjust_system_rates(void) */
|
||||
ra_core_width = width;
|
||||
ra_core_height = height;
|
||||
ra_core_hz = hz;
|
||||
crt_center_adjust = crt_switch_center_adjust;
|
||||
|
||||
if (crt_mode == 2)
|
||||
{
|
||||
if (hz > 53)
|
||||
ra_core_hz = hz * 2;
|
||||
|
||||
if (hz <= 53)
|
||||
ra_core_hz = 120.0f;
|
||||
}
|
||||
|
||||
crt_check_first_run();
|
||||
|
||||
/* Detect resolution change and switch */
|
||||
if (
|
||||
(ra_tmp_height != ra_core_height) ||
|
||||
(ra_core_width != ra_tmp_width)
|
||||
)
|
||||
crt_screen_setup_aspect(width, height);
|
||||
|
||||
ra_tmp_height = ra_core_height;
|
||||
ra_tmp_width = ra_core_width;
|
||||
|
||||
/* Check if aspect is correct, if notchange */
|
||||
if (video_driver_get_aspect_ratio() != fly_aspect)
|
||||
{
|
||||
video_driver_set_aspect_ratio_value((float)fly_aspect);
|
||||
video_driver_apply_state_changes();
|
||||
}
|
||||
}
|
||||
|
||||
void crt_video_restore(void)
|
||||
{
|
||||
if (first_run)
|
||||
return;
|
||||
|
||||
first_run = true;
|
||||
}
|
||||
|
@ -1,38 +1,38 @@
|
||||
/* CRT SwitchRes Core
|
||||
* Copyright (C) 2018 Alphanu / Ben Templeman.
|
||||
*
|
||||
* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
||||
* Copyright (C) 2011-2017 - Daniel De Matteis
|
||||
*
|
||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with RetroArch.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __VIDEO_CRT_SWITCH_H__
|
||||
#define __VIDEO_CRT_SWITCH_H__
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <boolean.h>
|
||||
#include <retro_common_api.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
void crt_switch_res_core(unsigned width, unsigned height, float hz, unsigned crt_mode, int crt_switch_center_adjust);
|
||||
|
||||
void crt_aspect_ratio_switch(unsigned width, unsigned height);
|
||||
|
||||
void crt_video_restore(void);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
/* CRT SwitchRes Core
|
||||
* Copyright (C) 2018 Alphanu / Ben Templeman.
|
||||
*
|
||||
* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
||||
* Copyright (C) 2011-2017 - Daniel De Matteis
|
||||
*
|
||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with RetroArch.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __VIDEO_CRT_SWITCH_H__
|
||||
#define __VIDEO_CRT_SWITCH_H__
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <boolean.h>
|
||||
#include <retro_common_api.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
void crt_switch_res_core(unsigned width, unsigned height, float hz, unsigned crt_mode, int crt_switch_center_adjust);
|
||||
|
||||
void crt_aspect_ratio_switch(unsigned width, unsigned height);
|
||||
|
||||
void crt_video_restore(void);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
|
@ -181,9 +181,7 @@ ACHIEVEMENTS
|
||||
/*============================================================
|
||||
MD5
|
||||
============================================================ */
|
||||
#if defined(HAVE_CHEEVOS) || (defined(HAVE_HTTPSERVER) && defined(HAVE_ZLIB))
|
||||
#include "../libretro-common/utils/md5.c"
|
||||
#endif
|
||||
|
||||
/*============================================================
|
||||
CHEATS
|
||||
|
@ -16,6 +16,7 @@
|
||||
#include "../input_driver.h"
|
||||
|
||||
#define MAX_PADS 10
|
||||
#define TOUCH_AXIS_MAX 0x7fff /* abstraction of pointer coords */
|
||||
|
||||
/* TODO/FIXME -
|
||||
* fix game focus toggle */
|
||||
@ -29,6 +30,12 @@ typedef struct switch_input
|
||||
uint32_t touch_x;
|
||||
uint32_t touch_y;
|
||||
|
||||
uint32_t touch_scale_x;
|
||||
uint32_t touch_scale_y;
|
||||
|
||||
uint32_t touch_half_resolution_x;
|
||||
uint32_t touch_half_resolution_y;
|
||||
|
||||
bool touch_state;
|
||||
#endif
|
||||
} switch_input_t;
|
||||
@ -57,24 +64,18 @@ static void switch_input_poll(void *data)
|
||||
}
|
||||
|
||||
#ifdef HAVE_LIBNX
|
||||
static int16_t scale_touch(int16_t from_min, int16_t from_max,
|
||||
int16_t to_min, int16_t to_max,
|
||||
int16_t value)
|
||||
void calc_touch_scaling(switch_input_t *sw, uint32_t x, uint32_t y, uint32_t axis_max)
|
||||
{
|
||||
int32_t from_range = from_max - from_min;
|
||||
int32_t to_range = to_max - to_min;
|
||||
sw->touch_half_resolution_x = x/2;
|
||||
sw->touch_half_resolution_y = y/2;
|
||||
|
||||
return (((value - from_min) * to_range) / from_range) + to_min;
|
||||
sw->touch_scale_x = axis_max / sw->touch_half_resolution_x;
|
||||
sw->touch_scale_y = axis_max / sw->touch_half_resolution_y;
|
||||
}
|
||||
|
||||
static int16_t switch_pointer_device_state(switch_input_t *sw,
|
||||
unsigned id, unsigned idx)
|
||||
{
|
||||
/*
|
||||
Here we assume that the touch screen is always 1280x720
|
||||
Call me back when a Nintendo Switch XL is out
|
||||
*/
|
||||
|
||||
if (idx != 0)
|
||||
return 0;
|
||||
|
||||
@ -83,9 +84,9 @@ static int16_t switch_pointer_device_state(switch_input_t *sw,
|
||||
case RETRO_DEVICE_ID_POINTER_PRESSED:
|
||||
return sw->touch_state;
|
||||
case RETRO_DEVICE_ID_POINTER_X:
|
||||
return scale_touch(0, 1280, -0x7fff, 0x7fff, (uint16_t) sw->touch_x);
|
||||
return ((sw->touch_x - sw->touch_half_resolution_x) * sw->touch_scale_x);
|
||||
case RETRO_DEVICE_ID_POINTER_Y:
|
||||
return scale_touch(0, 720, -0x7fff, 0x7fff, (uint16_t) sw->touch_y);
|
||||
return ((sw->touch_y - sw->touch_half_resolution_y) * sw->touch_scale_y);
|
||||
}
|
||||
|
||||
return 0;
|
||||
@ -142,6 +143,15 @@ static void* switch_input_init(const char *joypad_driver)
|
||||
|
||||
sw->joypad = input_joypad_init_driver(joypad_driver, sw);
|
||||
|
||||
#ifdef HAVE_LIBNX
|
||||
/*
|
||||
Here we assume that the touch screen is always 1280x720
|
||||
Call me back when a Nintendo Switch XL is out
|
||||
*/
|
||||
|
||||
calc_touch_scaling(sw, 1280, 720, TOUCH_AXIS_MAX);
|
||||
#endif
|
||||
|
||||
return sw;
|
||||
}
|
||||
|
||||
@ -149,7 +159,13 @@ static uint64_t switch_input_get_capabilities(void *data)
|
||||
{
|
||||
(void) data;
|
||||
|
||||
return (1 << RETRO_DEVICE_JOYPAD) | (1 << RETRO_DEVICE_ANALOG);
|
||||
uint64_t caps = (1 << RETRO_DEVICE_JOYPAD) | (1 << RETRO_DEVICE_ANALOG);
|
||||
|
||||
#ifdef HAVE_LIBNX
|
||||
caps |= (1 << RETRO_DEVICE_POINTER);
|
||||
#endif
|
||||
|
||||
return caps;
|
||||
}
|
||||
|
||||
static const input_device_driver_t *switch_input_get_joypad_driver(void *data)
|
||||
|
@ -554,30 +554,30 @@ DECL_AXIS(r_y_minus, +3)
|
||||
#endif
|
||||
|
||||
#define SWITCH_DEFAULT_BINDS \
|
||||
DECL_BTN(a, 0) \
|
||||
DECL_BTN(b, 1) \
|
||||
DECL_BTN(x, 2) \
|
||||
DECL_BTN(y, 3) \
|
||||
DECL_BTN(start, 10) \
|
||||
DECL_BTN(select, 11) \
|
||||
DECL_BTN(up, 13) \
|
||||
DECL_BTN(down, 15) \
|
||||
DECL_BTN(left, 12) \
|
||||
DECL_BTN(right, 14) \
|
||||
DECL_BTN(l, 6) \
|
||||
DECL_BTN(r, 7) \
|
||||
DECL_BTN(l2, 8) \
|
||||
DECL_BTN(r2, 9) \
|
||||
DECL_BTN(l3, 4) \
|
||||
DECL_BTN(r3, 5) \
|
||||
DECL_AXIS(l_x_plus, +0) \
|
||||
DECL_AXIS(l_x_minus, -0) \
|
||||
DECL_AXIS(l_y_plus, +1) \
|
||||
DECL_AXIS(l_y_minus, -1) \
|
||||
DECL_AXIS(r_x_plus, +2) \
|
||||
DECL_AXIS(r_x_minus, -2) \
|
||||
DECL_AXIS(r_y_plus, +3) \
|
||||
DECL_AXIS(r_y_minus, -3)
|
||||
DECL_BTN_EX(a, 0, "A") \
|
||||
DECL_BTN_EX(b, 1, "B") \
|
||||
DECL_BTN_EX(x, 2, "X") \
|
||||
DECL_BTN_EX(y, 3, "Y") \
|
||||
DECL_BTN_EX(start, 10, "Plus") \
|
||||
DECL_BTN_EX(select, 11, "Minus") \
|
||||
DECL_BTN_EX(up, 13, "D-Pad up") \
|
||||
DECL_BTN_EX(down, 15, "D-Pad down") \
|
||||
DECL_BTN_EX(left, 12, "D-Pad left") \
|
||||
DECL_BTN_EX(right, 14, "D-Pad right") \
|
||||
DECL_BTN_EX(l, 6, "L") \
|
||||
DECL_BTN_EX(r, 7, "R") \
|
||||
DECL_BTN_EX(l2, 8, "ZL") \
|
||||
DECL_BTN_EX(r2, 9, "ZR") \
|
||||
DECL_BTN_EX(l3, 4, "L3") \
|
||||
DECL_BTN_EX(r3, 5, "R3") \
|
||||
DECL_AXIS_EX(l_x_plus, +0, "L-Stick right") \
|
||||
DECL_AXIS_EX(l_x_minus, -0, "L-Stick left") \
|
||||
DECL_AXIS_EX(l_y_plus, +1, "L-Stick down") \
|
||||
DECL_AXIS_EX(l_y_minus, -1, "L-Stick up") \
|
||||
DECL_AXIS_EX(r_x_plus, +2, "R-Stick right") \
|
||||
DECL_AXIS_EX(r_x_minus, -2, "R-Stick left") \
|
||||
DECL_AXIS_EX(r_y_plus, +3, "R-Stick down") \
|
||||
DECL_AXIS_EX(r_y_minus, -3, "R-Stick up")
|
||||
|
||||
#define EMSCRIPTEN_DEFAULT_BINDS \
|
||||
DECL_BTN(a, 1) \
|
||||
|
@ -1,4 +1,4 @@
|
||||
MSG_HASH(
|
||||
MSG_HASH(
|
||||
MSG_COMPILER,
|
||||
"Compiler"
|
||||
)
|
||||
@ -1308,8 +1308,13 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_RDB_ENTRY_START_CONTENT,
|
||||
"Start Content")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_RDB_ENTRY_TGDB_RATING,
|
||||
"TGDB Rating")
|
||||
#ifdef HAVE_LAKKA_SWITCH
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_REBOOT,
|
||||
"Reboot into RCM")
|
||||
#else
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_REBOOT,
|
||||
"Reboot")
|
||||
#endif
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_RECORDING_CONFIG_DIRECTORY,
|
||||
"Recording Config")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_RECORDING_OUTPUT_DIRECTORY,
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,4 @@
|
||||
MSG_HASH(
|
||||
MSG_HASH(
|
||||
MSG_COMPILER,
|
||||
"編譯器"
|
||||
)
|
||||
@ -1209,8 +1209,13 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_RDB_ENTRY_START_CONTENT,
|
||||
"啟動遊戲內容")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_RDB_ENTRY_TGDB_RATING,
|
||||
"TGDB 評分")
|
||||
#ifdef HAVE_LAKKA_SWITCH
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_REBOOT,
|
||||
"重啟 (RCM)")
|
||||
#else
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_REBOOT,
|
||||
"重啟")
|
||||
#endif
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_RECORDING_CONFIG_DIRECTORY,
|
||||
"錄影設定目錄")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_RECORDING_OUTPUT_DIRECTORY,
|
||||
|
@ -1,3 +1,29 @@
|
||||
#ifdef HAVE_LAKKA_SWITCH
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_SWITCH_GPU_PROFILE,
|
||||
"GPU Übertakten"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_SWITCH_GPU_PROFILE,
|
||||
"Über- oder Untertakten der Switch GPU"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_SWITCH_BACKLIGHT_CONTROL,
|
||||
"Bildschirmhelligkeit"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_SWITCH_BACKLIGHT_CONTROL,
|
||||
"Anpassen der Switch Bildschirmhelligkeit"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_SWITCH_CPU_PROFILE,
|
||||
"CPU Übertakten"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_SWITCH_CPU_PROFILE,
|
||||
"Übertakten der Switch CPU"
|
||||
)
|
||||
#endif
|
||||
MSG_HASH(
|
||||
MSG_COMPILER,
|
||||
"Compiler"
|
||||
@ -1232,8 +1258,13 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_RDB_ENTRY_START_CONTENT,
|
||||
"Starte Inhalt")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_RDB_ENTRY_TGDB_RATING,
|
||||
"TGDB-Bewertung")
|
||||
#ifdef HAVE_LAKKA_SWITCH
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_REBOOT,
|
||||
"Neustart (RCM)")
|
||||
#else
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_REBOOT,
|
||||
"Neustart")
|
||||
#endif
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_RECORDING_CONFIG_DIRECTORY,
|
||||
"Aufnahme-Konfigurationen")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_RECORDING_OUTPUT_DIRECTORY,
|
||||
@ -3327,121 +3358,121 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_MESSAGE_COLOR_BLUE,
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_FRAMECOUNT_SHOW,
|
||||
"Zeige die aktuelle Anzahl an Einzelbildern an")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_AUTOMATICALLY_ADD_CONTENT_TO_PLAYLIST,
|
||||
"Automatically add content to playlist")
|
||||
"Inhalt automatisch zur Playlist hinzufügen")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_AUTOMATICALLY_ADD_CONTENT_TO_PLAYLIST,
|
||||
"Automatically scans loaded content so they appear inside playlists.")
|
||||
"Scant automatisch den geladenen Inhalt, so dass er in Playlisten angezeigt wird.")
|
||||
MSG_HASH(MSG_SCANNING_OF_FILE_FINISHED,
|
||||
"Scanning of file finished")
|
||||
"Scannen von Datei beendet")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_RESAMPLER_QUALITY,
|
||||
"Audio Resampler Quality")
|
||||
"Audio Resampler Qualität")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_RESAMPLER_QUALITY,
|
||||
"Lower this value to favor performance/lower latency over audio quality, increase if you want better audio quality at the expense of performance/lower latency.")
|
||||
"Verkleinere diesen Wert um Performance/kleinere Latenz gegenüber Audio Qualität zu bevorzugen, erhöhe ihn wenn du bessere Audioqualität bevorzugst auf kosten der Performance/kleinerer Latenz.")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_STATISTICS_SHOW,
|
||||
"Display Statistics")
|
||||
"Statistiken anzeigen")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_STATISTICS_SHOW,
|
||||
"Show onscreen technical statistics.")
|
||||
"Technische Onscreen-Statistiken anzeigen.")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_RGUI_BORDER_FILLER_ENABLE,
|
||||
"Enable border filler")
|
||||
"Rahmenfüller aktivieren.")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_RGUI_BORDER_FILLER_THICKNESS_ENABLE,
|
||||
"Enable border filler thickness")
|
||||
"Rahmenfüllerdicke aktivieren")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_RGUI_BACKGROUND_FILLER_THICKNESS_ENABLE,
|
||||
"Enable background filler thickness")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_CRT_SWITCH_RESOLUTION, "For CRT displays only. Attempts to use exact core/game resolution and refresh rate.")
|
||||
"Hintergrundfüllerdicke aktivieren")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_CRT_SWITCH_RESOLUTION, "Nur für CRT Bildschirme. Versuche die exakte Core-/Spielauflösung und refresh Rate zu verwenden.")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_CRT_SWITCH_RESOLUTION, "CRT SwitchRes")
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_CRT_SWITCH_RESOLUTION_SUPER,
|
||||
"Switch among native and ultrawide super resolutions."
|
||||
"Umschalten zwischen Nativer- und ultraweiter Superauflösungen."
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_CRT_SWITCH_RESOLUTION_SUPER, "CRT Super Resolution")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_CRT_SWITCH_RESOLUTION_SUPER, "CRT Superauflösung")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_REWIND,
|
||||
"Show Rewind Settings")
|
||||
"Rückspuleinstellungen anzeigen")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_CONTENT_SHOW_REWIND,
|
||||
"Show/hide the Rewind options.")
|
||||
"Rückspuleinstellungsoption anzeigen/verstecken ")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_CONTENT_SHOW_LATENCY,
|
||||
"Show/hide the Latency options.")
|
||||
"Latenzoptionen anzeigen/verstecken")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_LATENCY,
|
||||
"Show Latency Settings")
|
||||
"Latenzeinstellungen anzeigen")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_CONTENT_SHOW_OVERLAYS,
|
||||
"Show/hide the Overlay options.")
|
||||
"Overlayoptionen anzeigen/verstecken")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_OVERLAYS,
|
||||
"Show Overlay Settings")
|
||||
"Overlayeinstellungen anzeigen")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_ENABLE_MENU,
|
||||
"Enable menu audio")
|
||||
"Menuaudio aktivieren")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_ENABLE_MENU,
|
||||
"Enable or disable menu sound.")
|
||||
"Menuton aktivieren oder deaktivieren")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_MIXER_SETTINGS,
|
||||
"Mixer Settings")
|
||||
"Mixer-Einstellungen")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_MIXER_SETTINGS,
|
||||
"View and/or modify audio mixer settings.")
|
||||
"Anzeigen und/oder anzeigen von Audiomixer-Einstellungen.")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_OVERRIDE_OPTIONS,
|
||||
"Overrides")
|
||||
"Überschreibungen")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_OVERRIDE_OPTIONS,
|
||||
"Options for overriding the global configuration.")
|
||||
"Optionen zum überschreiben der globalen Konfiguration.")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_MIXER_ACTION_PLAY,
|
||||
"Will start playback of the audio stream. Once finished, it will remove the current audio stream from memory.")
|
||||
"Wird die Wiedergabe des Audiostreams starten. Sobald dieser fertig ist, wird der jetzige Audiostream aus dem Speicher entfernt werden.")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_MIXER_ACTION_PLAY_LOOPED,
|
||||
"Will start playback of the audio stream. Once finished, it will loop and play the track again from the beginning.")
|
||||
"Wird die Wiedergabe des Audiostreams starten. Sobald dieser fertig ist, wird dieser erneut von vorne gestartet")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_MIXER_ACTION_PLAY_SEQUENTIAL,
|
||||
"Will start playback of the audio stream. Once finished, it will jump to the next audio stream in sequential order and repeat this behavior. Useful as an album playback mode.")
|
||||
"Wird die Wiedergabe des Audiostreams starten. Sobald dieser fertig ist, springt er zum nächsten Audiostream in sequenzieller Reihenfolge und wiederholt dieses verhalten. Nützlich als Albumwiedergabemodus.")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_MIXER_ACTION_STOP,
|
||||
"This will stop playback of the audio stream, but not remove it from memory. You can start playing it again by selecting 'Play'.")
|
||||
"Dies wird die Wiedergabe des Audiostreams stoppen, aber ihn nicht aus dem Speicher entfernen. Du kannst die Wiedergabe fortsetzen in dem du erneut auf 'Abspielen' klickst.")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_MIXER_ACTION_REMOVE,
|
||||
"This will stop playback of the audio stream and remove it entirely from memory.")
|
||||
"Dies wird die Wiedergabe stoppen und den Audiostream komplett aus dem Speicher entfernen.")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_MIXER_ACTION_VOLUME,
|
||||
"Adjust the volume of the audio stream.")
|
||||
"Anpassen der Lautstärke des Audiostreams.")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_ADD_TO_MIXER,
|
||||
"Add this audio track to an available audio stream slot. If no slots are currently available, it will be ignored.")
|
||||
"Diese Audiospur einem verfügbaren Audiostreamslot hinzufügen. Wenn momentan kein Slot verfügbar ist, wird dies ignoriert.")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_ADD_TO_MIXER_AND_PLAY,
|
||||
"Add this audio track to an available audio stream slot and play it. If no slots are currently available, it will be ignored.")
|
||||
"Diese Audiospur einem verfügbaren Audiostreamslot hinzufügen und sie wiedergeben. Wenn momentan kein Slot verfügbar ist, wird dies ignoriert.")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_MIXER_ACTION_PLAY,
|
||||
"Play")
|
||||
"Abspielen")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_MIXER_ACTION_PLAY_LOOPED,
|
||||
"Play (Looped)")
|
||||
"Abspielen (Schleife)")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_MIXER_ACTION_PLAY_SEQUENTIAL,
|
||||
"Play (Sequential)")
|
||||
"Abspielen (Sequenziell)")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_MIXER_ACTION_STOP,
|
||||
"Stop")
|
||||
"Stopp")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_MIXER_ACTION_REMOVE,
|
||||
"Remove")
|
||||
"Entfernen")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_MIXER_ACTION_VOLUME,
|
||||
"Volume")
|
||||
"Lautstärke")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_DETECT_CORE_LIST_OK_CURRENT_CORE,
|
||||
"Current core")
|
||||
"Aktueller Core")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_MENU_SEARCH_CLEAR,
|
||||
"Clear")
|
||||
"Leeren")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_DISCORD_IN_MENU,
|
||||
"In-Menu")
|
||||
"Im Menu")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_DISCORD_IN_GAME,
|
||||
"In-Game")
|
||||
"Im Spiel")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_DISCORD_IN_GAME_PAUSED,
|
||||
"In-Game (Paused)")
|
||||
"Im Spiel (Pausiert)")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_DISCORD_STATUS_PLAYING,
|
||||
"Playing")
|
||||
"Wiedergebend")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_DISCORD_STATUS_PAUSED,
|
||||
"Paused")
|
||||
"Pausiert")
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_DISCORD_ALLOW,
|
||||
"Enable Discord"
|
||||
"Discord aktivieren"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_DISCORD_ALLOW,
|
||||
"Enable or disable Discord support. Will not work with the browser version, only native desktop client."
|
||||
"Discordunterstützung aktivieren oder deaktivieren. Funktioniert nicht in der Browserversion, nur im nativen Desktop Client."
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_POWER_MANAGEMENT_SETTINGS,
|
||||
"Power Management")
|
||||
"Energieverwaltung")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_POWER_MANAGEMENT_SETTINGS,
|
||||
"Change power management settings.")
|
||||
"Ändere die Energieverwaltungs-Einstellungen")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_SUSTAINED_PERFORMANCE_MODE,
|
||||
"Sustained Performance Mode")
|
||||
"Dauerleistungsmodus")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_MPV_SUPPORT,
|
||||
"mpv support")
|
||||
"mpv unterstützung")
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_ADAPTIVE_VSYNC,
|
||||
"Adaptive Vsync"
|
||||
"Adaptiver Vsync"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_VIDEO_ADAPTIVE_VSYNC,
|
||||
"V-Sync is enabled until performance falls below the target refresh rate. Can minimize stuttering when performance falls below realtime, and can be more energy efficient."
|
||||
"V-Sync ist aktiviert bis die Leistung unter die Zielaktualisierungsrate fällt. Kann Ruckler vermeiden, wenn die Leistung unter realtime fällt, und kann energieeffizienter sein."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_CRT_SWITCHRES_SETTINGS,
|
||||
@ -3449,75 +3480,75 @@ MSG_HASH(
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_CRT_SWITCHRES_SETTINGS,
|
||||
"Output native, low-resolution signals for use with CRT displays."
|
||||
"Native Signale mit niedgriger Auflösung ausgeben, welche mit CRT Bildschirmen benutzt werden können."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_CRT_SWITCH_X_AXIS_CENTERING,
|
||||
"Cycle through these options if the image is not centered properly on the display."
|
||||
"Versuche eine dieser Optionen, wenn das Bild nicht richtig zentriert auf dem Bildschirm erscheint."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_CRT_SWITCH_X_AXIS_CENTERING,
|
||||
"X-Axis Centering"
|
||||
"X-Achsenzentrierung"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_CRT_SWITCH_RESOLUTION_USE_CUSTOM_REFRESH_RATE,
|
||||
"Use a custom refresh rate specified in the config file if needed.")
|
||||
"Benutze eine, in der Konfiguration definierte, Aktualisierungsrate wenn notwendig.")
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_CRT_SWITCH_RESOLUTION_USE_CUSTOM_REFRESH_RATE,
|
||||
"Use Custom Refresh Rate")
|
||||
"Benutze eine benutzerdefinierte Aktualisierungsrate.")
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_CRT_SWITCH_RESOLUTION_OUTPUT_DISPLAY_ID,
|
||||
"Select the output port connected to the CRT display.")
|
||||
"Wähle den Ausgangsport aus, welcher mit dem CRT Bildschirm verbunden ist.")
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_CRT_SWITCH_RESOLUTION_OUTPUT_DISPLAY_ID,
|
||||
"Output Display ID")
|
||||
"Ausgangs Bildschirm ID")
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_QUICK_MENU_START_RECORDING,
|
||||
"Start Recording"
|
||||
"Aufnahme starten"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_QUICK_MENU_START_RECORDING,
|
||||
"Starts recording."
|
||||
"Startet die Aufnahme"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_QUICK_MENU_STOP_RECORDING,
|
||||
"Stop Recording"
|
||||
"Aufnahme beenden"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_QUICK_MENU_STOP_RECORDING,
|
||||
"Stops recording."
|
||||
"Beendet die Aufnahme"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_QUICK_MENU_START_STREAMING,
|
||||
"Start Streaming"
|
||||
"Streamen starten"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_QUICK_MENU_START_STREAMING,
|
||||
"Starts streaming."
|
||||
"Startet das Streamen"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_QUICK_MENU_STOP_STREAMING,
|
||||
"Stop Streaming"
|
||||
"Streamen beenden"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_QUICK_MENU_STOP_STREAMING,
|
||||
"Stops streaming."
|
||||
"Beendet das Streamen"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_META_RECORDING_TOGGLE,
|
||||
"Recording toggle"
|
||||
"Aufnahme starten/stoppen"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_META_STREAMING_TOGGLE,
|
||||
"Streaming toggle"
|
||||
"Streamen starten/stoppen"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_RECORD_QUALITY,
|
||||
"Record Quality"
|
||||
"Aufnahmequalität"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_STREAM_QUALITY,
|
||||
"Stream Quality"
|
||||
"Streamingqualität"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_STREAMING_URL,
|
||||
@ -3540,18 +3571,18 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_TWITCH_STREAM_KEY,
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_YOUTUBE_STREAM_KEY,
|
||||
"YouTube Stream Key")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_STREAMING_MODE,
|
||||
"Streaming Mode")
|
||||
"Streamingmodus")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_STREAMING_TITLE,
|
||||
"Title of Stream")
|
||||
"Streamtitel")
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_SPLIT_JOYCON,
|
||||
"Split Joy-Con"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_RESET_TO_DEFAULT_CONFIG,
|
||||
"Reset To Defaults"
|
||||
"Auf Standardwerte zurücksetzen"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_RESET_TO_DEFAULT_CONFIG,
|
||||
"Reset the current configuration to default values."
|
||||
"Setzt die momentane Konfiguration auf die Standardwerte zurück."
|
||||
)
|
||||
|
@ -1113,8 +1113,13 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_RDB_ENTRY_START_CONTENT,
|
||||
"Start Content")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_RDB_ENTRY_TGDB_RATING,
|
||||
"TGDB Rating")
|
||||
#ifdef HAVE_LAKKA_SWITCH
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_REBOOT,
|
||||
"Reboot into RCM")
|
||||
#else
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_REBOOT,
|
||||
"Reboot")
|
||||
#endif
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_RECORDING_CONFIG_DIRECTORY,
|
||||
"Recording Config")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_RECORDING_OUTPUT_DIRECTORY,
|
||||
|
@ -2133,10 +2133,17 @@ MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_RDB_ENTRY_TGDB_RATING,
|
||||
"TGDB Rating"
|
||||
)
|
||||
#ifdef HAVE_LAKKA_SWITCH
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_REBOOT,
|
||||
"Reiniciar (RCM)"
|
||||
)
|
||||
#else
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_REBOOT,
|
||||
"Reiniciar"
|
||||
)
|
||||
#endif
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_RECORDING_CONFIG_DIRECTORY,
|
||||
"Carpeta de configuración de grabación"
|
||||
|
@ -1220,8 +1220,13 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_RDB_ENTRY_START_CONTENT,
|
||||
"Démarrer le contenu")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_RDB_ENTRY_TGDB_RATING,
|
||||
"Classification TGDB")
|
||||
#ifdef HAVE_LAKKA_SWITCH
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_REBOOT,
|
||||
"Redémarrer en RCM")
|
||||
#else
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_REBOOT,
|
||||
"Redémarrer")
|
||||
#endif
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_RECORDING_CONFIG_DIRECTORY,
|
||||
"Configurations d'enregistrement vidéo")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_RECORDING_OUTPUT_DIRECTORY,
|
||||
|
@ -1234,8 +1234,13 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_RDB_ENTRY_START_CONTENT,
|
||||
"Avvia il contenuto")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_RDB_ENTRY_TGDB_RATING,
|
||||
"Valutazione TGDB ")
|
||||
#ifdef HAVE_LAKKA_SWITCH
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_REBOOT,
|
||||
"Riavvia (RCM)")
|
||||
#else
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_REBOOT,
|
||||
"Riavvia")
|
||||
#endif
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_RECORDING_CONFIG_DIRECTORY,
|
||||
"Configurazione per la registrazione")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_RECORDING_OUTPUT_DIRECTORY,
|
||||
@ -3489,27 +3494,27 @@ MSG_HASH(
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_META_RECORDING_TOGGLE,
|
||||
"Recording toggle"
|
||||
"Attiva/Disattiva registrazione"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_META_STREAMING_TOGGLE,
|
||||
"Streaming toggle"
|
||||
"Attiva/disattiva streaming"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_RECORD_QUALITY,
|
||||
"Record Quality"
|
||||
"Qualità di registrazione"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_STREAM_QUALITY,
|
||||
"Stream Quality"
|
||||
"Qualità stream"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_STREAMING_URL,
|
||||
"Streaming URL"
|
||||
"URL dello Streaming"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_UDP_STREAM_PORT,
|
||||
"UDP Stream Port"
|
||||
"Port UDP Stream"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_ACCOUNTS_TWITCH,
|
||||
@ -3520,22 +3525,22 @@ MSG_HASH(
|
||||
"YouTube"
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_TWITCH_STREAM_KEY,
|
||||
"Twitch Stream Key")
|
||||
"Chiave per lo Stream su Twitch")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_YOUTUBE_STREAM_KEY,
|
||||
"YouTube Stream Key")
|
||||
"Chiave per lo Stream su YouTube")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_STREAMING_MODE,
|
||||
"Streaming Mode")
|
||||
"Modalità streaming")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_STREAMING_TITLE,
|
||||
"Title of Stream")
|
||||
"Titolo dello Stream")
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_SPLIT_JOYCON,
|
||||
"Split Joy-Con"
|
||||
"Splitta i Joy-Con"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_RESET_TO_DEFAULT_CONFIG,
|
||||
"Reset To Defaults"
|
||||
"Ripristina impostazioni predefinite"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_RESET_TO_DEFAULT_CONFIG,
|
||||
"Reset the current configuration to default values."
|
||||
"Reimposta la configurazione corrente ai valori predefiniti."
|
||||
)
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,4 @@
|
||||
MSG_HASH(
|
||||
MSG_HASH(
|
||||
MSG_COMPILER,
|
||||
"컴파일러"
|
||||
)
|
||||
@ -1206,8 +1206,13 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_RDB_ENTRY_START_CONTENT,
|
||||
"컨텐츠 시작")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_RDB_ENTRY_TGDB_RATING,
|
||||
"TGDB 등급")
|
||||
#ifdef HAVE_LAKKA_SWITCH
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_REBOOT,
|
||||
"재시작 (RCM)")
|
||||
#else
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_REBOOT,
|
||||
"재시작")
|
||||
#endif
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_RECORDING_CONFIG_DIRECTORY,
|
||||
"녹화 설정")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_RECORDING_OUTPUT_DIRECTORY,
|
||||
|
@ -1,3 +1,11 @@
|
||||
#ifdef HAVE_LAKKA_SWITCH
|
||||
MSG_HASH(MENU_ENUM_LABEL_SWITCH_GPU_PROFILE,
|
||||
"switch_gpu_profile")
|
||||
MSG_HASH(MENU_ENUM_LABEL_SWITCH_BACKLIGHT_CONTROL,
|
||||
"switch_backlight_control")
|
||||
MSG_HASH(MENU_ENUM_LABEL_SWITCH_CPU_PROFILE,
|
||||
"switch_cpu_profile")
|
||||
#endif
|
||||
MSG_HASH(MENU_ENUM_LABEL_ACCOUNTS_CHEEVOS_USERNAME,
|
||||
"accounts_cheevos_username")
|
||||
MSG_HASH(MENU_ENUM_LABEL_ACCOUNTS_LIST,
|
||||
@ -1103,6 +1111,8 @@ MSG_HASH(MENU_ENUM_LABEL_THUMBNAILS_UPDATER_LIST,
|
||||
"thumbnails_updater_list")
|
||||
MSG_HASH(MENU_ENUM_LABEL_TIMEDATE_ENABLE,
|
||||
"menu_timedate_enable")
|
||||
MSG_HASH(MENU_ENUM_LABEL_TIMEDATE_STYLE,
|
||||
"menu_timedate_style")
|
||||
MSG_HASH(MENU_ENUM_LABEL_TITLE_COLOR,
|
||||
"menu_title_color")
|
||||
MSG_HASH(MENU_ENUM_LABEL_UI_COMPANION_ENABLE,
|
||||
|
@ -1111,8 +1111,13 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_RDB_ENTRY_START_CONTENT,
|
||||
"Content Opstarten")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_RDB_ENTRY_TGDB_RATING,
|
||||
"TGDB Rating")
|
||||
#ifdef HAVE_LAKKA_SWITCH
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_REBOOT,
|
||||
"Herstart (RCM)")
|
||||
#else
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_REBOOT,
|
||||
"Herstart")
|
||||
#endif
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_RECORDING_CONFIG_DIRECTORY,
|
||||
"Opname Config Map")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_RECORDING_OUTPUT_DIRECTORY,
|
||||
|
@ -1,4 +1,4 @@
|
||||
MSG_HASH(
|
||||
MSG_HASH(
|
||||
MSG_COMPILER,
|
||||
"Kompilator"
|
||||
)
|
||||
@ -1314,8 +1314,13 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_RDB_ENTRY_START_CONTENT,
|
||||
"Rozpocznij zawartość")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_RDB_ENTRY_TGDB_RATING,
|
||||
"Ocena TGDB")
|
||||
#ifdef HAVE_LAKKA_SWITCH
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_REBOOT,
|
||||
"Restart (RCM)")
|
||||
#else
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_REBOOT,
|
||||
"Restart")
|
||||
#endif
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_RECORDING_CONFIG_DIRECTORY,
|
||||
"Konfig. Nagrywania")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_RECORDING_OUTPUT_DIRECTORY,
|
||||
|
@ -2133,10 +2133,17 @@ MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_RDB_ENTRY_TGDB_RATING,
|
||||
"Classificação TGDB"
|
||||
)
|
||||
#ifdef HAVE_LAKKA_SWITCH
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_REBOOT,
|
||||
"Reiniciar (RCM)"
|
||||
)
|
||||
#else
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_REBOOT,
|
||||
"Reiniciar"
|
||||
)
|
||||
#endif
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_RECORDING_CONFIG_DIRECTORY,
|
||||
"Configuração de Gravação"
|
||||
|
@ -1200,8 +1200,13 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_RDB_ENTRY_START_CONTENT,
|
||||
"Iniciar conteúdo")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_RDB_ENTRY_TGDB_RATING,
|
||||
"Classificação TGDB")
|
||||
#ifdef HAVE_LAKKA_SWITCH
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_REBOOT,
|
||||
"Reinicializar (RCM)")
|
||||
#else
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_REBOOT,
|
||||
"Reinicializar")
|
||||
#endif
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_RECORDING_CONFIG_DIRECTORY,
|
||||
"Pasta de armazenamento das configuração de gravação")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_RECORDING_OUTPUT_DIRECTORY,
|
||||
|
@ -1,4 +1,4 @@
|
||||
#if defined(_MSC_VER) && !defined(_XBOX)
|
||||
#if defined(_MSC_VER) && !defined(_XBOX)
|
||||
/* https://support.microsoft.com/en-us/kb/980263 */
|
||||
#pragma execution_character_set("utf-8")
|
||||
#endif
|
||||
@ -1229,8 +1229,13 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_RDB_ENTRY_START_CONTENT,
|
||||
"Запустить игру")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_RDB_ENTRY_TGDB_RATING,
|
||||
"Рейтинг TGDB")
|
||||
#ifdef HAVE_LAKKA_SWITCH
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_REBOOT,
|
||||
"Перезагрузка (RCM)")
|
||||
#else
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_REBOOT,
|
||||
"Перезагрузка")
|
||||
#endif
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_RECORDING_CONFIG_DIRECTORY,
|
||||
"Конфигурация записи")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_RECORDING_OUTPUT_DIRECTORY,
|
||||
|
@ -1738,6 +1738,10 @@ int menu_hash_get_help_us_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
snprintf(s, len,
|
||||
"Shows current date and/or time inside menu.");
|
||||
break;
|
||||
case MENU_ENUM_LABEL_TIMEDATE_STYLE:
|
||||
snprintf(s, len,
|
||||
"Style to show the current date and/or time in.");
|
||||
break;
|
||||
case MENU_ENUM_LABEL_BATTERY_LEVEL_ENABLE:
|
||||
snprintf(s, len,
|
||||
"Shows current battery level inside menu.");
|
||||
|
@ -1,3 +1,29 @@
|
||||
#ifdef HAVE_LAKKA_SWITCH
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_SWITCH_GPU_PROFILE,
|
||||
"GPU Overclock"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_SWITCH_GPU_PROFILE,
|
||||
"Overclock or underclock the Switch GPU"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_SWITCH_BACKLIGHT_CONTROL,
|
||||
"Screen brightness"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_SWITCH_BACKLIGHT_CONTROL,
|
||||
"Increase or decrease the Switch screen brightness"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_SWITCH_CPU_PROFILE,
|
||||
"CPU Overclock"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_SWITCH_CPU_PROFILE,
|
||||
"Overclock the Switch CPU"
|
||||
)
|
||||
#endif
|
||||
MSG_HASH(
|
||||
MSG_COMPILER,
|
||||
"Compiler"
|
||||
@ -2133,10 +2159,17 @@ MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_RDB_ENTRY_TGDB_RATING,
|
||||
"TGDB Rating"
|
||||
)
|
||||
#ifdef HAVE_LAKKA_SWITCH
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_REBOOT,
|
||||
"Reboot into RCM"
|
||||
)
|
||||
#else
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_REBOOT,
|
||||
"Reboot"
|
||||
)
|
||||
#endif
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_RECORDING_CONFIG_DIRECTORY,
|
||||
"Recording Config"
|
||||
@ -2873,6 +2906,46 @@ MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_TIMEDATE_ENABLE,
|
||||
"Show date / time"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_TIMEDATE_STYLE,
|
||||
"Style of date / time"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_TIMEDATE_STYLE,
|
||||
"Changes the style current date and/or time is shown inside the menu."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_TIMEDATE_STYLE_YMD_HMS,
|
||||
"YYYY-MM-DD HH:MM:SS"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_TIMEDATE_STYLE_YMD_HM,
|
||||
"YYYY-MM-DD HH:MM"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_TIMEDATE_STYLE_MDYYYY,
|
||||
"MM-DD-YYYY HH:MM"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_TIMEDATE_STYLE_HMS,
|
||||
"HH:MM:SS"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_TIMEDATE_STYLE_HM,
|
||||
"HH:MM"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_TIMEDATE_STYLE_DM_HM,
|
||||
"DD/MM HH:MM"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_TIMEDATE_STYLE_MD_HM,
|
||||
"MM/DD HH:MM"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_TIMEDATE_STYLE_AM_PM,
|
||||
"HH:MM:SS (AM/PM)"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_TITLE_COLOR,
|
||||
"Menu title color"
|
||||
@ -5246,7 +5319,7 @@ MSG_HASH(
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_NETPLAY_ENABLE_CLIENT,
|
||||
"Enables netplay in client mode."
|
||||
"Enter netplay server address and connect in client mode."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_NETPLAY_DISCONNECT,
|
||||
|
@ -1,4 +1,4 @@
|
||||
MSG_HASH(
|
||||
MSG_HASH(
|
||||
MSG_COMPILER,
|
||||
"Compiler"
|
||||
)
|
||||
@ -1222,8 +1222,13 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_RDB_ENTRY_START_CONTENT,
|
||||
"Start Content")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_RDB_ENTRY_TGDB_RATING,
|
||||
"TGDB Rating")
|
||||
#ifdef HAVE_LAKKA_SWITCH
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_REBOOT,
|
||||
"Khởi động lại (RCM)")
|
||||
#else
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_REBOOT,
|
||||
"Khởi động lại")
|
||||
#endif
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_RECORDING_CONFIG_DIRECTORY,
|
||||
"Recording Config")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_RECORDING_OUTPUT_DIRECTORY,
|
||||
|
63
lakka.h
63
lakka.h
@ -24,4 +24,67 @@
|
||||
#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
|
||||
|
||||
#endif
|
||||
|
@ -200,6 +200,7 @@ struct gl_cached_state
|
||||
int cap_translate[SGL_CAP_MAX];
|
||||
};
|
||||
|
||||
static GLuint default_framebuffer;
|
||||
static GLint glsm_max_textures;
|
||||
struct retro_hw_render_callback hw_render;
|
||||
static struct gl_cached_state gl_state;
|
||||
@ -216,6 +217,20 @@ GLenum rglGetError(void)
|
||||
return glGetError();
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
* Core in:
|
||||
* OpenGL : 3.2
|
||||
* OpenGLES : N/A
|
||||
*/
|
||||
|
||||
void rglProvokingVertex( GLenum provokeMode)
|
||||
{
|
||||
#if defined(HAVE_OPENGL)
|
||||
glProvokingVertex(provokeMode);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
* Core in:
|
||||
@ -2080,6 +2095,18 @@ void rglTexStorage2D(GLenum target, GLsizei levels, GLenum internalFormat,
|
||||
glTexStorage2D(target, levels, internalFormat, width, height);
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
*
|
||||
* Core in:
|
||||
* OpenGL : 3.2
|
||||
* OpenGLES : 3.2
|
||||
*/
|
||||
void rglDrawRangeElementsBaseVertex(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, GLvoid *indices, GLint basevertex)
|
||||
{
|
||||
#if defined(HAVE_OPENGL) || defined(HAVE_OPENGLES) && defined(HAVE_OPENGLES_3_2)
|
||||
glDrawRangeElementsBaseVertex(mode, start, end, count, type, indices, basevertex);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
@ -2571,7 +2598,8 @@ static void glsm_state_setup(void)
|
||||
|
||||
gl_state.bind_textures.ids = (GLuint*)calloc(glsm_max_textures, sizeof(GLuint));
|
||||
|
||||
gl_state.framebuf = hw_render.get_current_framebuffer();
|
||||
default_framebuffer = glsm_get_current_framebuffer();
|
||||
gl_state.framebuf = default_framebuffer;
|
||||
gl_state.cullface.mode = GL_BACK;
|
||||
gl_state.frontface.mode = GL_CCW;
|
||||
|
||||
@ -2629,7 +2657,7 @@ static void glsm_state_bind(void)
|
||||
}
|
||||
}
|
||||
|
||||
glBindFramebuffer(RARCH_GL_FRAMEBUFFER, hw_render.get_current_framebuffer());
|
||||
glBindFramebuffer(RARCH_GL_FRAMEBUFFER, default_framebuffer);
|
||||
|
||||
if (gl_state.blendfunc.used)
|
||||
glBlendFunc(
|
||||
@ -2786,10 +2814,8 @@ static bool glsm_state_ctx_destroy(void *data)
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool glsm_state_ctx_init(void *data)
|
||||
static bool glsm_state_ctx_init(glsm_ctx_params_t *params)
|
||||
{
|
||||
glsm_ctx_params_t *params = (glsm_ctx_params_t*)data;
|
||||
|
||||
if (!params || !params->environ_cb)
|
||||
return false;
|
||||
|
||||
@ -2803,15 +2829,16 @@ static bool glsm_state_ctx_init(void *data)
|
||||
#else
|
||||
hw_render.context_type = RETRO_HW_CONTEXT_OPENGLES2;
|
||||
#endif
|
||||
#else
|
||||
#ifdef CORE
|
||||
hw_render.context_type = RETRO_HW_CONTEXT_OPENGL_CORE;
|
||||
hw_render.version_major = 3;
|
||||
hw_render.version_minor = 3;
|
||||
#else
|
||||
hw_render.context_type = RETRO_HW_CONTEXT_OPENGL;
|
||||
if (params->context_type != RETRO_HW_CONTEXT_NONE)
|
||||
hw_render.context_type = params->context_type;
|
||||
if (params->major != 0)
|
||||
hw_render.version_major = params->major;
|
||||
if (params->minor != 0)
|
||||
hw_render.version_minor = params->minor;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
hw_render.context_reset = params->context_reset;
|
||||
hw_render.context_destroy = params->context_destroy;
|
||||
hw_render.stencil = params->stencil;
|
||||
@ -2859,7 +2886,7 @@ bool glsm_ctl(enum glsm_state_ctl state, void *data)
|
||||
glsm_state_ctx_destroy(data);
|
||||
break;
|
||||
case GLSM_CTL_STATE_CONTEXT_INIT:
|
||||
return glsm_state_ctx_init(data);
|
||||
return glsm_state_ctx_init((glsm_ctx_params_t*)data);
|
||||
case GLSM_CTL_STATE_SETUP:
|
||||
glsm_state_setup();
|
||||
break;
|
||||
|
@ -146,6 +146,7 @@ typedef struct glsm_ctx_params
|
||||
bool stencil;
|
||||
unsigned major;
|
||||
unsigned minor;
|
||||
enum retro_hw_context_type context_type;
|
||||
} glsm_ctx_params_t;
|
||||
|
||||
GLuint glsm_get_current_framebuffer(void);
|
||||
|
@ -33,6 +33,8 @@ RETRO_BEGIN_DECLS
|
||||
#define glTexCoord2f rglTexCoord2f
|
||||
|
||||
/* more forward-compatible GL subset symbols */
|
||||
#define glDrawRangeElementsBaseVertex rglDrawRangeElementsBaseVertex
|
||||
#define glProvokingVertex rglProvokingVertex
|
||||
#define glGetInteger64v rglGetInteger64v
|
||||
#define glGenSamplers rglGenSamplers
|
||||
#define glBindSampler rglBindSampler
|
||||
@ -469,6 +471,8 @@ void rglGetInteger64v( GLenum pname,
|
||||
void rglUniform2iv( GLint location,
|
||||
GLsizei count,
|
||||
const GLint *value);
|
||||
void rglProvokingVertex( GLenum provokeMode);
|
||||
void rglDrawRangeElementsBaseVertex(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, GLvoid *indices, GLint basevertex);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
|
@ -52,6 +52,23 @@ typedef unsigned sthread_tls_t;
|
||||
*/
|
||||
sthread_t *sthread_create(void (*thread_func)(void*), void *userdata);
|
||||
|
||||
/**
|
||||
* sthread_create_with_priority:
|
||||
* @start_routine : thread entry callback function
|
||||
* @userdata : pointer to userdata that will be made
|
||||
* available in thread entry callback function
|
||||
* @thread_priority : thread priority hint value from [1-100]
|
||||
*
|
||||
* Create a new thread. It is possible for the caller to give a hint
|
||||
* for the thread's priority from [1-100]. Any passed in @thread_priority
|
||||
* values that are outside of this range will cause sthread_create() to
|
||||
* create a new thread using the operating system's default thread
|
||||
* priority.
|
||||
*
|
||||
* Returns: pointer to new thread if successful, otherwise NULL.
|
||||
*/
|
||||
sthread_t *sthread_create_with_priority(void (*thread_func)(void*), void *userdata, int thread_priority);
|
||||
|
||||
/**
|
||||
* sthread_detach:
|
||||
* @thread : pointer to thread object
|
||||
|
@ -27,6 +27,7 @@
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <boolean.h>
|
||||
#include <rthreads/rthreads.h>
|
||||
@ -161,6 +162,35 @@ static void *thread_wrap(void *data_)
|
||||
*/
|
||||
sthread_t *sthread_create(void (*thread_func)(void*), void *userdata)
|
||||
{
|
||||
return sthread_create_with_priority(thread_func, userdata, 0);
|
||||
}
|
||||
|
||||
/* TODO/FIXME - this needs to be implemented for Switch/3DS */
|
||||
#if !defined(SWITCH) && !defined(USE_WIN32_THREADS) && !defined(_3DS) && !defined(GEKKO)
|
||||
#define HAVE_THREAD_ATTR
|
||||
#endif
|
||||
|
||||
/**
|
||||
* sthread_create_with_priority:
|
||||
* @start_routine : thread entry callback function
|
||||
* @userdata : pointer to userdata that will be made
|
||||
* available in thread entry callback function
|
||||
* @thread_priority : thread priority hint value from [1-100]
|
||||
*
|
||||
* Create a new thread. It is possible for the caller to give a hint
|
||||
* for the thread's priority from [1-100]. Any passed in @thread_priority
|
||||
* values that are outside of this range will cause sthread_create() to
|
||||
* create a new thread using the operating system's default thread
|
||||
* priority.
|
||||
*
|
||||
* Returns: pointer to new thread if successful, otherwise NULL.
|
||||
*/
|
||||
sthread_t *sthread_create_with_priority(void (*thread_func)(void*), void *userdata, int thread_priority)
|
||||
{
|
||||
#ifdef HAVE_THREAD_ATTR
|
||||
pthread_attr_t thread_attr;
|
||||
bool thread_attr_needed = false;
|
||||
#endif
|
||||
bool thread_created = false;
|
||||
struct thread_data *data = NULL;
|
||||
sthread_t *thread = (sthread_t*)calloc(1, sizeof(*thread));
|
||||
@ -172,27 +202,48 @@ sthread_t *sthread_create(void (*thread_func)(void*), void *userdata)
|
||||
if (!data)
|
||||
goto error;
|
||||
|
||||
data->func = thread_func;
|
||||
data->userdata = userdata;
|
||||
data->func = thread_func;
|
||||
data->userdata = userdata;
|
||||
|
||||
#ifdef USE_WIN32_THREADS
|
||||
thread->thread = CreateThread(NULL, 0, thread_wrap, data, 0, &thread->id);
|
||||
thread_created = !!thread->thread;
|
||||
thread->thread = CreateThread(NULL, 0, thread_wrap, data, 0, &thread->id);
|
||||
thread_created = !!thread->thread;
|
||||
#else
|
||||
#if defined(VITA)
|
||||
pthread_attr_t thread_attr;
|
||||
|
||||
#ifdef HAVE_THREAD_ATTR
|
||||
pthread_attr_init(&thread_attr);
|
||||
|
||||
if ( (thread_priority >= 1) && (thread_priority <= 100) )
|
||||
{
|
||||
struct sched_param sp;
|
||||
memset(&sp, 0, sizeof(struct sched_param));
|
||||
sp.sched_priority = thread_priority;
|
||||
pthread_attr_setschedpolicy(&thread_attr, SCHED_RR);
|
||||
pthread_attr_setschedparam(&thread_attr, &sp);
|
||||
|
||||
thread_attr_needed = true;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(VITA)
|
||||
pthread_attr_setstacksize(&thread_attr , 0x10000 );
|
||||
thread_created = pthread_create(&thread->id, &thread_attr, thread_wrap, data) == 0;
|
||||
#else
|
||||
thread_created = pthread_create(&thread->id, NULL, thread_wrap, data) == 0;
|
||||
thread_attr_needed = true;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_THREAD_ATTR
|
||||
if (thread_attr_needed)
|
||||
thread_created = pthread_create(&thread->id, &thread_attr, thread_wrap, data) == 0;
|
||||
else
|
||||
#endif
|
||||
thread_created = pthread_create(&thread->id, NULL, thread_wrap, data) == 0;
|
||||
|
||||
#ifdef HAVE_THREAD_ATTR
|
||||
pthread_attr_destroy(&thread_attr);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if (!thread_created)
|
||||
goto error;
|
||||
|
||||
return thread;
|
||||
if (thread_created)
|
||||
return thread;
|
||||
|
||||
error:
|
||||
if (data)
|
||||
|
@ -28,30 +28,29 @@
|
||||
#include <switch.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include "../include/retro_inline.h"
|
||||
#include "../../verbosity.h"
|
||||
#include <retro_inline.h>
|
||||
|
||||
#define THREADVARS_MAGIC 0x21545624 // !TV$
|
||||
#define THREADVARS_MAGIC 0x21545624 /* !TV$ */
|
||||
int pthread_create(pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)(void *), void *arg);
|
||||
void pthread_exit(void *retval);
|
||||
|
||||
// This structure is exactly 0x20 bytes, if more is needed modify getThreadVars() below
|
||||
/* This structure is exactly 0x20 bytes, if more is needed modify getThreadVars() below */
|
||||
typedef struct
|
||||
{
|
||||
// Magic value used to check if the struct is initialized
|
||||
/* Magic value used to check if the struct is initialized */
|
||||
u32 magic;
|
||||
|
||||
// Thread handle, for mutexes
|
||||
/* Thread handle, for mutexes */
|
||||
Handle handle;
|
||||
|
||||
// Pointer to the current thread (if exists)
|
||||
/* Pointer to the current thread (if exists) */
|
||||
Thread *thread_ptr;
|
||||
|
||||
// Pointer to this thread's newlib state
|
||||
/* Pointer to this thread's newlib state */
|
||||
struct _reent *reent;
|
||||
|
||||
// Pointer to this thread's thread-local segment
|
||||
void *tls_tp; // !! Offset needs to be TLS+0x1F8 for __aarch64_read_tp !!
|
||||
/* Pointer to this thread's thread-local segment */
|
||||
void *tls_tp; /* !! Offset needs to be TLS+0x1F8 for __aarch64_read_tp !! */
|
||||
} ThreadVars;
|
||||
|
||||
static INLINE ThreadVars *getThreadVars(void)
|
||||
@ -77,9 +76,9 @@ static INLINE int pthread_mutex_init(pthread_mutex_t *mutex, const pthread_mutex
|
||||
return 0;
|
||||
}
|
||||
|
||||
INLINE int pthread_mutex_destroy(pthread_mutex_t *mutex)
|
||||
static INLINE int pthread_mutex_destroy(pthread_mutex_t *mutex)
|
||||
{
|
||||
// Nothing
|
||||
/* Nothing */
|
||||
*mutex = 0;
|
||||
|
||||
return 0;
|
||||
@ -101,7 +100,7 @@ static INLINE int pthread_mutex_unlock(pthread_mutex_t *mutex)
|
||||
INLINE int pthread_detach(pthread_t thread)
|
||||
{
|
||||
(void)thread;
|
||||
// Nothing for now
|
||||
/* Nothing for now */
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -154,7 +153,7 @@ static INLINE int pthread_cond_broadcast(pthread_cond_t *cond)
|
||||
|
||||
INLINE int pthread_cond_destroy(pthread_cond_t *cond)
|
||||
{
|
||||
// Nothing
|
||||
/* Nothing */
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -187,6 +187,12 @@ generic_deferred_push(deferred_push_core_content_dirs_subdir_list, DISPLAYLIST_
|
||||
generic_deferred_push(deferred_push_lakka_list, DISPLAYLIST_LAKKA)
|
||||
#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(
|
||||
menu_displaylist_info_t *info)
|
||||
{
|
||||
@ -875,6 +881,23 @@ static int menu_cbs_init_bind_deferred_push_compare_label(
|
||||
{
|
||||
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_core_information);
|
||||
}
|
||||
#ifdef HAVE_LAKKA_SWITCH
|
||||
else if (strstr(label,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_SWITCH_GPU_PROFILE)))
|
||||
{
|
||||
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_switch_gpu_profile);
|
||||
}
|
||||
else if (strstr(label,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_SWITCH_BACKLIGHT_CONTROL)))
|
||||
{
|
||||
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_switch_backlight_control);
|
||||
}
|
||||
else if (strstr(label,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_SWITCH_CPU_PROFILE)))
|
||||
{
|
||||
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_switch_cpu_profile);
|
||||
}
|
||||
#endif
|
||||
else if (strstr(label,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_SYSTEM_INFORMATION)))
|
||||
{
|
||||
|
@ -2503,6 +2503,64 @@ static int action_ok_deferred_list_stub(const char *path,
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef HAVE_LAKKA_SWITCH
|
||||
|
||||
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};
|
||||
|
||||
snprintf(command, sizeof(command), "cpu-profile set %s", profile_name);
|
||||
|
||||
system(command);
|
||||
|
||||
snprintf(command, sizeof(command), "Current profile set to %s", profile_name);
|
||||
|
||||
runloop_msg_queue_push(command, 1, 90, true);
|
||||
|
||||
return menu_cbs_exit();
|
||||
}
|
||||
|
||||
static int action_ok_set_switch_gpu_profile(const char *path,
|
||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||
{
|
||||
char* profile_name = SWITCH_GPU_PROFILES[entry_idx];
|
||||
|
||||
char command[PATH_MAX_LENGTH] = {0};
|
||||
|
||||
snprintf(command, sizeof(command), "gpu-profile set %s", profile_name);
|
||||
|
||||
system(command);
|
||||
|
||||
snprintf(command, sizeof(command), "Current profile set to %s", profile_name);
|
||||
|
||||
runloop_msg_queue_push(command, 1, 90, true);
|
||||
|
||||
return menu_cbs_exit();
|
||||
}
|
||||
|
||||
static int action_ok_set_switch_backlight(const char *path,
|
||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||
{
|
||||
int brightness = SWITCH_BRIGHTNESS[entry_idx];
|
||||
|
||||
char command[PATH_MAX_LENGTH] = {0};
|
||||
|
||||
snprintf(command, sizeof(command), "echo %d > /sys/class/backlight/backlight/brightness", brightness);
|
||||
|
||||
system(command);
|
||||
|
||||
snprintf(command, sizeof(command), "Brightness set to %d%%", brightness);
|
||||
|
||||
runloop_msg_queue_push(command, 1, 90, true);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
static int action_ok_load_core_deferred(const char *path,
|
||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||
{
|
||||
@ -3869,8 +3927,11 @@ int lan_room_count;
|
||||
|
||||
void netplay_refresh_rooms_menu(file_list_t *list)
|
||||
{
|
||||
char s[4115];
|
||||
char s[8300];
|
||||
int i = 0;
|
||||
int room_type = 0;
|
||||
|
||||
s[0] = '\0';
|
||||
|
||||
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, list);
|
||||
|
||||
@ -3948,14 +4009,16 @@ void netplay_refresh_rooms_menu(file_list_t *list)
|
||||
snprintf(s, sizeof(s), "%s: %s%s",
|
||||
netplay_room_list[i].lan ? "Local" :
|
||||
(netplay_room_list[i].host_method == NETPLAY_HOST_METHOD_MITM ?
|
||||
"Internet (relay)" : "Internet (direct)"),
|
||||
"Internet (Relay)" : "Internet"),
|
||||
netplay_room_list[i].nickname, country);
|
||||
|
||||
room_type = netplay_room_list[i].lan ? MENU_ROOM_LAN : (netplay_room_list[i].host_method == NETPLAY_HOST_METHOD_MITM ? MENU_ROOM_RELAY : MENU_ROOM);
|
||||
|
||||
menu_entries_append_enum(list,
|
||||
s,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_CONNECT_NETPLAY_ROOM),
|
||||
MENU_ENUM_LABEL_CONNECT_NETPLAY_ROOM,
|
||||
MENU_SETTINGS_NETPLAY_ROOMS_START + i, 0, 0);
|
||||
room_type, 0, 0);
|
||||
}
|
||||
|
||||
netplay_rooms_free();
|
||||
@ -4959,6 +5022,11 @@ static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs,
|
||||
case MENU_ENUM_LABEL_HELP_LIST:
|
||||
case MENU_ENUM_LABEL_INFORMATION_LIST:
|
||||
case MENU_ENUM_LABEL_CONTENT_SETTINGS:
|
||||
#ifdef HAVE_LAKKA_SWITCH
|
||||
case MENU_ENUM_LABEL_SWITCH_GPU_PROFILE:
|
||||
case MENU_ENUM_LABEL_SWITCH_BACKLIGHT_CONTROL:
|
||||
case MENU_ENUM_LABEL_SWITCH_CPU_PROFILE:
|
||||
#endif
|
||||
BIND_ACTION_OK(cbs, action_ok_push_default);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_LOAD_CONTENT_SPECIAL:
|
||||
@ -5382,6 +5450,17 @@ static int menu_cbs_init_bind_ok_compare_type(menu_file_list_cbs_t *cbs,
|
||||
BIND_ACTION_OK(cbs, action_ok_playlist_entry);
|
||||
}
|
||||
break;
|
||||
#ifdef HAVE_LAKKA_SWITCH
|
||||
case MENU_SET_SWITCH_GPU_PROFILE:
|
||||
BIND_ACTION_OK(cbs, action_ok_set_switch_gpu_profile);
|
||||
break;
|
||||
case MENU_SET_SWITCH_BRIGHTNESS:
|
||||
BIND_ACTION_OK(cbs, action_ok_set_switch_backlight);
|
||||
break;
|
||||
case MENU_SET_SWITCH_CPU_PROFILE:
|
||||
BIND_ACTION_OK(cbs, action_ok_set_switch_cpu_profile);
|
||||
break;
|
||||
#endif
|
||||
case FILE_TYPE_RPL_ENTRY:
|
||||
BIND_ACTION_OK(cbs, action_ok_rpl_entry);
|
||||
break;
|
||||
|
@ -296,6 +296,7 @@ default_sublabel_macro(action_bind_sublabel_pointer_enable, MENU_
|
||||
default_sublabel_macro(action_bind_sublabel_thumbnails, MENU_ENUM_SUBLABEL_THUMBNAILS)
|
||||
default_sublabel_macro(action_bind_sublabel_left_thumbnails, MENU_ENUM_SUBLABEL_LEFT_THUMBNAILS)
|
||||
default_sublabel_macro(action_bind_sublabel_timedate_enable, MENU_ENUM_SUBLABEL_TIMEDATE_ENABLE)
|
||||
default_sublabel_macro(action_bind_sublabel_timedate_style, MENU_ENUM_SUBLABEL_TIMEDATE_STYLE)
|
||||
default_sublabel_macro(action_bind_sublabel_battery_level_enable, MENU_ENUM_SUBLABEL_BATTERY_LEVEL_ENABLE)
|
||||
default_sublabel_macro(action_bind_sublabel_navigation_wraparound, MENU_ENUM_SUBLABEL_NAVIGATION_WRAPAROUND)
|
||||
default_sublabel_macro(action_bind_sublabel_audio_resampler_quality, MENU_ENUM_SUBLABEL_AUDIO_RESAMPLER_QUALITY)
|
||||
@ -478,6 +479,12 @@ default_sublabel_macro(action_bind_sublabel_show_wimp,
|
||||
#endif
|
||||
default_sublabel_macro(action_bind_sublabel_discord_allow, MENU_ENUM_SUBLABEL_DISCORD_ALLOW)
|
||||
|
||||
#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
|
||||
|
||||
static int action_bind_sublabel_cheevos_entry(
|
||||
file_list_t *list,
|
||||
unsigned type, unsigned i,
|
||||
@ -524,11 +531,14 @@ static int action_bind_sublabel_remap_kbd_sublabel(
|
||||
{
|
||||
unsigned user_idx = (type - MENU_SETTINGS_INPUT_DESC_KBD_BEGIN) / RARCH_FIRST_CUSTOM_BIND;
|
||||
|
||||
snprintf(s, len, "User #%d: %s", user_idx + 1,
|
||||
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) : "N/A"));
|
||||
snprintf(s, len, "%s #%d: %s",
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_USER),
|
||||
user_idx + 1,
|
||||
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)));
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -548,7 +558,9 @@ static int action_bind_sublabel_audio_mixer_stream(
|
||||
switch (stream->state)
|
||||
{
|
||||
case AUDIO_STREAM_STATE_NONE:
|
||||
strlcpy(msg, "N/A", sizeof(msg));
|
||||
strlcpy(msg,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE),
|
||||
sizeof(msg));
|
||||
break;
|
||||
case AUDIO_STREAM_STATE_STOPPED:
|
||||
strlcpy(msg, "Stopped", sizeof(msg));
|
||||
@ -564,7 +576,8 @@ static int action_bind_sublabel_audio_mixer_stream(
|
||||
break;
|
||||
}
|
||||
|
||||
snprintf(s, len, "State : %s | Volume: %.2f dB", msg,
|
||||
snprintf(s, len, "State : %s | %s: %.2f dB", msg,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_MIXER_ACTION_VOLUME),
|
||||
stream->volume);
|
||||
return 0;
|
||||
}
|
||||
@ -578,11 +591,14 @@ static int action_bind_sublabel_remap_sublabel(
|
||||
unsigned offset = (type - MENU_SETTINGS_INPUT_DESC_BEGIN)
|
||||
/ (RARCH_FIRST_CUSTOM_BIND + 8);
|
||||
|
||||
snprintf(s, len, "User #%d: %s", offset + 1,
|
||||
input_config_get_device_display_name(offset) ?
|
||||
input_config_get_device_display_name(offset) :
|
||||
(input_config_get_device_name(offset) ?
|
||||
input_config_get_device_name(offset) : "N/A"));
|
||||
snprintf(s, len, "%s #%d: %s",
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_USER),
|
||||
offset + 1,
|
||||
input_config_get_device_display_name(offset) ?
|
||||
input_config_get_device_display_name(offset) :
|
||||
(input_config_get_device_name(offset) ?
|
||||
input_config_get_device_name(offset) :
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE)));
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -618,6 +634,7 @@ static int action_bind_sublabel_netplay_room(
|
||||
const char *gamename = NULL;
|
||||
const char *core_ver = NULL;
|
||||
const char *frontend = NULL;
|
||||
const char *na = NULL;
|
||||
|
||||
/* This offset may cause issues if any entries are added to this menu */
|
||||
unsigned offset = i - 3;
|
||||
@ -631,13 +648,14 @@ static int action_bind_sublabel_netplay_room(
|
||||
core_ver = netplay_room_list[offset].coreversion;
|
||||
gamecrc = netplay_room_list[offset].gamecrc;
|
||||
frontend = netplay_room_list[offset].frontend;
|
||||
na = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE);
|
||||
|
||||
snprintf(s, len,
|
||||
"RetroArch: %s (%s)\nCore: %s (%s)\nGame: %s (%08x)",
|
||||
string_is_empty(ra_version) ? "n/a" : ra_version,
|
||||
string_is_empty(frontend) ? "n/a" : frontend,
|
||||
string_is_empty(ra_version) ? na : ra_version,
|
||||
string_is_empty(frontend) ? na : frontend,
|
||||
corename, core_ver,
|
||||
!string_is_equal(gamename, "N/A") ? gamename : "n/a",
|
||||
!string_is_equal(gamename, na) ? gamename : na,
|
||||
gamecrc);
|
||||
#if 0
|
||||
strlcpy(s, corename, len);
|
||||
@ -1277,6 +1295,9 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
|
||||
case MENU_ENUM_LABEL_TIMEDATE_ENABLE:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_timedate_enable);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_TIMEDATE_STYLE:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_timedate_style);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_THUMBNAILS:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_thumbnails);
|
||||
break;
|
||||
@ -1993,6 +2014,17 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
|
||||
case MENU_ENUM_LABEL_SHOW_WIMP:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_show_wimp);
|
||||
break;
|
||||
#endif
|
||||
#ifdef HAVE_LAKKA_SWITCH
|
||||
case MENU_ENUM_LABEL_SWITCH_CPU_PROFILE:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_switch_cpu_profile);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_SWITCH_GPU_PROFILE:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_switch_gpu_profile);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_SWITCH_BACKLIGHT_CONTROL:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_switch_backlight_control);
|
||||
break;
|
||||
#endif
|
||||
case MENU_ENUM_LABEL_CHEAT_APPLY_AFTER_LOAD:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_cheat_apply_after_load);
|
||||
|
@ -210,6 +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)
|
||||
|
||||
#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
|
||||
|
||||
static int action_get_title_generic(char *s, size_t len, const char *path,
|
||||
const char *text)
|
||||
{
|
||||
@ -873,6 +879,17 @@ 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;
|
||||
#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;
|
||||
#endif
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
@ -1159,6 +1176,17 @@ 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;
|
||||
#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;
|
||||
#endif
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
|
@ -1558,11 +1558,11 @@ static void materialui_frame(void *data, video_frame_info_t *video_info)
|
||||
{
|
||||
int ticker_limit, value_len;
|
||||
char title_buf_msg_tmp[255];
|
||||
char title_buf_msg[255];
|
||||
char title_buf_msg[640];
|
||||
|
||||
title_buf_msg_tmp[0] = title_buf_msg[0] = '\0';
|
||||
|
||||
snprintf(title_buf_msg, sizeof(title_buf), "%s (%s)",
|
||||
snprintf(title_buf_msg, sizeof(title_buf_msg), "%s (%s)",
|
||||
title_buf, title_msg);
|
||||
value_len = (int)utf8len(title_buf);
|
||||
ticker_limit = (int)((usable_width / mui->glyph_width) - (value_len + 2));
|
||||
|
@ -596,7 +596,7 @@ static void rgui_render(void *data, bool is_idle)
|
||||
|
||||
datetime.s = timedate;
|
||||
datetime.len = sizeof(timedate);
|
||||
datetime.time_mode = 3;
|
||||
datetime.time_mode = 4;
|
||||
|
||||
menu_display_timedate(&datetime);
|
||||
|
||||
|
@ -105,13 +105,8 @@ enum
|
||||
#ifdef HAVE_NETWORKING
|
||||
XMB_TEXTURE_NETPLAY,
|
||||
XMB_TEXTURE_ROOM,
|
||||
XMB_TEXTURE_IROOM,
|
||||
XMB_TEXTURE_LANROOM,
|
||||
#if 0
|
||||
/* stub these out until we have the icons */
|
||||
XMB_TEXTURE_ROOM_LAN,
|
||||
XMB_TEXTURE_ROOM_MITM,
|
||||
#endif
|
||||
XMB_TEXTURE_ROOM_RELAY,
|
||||
#endif
|
||||
#ifdef HAVE_IMAGEVIEWER
|
||||
XMB_TEXTURE_IMAGES,
|
||||
@ -1086,8 +1081,8 @@ static void xmb_update_savestate_thumbnail_path(void *data, unsigned i)
|
||||
|| (string_is_equal(entry.label, "loadstate"))
|
||||
|| (string_is_equal(entry.label, "savestate"))))
|
||||
{
|
||||
size_t path_size = 8024 * sizeof(char);
|
||||
char *path = (char*)malloc(8204 * sizeof(char));
|
||||
size_t path_size = 8204 * sizeof(char);
|
||||
char *path = (char*)malloc(path_size);
|
||||
global_t *global = global_get_ptr();
|
||||
|
||||
path[0] = '\0';
|
||||
@ -2391,6 +2386,10 @@ static uintptr_t xmb_icon_get_id(xmb_handle_t *xmb,
|
||||
case MENU_ENUM_LABEL_SHOW_WIMP:
|
||||
case MENU_ENUM_LABEL_USER_INTERFACE_SETTINGS:
|
||||
return xmb->textures.list[XMB_TEXTURE_UI];
|
||||
#ifdef HAVE_LAKKA_SWITCH
|
||||
case MENU_ENUM_LABEL_SWITCH_GPU_PROFILE:
|
||||
case MENU_ENUM_LABEL_SWITCH_CPU_PROFILE:
|
||||
#endif
|
||||
case MENU_ENUM_LABEL_POWER_MANAGEMENT_SETTINGS:
|
||||
return xmb->textures.list[XMB_TEXTURE_POWER];
|
||||
case MENU_ENUM_LABEL_RETRO_ACHIEVEMENTS_SETTINGS:
|
||||
@ -2422,9 +2421,7 @@ static uintptr_t xmb_icon_get_id(xmb_handle_t *xmb,
|
||||
case MENU_ENUM_LABEL_NETPLAY_ENABLE_CLIENT:
|
||||
return xmb->textures.list[XMB_TEXTURE_ROOM];
|
||||
case MENU_ENUM_LABEL_NETPLAY_REFRESH_ROOMS:
|
||||
return xmb->textures.list[XMB_TEXTURE_IROOM];
|
||||
case MENU_ENUM_LABEL_NETPLAY_LAN_SCAN_SETTINGS:
|
||||
return xmb->textures.list[XMB_TEXTURE_LANROOM];
|
||||
return xmb->textures.list[XMB_TEXTURE_RELOAD];
|
||||
#endif
|
||||
default:
|
||||
break;
|
||||
@ -2515,11 +2512,11 @@ static uintptr_t xmb_icon_get_id(xmb_handle_t *xmb,
|
||||
return xmb->textures.list[XMB_TEXTURE_RESUME];
|
||||
case MENU_SETTING_ACTION_RESUME_ACHIEVEMENTS:
|
||||
return xmb->textures.list[XMB_TEXTURE_RUN];
|
||||
case MENU_SETTING_ACTION:
|
||||
if (xmb->depth == 3)
|
||||
return xmb->textures.list[XMB_TEXTURE_SUBSETTING];
|
||||
return xmb->textures.list[XMB_TEXTURE_SETTING];
|
||||
|
||||
case MENU_SETTING_GROUP:
|
||||
#ifdef HAVE_LAKKA_SWITCH
|
||||
case MENU_SET_SWITCH_BRIGHTNESS:
|
||||
#endif
|
||||
return xmb->textures.list[XMB_TEXTURE_SETTING];
|
||||
case MENU_INFO_MESSAGE:
|
||||
return xmb->textures.list[XMB_TEXTURE_CORE_INFO];
|
||||
@ -2528,14 +2525,16 @@ static uintptr_t xmb_icon_get_id(xmb_handle_t *xmb,
|
||||
#ifdef HAVE_NETWORKING
|
||||
case MENU_ROOM:
|
||||
return xmb->textures.list[XMB_TEXTURE_ROOM];
|
||||
#if 0
|
||||
/* stub these out until we have the icons */
|
||||
case MENU_ROOM_LAN:
|
||||
return xmb->textures.list[XMB_TEXTURE_ROOM_LAN];
|
||||
case MENU_ROOM_MITM:
|
||||
return xmb->textures.list[XMB_TEXTURE_ROOM_MITM];
|
||||
#endif
|
||||
case MENU_ROOM_RELAY:
|
||||
return xmb->textures.list[XMB_TEXTURE_ROOM_RELAY];
|
||||
#endif
|
||||
case MENU_SETTING_ACTION:
|
||||
if (xmb->depth <= 3)
|
||||
return xmb->textures.list[XMB_TEXTURE_SETTING];
|
||||
default:
|
||||
return xmb->textures.list[XMB_TEXTURE_SUBSETTING];
|
||||
}
|
||||
|
||||
#ifdef HAVE_CHEEVOS
|
||||
@ -2741,7 +2740,7 @@ static int xmb_draw_item(
|
||||
if (i == current && width > 320 && height > 240
|
||||
&& !string_is_empty(entry->sublabel))
|
||||
{
|
||||
char entry_sublabel[255] = {0};
|
||||
char entry_sublabel[512] = {0};
|
||||
|
||||
label_offset = - xmb->margins_label_top;
|
||||
|
||||
@ -3629,7 +3628,7 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
|
||||
|
||||
datetime.s = timedate;
|
||||
datetime.len = sizeof(timedate);
|
||||
datetime.time_mode = 4;
|
||||
datetime.time_mode = settings->uints.menu_timedate_style;
|
||||
|
||||
menu_display_timedate(&datetime);
|
||||
|
||||
@ -4436,188 +4435,285 @@ static bool xmb_load_image(void *userdata, void *data, enum menu_image_type type
|
||||
|
||||
static const char *xmb_texture_path(unsigned id)
|
||||
{
|
||||
char *iconpath = (char*) malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
char *icon_name = (char*) malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
char *icon_fullpath = (char*) malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
|
||||
iconpath[0] = icon_name[0] = icon_fullpath[0] = '\0';
|
||||
|
||||
switch (id)
|
||||
{
|
||||
case XMB_TEXTURE_MAIN_MENU:
|
||||
#if defined(HAVE_LAKKA)
|
||||
return "lakka.png";
|
||||
icon_name = "lakka.png";
|
||||
break;
|
||||
#else
|
||||
return "retroarch.png";
|
||||
icon_name = "retroarch.png";
|
||||
break;
|
||||
#endif
|
||||
case XMB_TEXTURE_SETTINGS:
|
||||
return "settings.png";
|
||||
icon_name = "settings.png";
|
||||
break;
|
||||
case XMB_TEXTURE_HISTORY:
|
||||
return "history.png";
|
||||
icon_name = "history.png";
|
||||
break;
|
||||
case XMB_TEXTURE_FAVORITES:
|
||||
return "favorites.png";
|
||||
icon_name = "favorites.png";
|
||||
break;
|
||||
case XMB_TEXTURE_ADD_FAVORITE:
|
||||
return "add-favorite.png";
|
||||
icon_name = "add-favorite.png";
|
||||
break;
|
||||
case XMB_TEXTURE_MUSICS:
|
||||
return "musics.png";
|
||||
icon_name = "musics.png";
|
||||
break;
|
||||
#if defined(HAVE_FFMPEG) || defined(HAVE_MPV)
|
||||
case XMB_TEXTURE_MOVIES:
|
||||
return "movies.png";
|
||||
icon_name = "movies.png";
|
||||
break;
|
||||
#endif
|
||||
#ifdef HAVE_IMAGEVIEWER
|
||||
case XMB_TEXTURE_IMAGES:
|
||||
return "images.png";
|
||||
icon_name = "images.png";
|
||||
break;
|
||||
#endif
|
||||
case XMB_TEXTURE_SETTING:
|
||||
return "setting.png";
|
||||
icon_name = "setting.png";
|
||||
break;
|
||||
case XMB_TEXTURE_SUBSETTING:
|
||||
return "subsetting.png";
|
||||
icon_name = "subsetting.png";
|
||||
break;
|
||||
case XMB_TEXTURE_ARROW:
|
||||
return "arrow.png";
|
||||
icon_name = "arrow.png";
|
||||
break;
|
||||
case XMB_TEXTURE_RUN:
|
||||
return "run.png";
|
||||
icon_name = "run.png";
|
||||
break;
|
||||
case XMB_TEXTURE_CLOSE:
|
||||
return "close.png";
|
||||
icon_name = "close.png";
|
||||
break;
|
||||
case XMB_TEXTURE_RESUME:
|
||||
return "resume.png";
|
||||
icon_name = "resume.png";
|
||||
break;
|
||||
case XMB_TEXTURE_CLOCK:
|
||||
return "clock.png";
|
||||
icon_name = "clock.png";
|
||||
break;
|
||||
case XMB_TEXTURE_BATTERY_FULL:
|
||||
return "battery-full.png";
|
||||
icon_name = "battery-full.png";
|
||||
break;
|
||||
case XMB_TEXTURE_BATTERY_CHARGING:
|
||||
return "battery-charging.png";
|
||||
icon_name = "battery-charging.png";
|
||||
break;
|
||||
case XMB_TEXTURE_POINTER:
|
||||
return "pointer.png";
|
||||
icon_name = "pointer.png";
|
||||
break;
|
||||
case XMB_TEXTURE_SAVESTATE:
|
||||
return "savestate.png";
|
||||
icon_name = "savestate.png";
|
||||
break;
|
||||
case XMB_TEXTURE_LOADSTATE:
|
||||
return "loadstate.png";
|
||||
icon_name = "loadstate.png";
|
||||
break;
|
||||
case XMB_TEXTURE_UNDO:
|
||||
return "undo.png";
|
||||
icon_name = "undo.png";
|
||||
break;
|
||||
case XMB_TEXTURE_CORE_INFO:
|
||||
return "core-infos.png";
|
||||
icon_name = "core-infos.png";
|
||||
break;
|
||||
case XMB_TEXTURE_WIFI:
|
||||
return "wifi.png";
|
||||
icon_name = "wifi.png";
|
||||
break;
|
||||
case XMB_TEXTURE_CORE_OPTIONS:
|
||||
return "core-options.png";
|
||||
icon_name = "core-options.png";
|
||||
break;
|
||||
case XMB_TEXTURE_INPUT_REMAPPING_OPTIONS:
|
||||
return "core-input-remapping-options.png";
|
||||
icon_name = "core-input-remapping-options.png";
|
||||
break;
|
||||
case XMB_TEXTURE_CHEAT_OPTIONS:
|
||||
return "core-cheat-options.png";
|
||||
icon_name = "core-cheat-options.png";
|
||||
break;
|
||||
case XMB_TEXTURE_DISK_OPTIONS:
|
||||
return "core-disk-options.png";
|
||||
icon_name = "core-disk-options.png";
|
||||
break;
|
||||
case XMB_TEXTURE_SHADER_OPTIONS:
|
||||
return "core-shader-options.png";
|
||||
icon_name = "core-shader-options.png";
|
||||
break;
|
||||
case XMB_TEXTURE_ACHIEVEMENT_LIST:
|
||||
return "achievement-list.png";
|
||||
icon_name = "achievement-list.png";
|
||||
break;
|
||||
case XMB_TEXTURE_SCREENSHOT:
|
||||
return "screenshot.png";
|
||||
icon_name = "screenshot.png";
|
||||
break;
|
||||
case XMB_TEXTURE_RELOAD:
|
||||
return "reload.png";
|
||||
icon_name = "reload.png";
|
||||
break;
|
||||
case XMB_TEXTURE_RENAME:
|
||||
return "rename.png";
|
||||
icon_name = "rename.png";
|
||||
break;
|
||||
case XMB_TEXTURE_FILE:
|
||||
return "file.png";
|
||||
icon_name = "file.png";
|
||||
break;
|
||||
case XMB_TEXTURE_FOLDER:
|
||||
return "folder.png";
|
||||
icon_name = "folder.png";
|
||||
break;
|
||||
case XMB_TEXTURE_ZIP:
|
||||
return "zip.png";
|
||||
icon_name = "zip.png";
|
||||
break;
|
||||
case XMB_TEXTURE_MUSIC:
|
||||
return "music.png";
|
||||
icon_name = "music.png";
|
||||
break;
|
||||
case XMB_TEXTURE_FAVORITE:
|
||||
return "favorites-content.png";
|
||||
icon_name = "favorites-content.png";
|
||||
break;
|
||||
case XMB_TEXTURE_IMAGE:
|
||||
return "image.png";
|
||||
icon_name = "image.png";
|
||||
break;
|
||||
case XMB_TEXTURE_MOVIE:
|
||||
return "movie.png";
|
||||
icon_name = "movie.png";
|
||||
break;
|
||||
case XMB_TEXTURE_CORE:
|
||||
return "core.png";
|
||||
icon_name = "core.png";
|
||||
break;
|
||||
case XMB_TEXTURE_RDB:
|
||||
return "database.png";
|
||||
icon_name = "database.png";
|
||||
break;
|
||||
case XMB_TEXTURE_CURSOR:
|
||||
return "cursor.png";
|
||||
icon_name = "cursor.png";
|
||||
break;
|
||||
case XMB_TEXTURE_SWITCH_ON:
|
||||
return "on.png";
|
||||
icon_name = "on.png";
|
||||
break;
|
||||
case XMB_TEXTURE_SWITCH_OFF:
|
||||
return "off.png";
|
||||
icon_name = "off.png";
|
||||
break;
|
||||
case XMB_TEXTURE_ADD:
|
||||
return "add.png";
|
||||
icon_name = "add.png";
|
||||
break;
|
||||
#ifdef HAVE_NETWORKING
|
||||
case XMB_TEXTURE_NETPLAY:
|
||||
return "netplay.png";
|
||||
icon_name = "netplay.png";
|
||||
break;
|
||||
case XMB_TEXTURE_ROOM:
|
||||
return "room.png";
|
||||
case XMB_TEXTURE_LANROOM:
|
||||
return "netplay - LAN Room.png";
|
||||
case XMB_TEXTURE_IROOM:
|
||||
return "netplay - iRoom.png";
|
||||
#if 0
|
||||
/* stub these out until we have the icons */
|
||||
icon_name = "menu_room.png";
|
||||
break;
|
||||
case XMB_TEXTURE_ROOM_LAN:
|
||||
return "room_lan.png";
|
||||
case XMB_TEXTURE_ROOM_MITM:
|
||||
return "room_mitm.png";
|
||||
#endif
|
||||
icon_name = "menu_room_lan.png";
|
||||
break;
|
||||
case XMB_TEXTURE_ROOM_RELAY:
|
||||
icon_name = "menu_room_relay.png";
|
||||
break;
|
||||
#endif
|
||||
case XMB_TEXTURE_KEY:
|
||||
return "key.png";
|
||||
icon_name = "key.png";
|
||||
break;
|
||||
case XMB_TEXTURE_KEY_HOVER:
|
||||
return "key-hover.png";
|
||||
icon_name = "key-hover.png";
|
||||
break;
|
||||
case XMB_TEXTURE_DIALOG_SLICE:
|
||||
return "dialog-slice.png";
|
||||
icon_name = "dialog-slice.png";
|
||||
break;
|
||||
case XMB_TEXTURE_ACHIEVEMENTS:
|
||||
return "menu_achievements.png";
|
||||
icon_name = "menu_achievements.png";
|
||||
break;
|
||||
case XMB_TEXTURE_AUDIO:
|
||||
return "menu_audio.png";
|
||||
icon_name = "menu_audio.png";
|
||||
break;
|
||||
case XMB_TEXTURE_DRIVERS:
|
||||
return "menu_drivers.png";
|
||||
icon_name = "menu_drivers.png";
|
||||
break;
|
||||
case XMB_TEXTURE_EXIT:
|
||||
return "menu_exit.png";
|
||||
icon_name = "menu_exit.png";
|
||||
break;
|
||||
case XMB_TEXTURE_FRAMESKIP:
|
||||
return "menu_frameskip.png";
|
||||
icon_name = "menu_frameskip.png";
|
||||
break;
|
||||
case XMB_TEXTURE_HELP:
|
||||
return "menu_help.png";
|
||||
icon_name = "menu_help.png";
|
||||
break;
|
||||
case XMB_TEXTURE_INFO:
|
||||
return "menu_info.png";
|
||||
icon_name = "menu_info.png";
|
||||
break;
|
||||
case XMB_TEXTURE_INPUT:
|
||||
return "Libretro - Pad.png";
|
||||
icon_name = "Libretro - Pad.png";
|
||||
break;
|
||||
case XMB_TEXTURE_LATENCY:
|
||||
return "menu_latency.png";
|
||||
icon_name = "menu_latency.png";
|
||||
break;
|
||||
case XMB_TEXTURE_NETWORK:
|
||||
return "menu_network.png";
|
||||
icon_name = "menu_network.png";
|
||||
break;
|
||||
case XMB_TEXTURE_POWER:
|
||||
return "menu_power.png";
|
||||
icon_name = "menu_power.png";
|
||||
break;
|
||||
case XMB_TEXTURE_RECORD:
|
||||
return "menu_record.png";
|
||||
icon_name = "menu_record.png";
|
||||
break;
|
||||
case XMB_TEXTURE_SAVING:
|
||||
return "menu_saving.png";
|
||||
icon_name = "menu_saving.png";
|
||||
break;
|
||||
case XMB_TEXTURE_UPDATER:
|
||||
return "menu_updater.png";
|
||||
icon_name = "menu_updater.png";
|
||||
break;
|
||||
case XMB_TEXTURE_VIDEO:
|
||||
return "menu_video.png";
|
||||
icon_name = "menu_video.png";
|
||||
break;
|
||||
case XMB_TEXTURE_MIXER:
|
||||
return "menu_mixer.png";
|
||||
icon_name = "menu_mixer.png";
|
||||
break;
|
||||
case XMB_TEXTURE_LOG:
|
||||
return "menu_log.png";
|
||||
icon_name = "menu_log.png";
|
||||
break;
|
||||
case XMB_TEXTURE_OSD:
|
||||
return "menu_osd.png";
|
||||
icon_name = "menu_osd.png";
|
||||
break;
|
||||
case XMB_TEXTURE_UI:
|
||||
return "menu_ui.png";
|
||||
icon_name = "menu_ui.png";
|
||||
break;
|
||||
case XMB_TEXTURE_USER:
|
||||
return "menu_user.png";
|
||||
icon_name = "menu_user.png";
|
||||
break;
|
||||
case XMB_TEXTURE_PRIVACY:
|
||||
return "menu_privacy.png";
|
||||
icon_name = "menu_privacy.png";
|
||||
break;
|
||||
case XMB_TEXTURE_PLAYLIST:
|
||||
return "menu_playlist.png";
|
||||
icon_name = "menu_playlist.png";
|
||||
break;
|
||||
case XMB_TEXTURE_QUICKMENU:
|
||||
return "menu_quickmenu.png";
|
||||
icon_name = "menu_quickmenu.png";
|
||||
break;
|
||||
case XMB_TEXTURE_REWIND:
|
||||
return "menu_rewind.png";
|
||||
icon_name = "menu_rewind.png";
|
||||
break;
|
||||
case XMB_TEXTURE_OVERLAY:
|
||||
return "menu_overlay.png";
|
||||
icon_name = "menu_overlay.png";
|
||||
break;
|
||||
case XMB_TEXTURE_OVERRIDE:
|
||||
return "menu_override.png";
|
||||
icon_name = "menu_override.png";
|
||||
break;
|
||||
case XMB_TEXTURE_NOTIFICATIONS:
|
||||
return "menu_notifications.png";
|
||||
icon_name = "menu_notifications.png";
|
||||
break;
|
||||
case XMB_TEXTURE_STREAM:
|
||||
return "menu_stream.png";
|
||||
icon_name = "menu_stream.png";
|
||||
break;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
fill_pathname_application_special(iconpath,
|
||||
PATH_MAX_LENGTH * sizeof(char),
|
||||
APPLICATION_SPECIAL_DIRECTORY_ASSETS_XMB_ICONS);
|
||||
|
||||
icon_fullpath = iconpath;
|
||||
strlcat(icon_fullpath, icon_name, PATH_MAX_LENGTH * sizeof(char));
|
||||
|
||||
if (!filestream_exists(icon_fullpath))
|
||||
{
|
||||
/* If the icon doesn't exist at least try to return the subsetting icon*/
|
||||
if (id == XMB_TEXTURE_DIALOG_SLICE || id == XMB_TEXTURE_KEY_HOVER || id == XMB_TEXTURE_KEY_HOVER)
|
||||
return NULL;
|
||||
else
|
||||
return "subsetting.png";
|
||||
}
|
||||
else
|
||||
return icon_name;
|
||||
|
||||
}
|
||||
|
||||
static void xmb_context_reset_textures(
|
||||
@ -5327,6 +5423,17 @@ static int xmb_list_push(void *data, void *userdata,
|
||||
menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry);
|
||||
}
|
||||
|
||||
#ifdef HAVE_LAKKA_SWITCH
|
||||
entry.enum_idx = MENU_ENUM_LABEL_SWITCH_CPU_PROFILE;
|
||||
menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry);
|
||||
|
||||
entry.enum_idx = MENU_ENUM_LABEL_SWITCH_GPU_PROFILE;
|
||||
menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry);
|
||||
|
||||
entry.enum_idx = MENU_ENUM_LABEL_SWITCH_BACKLIGHT_CONTROL;
|
||||
menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry);
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_DYNAMIC
|
||||
entry.enum_idx = MENU_ENUM_LABEL_RESTART_RETROARCH;
|
||||
menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry);
|
||||
@ -5343,6 +5450,7 @@ static int xmb_list_push(void *data, void *userdata,
|
||||
entry.enum_idx = MENU_ENUM_LABEL_HELP_LIST;
|
||||
menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry);
|
||||
}
|
||||
|
||||
#if !defined(IOS)
|
||||
if (settings->bools.menu_show_quit_retroarch)
|
||||
{
|
||||
|
@ -100,7 +100,7 @@ menu_display_ctx_driver_t menu_display_ctx_caca = {
|
||||
menu_display_caca_get_default_tex_coords,
|
||||
menu_display_caca_font_init_first,
|
||||
MENU_VIDEO_DRIVER_CACA,
|
||||
"menu_display_caca",
|
||||
"caca",
|
||||
false,
|
||||
NULL,
|
||||
NULL
|
||||
|
@ -210,7 +210,7 @@ menu_display_ctx_driver_t menu_display_ctx_ctr = {
|
||||
menu_display_ctr_get_default_tex_coords,
|
||||
menu_display_ctr_font_init_first,
|
||||
MENU_VIDEO_DRIVER_CTR,
|
||||
"menu_display_ctr",
|
||||
"ctr",
|
||||
true,
|
||||
NULL,
|
||||
NULL
|
||||
|
@ -288,7 +288,7 @@ menu_display_ctx_driver_t menu_display_ctx_d3d10 = {
|
||||
menu_display_d3d10_get_default_tex_coords,
|
||||
menu_display_d3d10_font_init_first,
|
||||
MENU_VIDEO_DRIVER_DIRECT3D10,
|
||||
"menu_display_d3d10",
|
||||
"d3d10",
|
||||
true,
|
||||
NULL,
|
||||
NULL
|
||||
|
@ -287,7 +287,7 @@ menu_display_ctx_driver_t menu_display_ctx_d3d11 = {
|
||||
menu_display_d3d11_get_default_tex_coords,
|
||||
menu_display_d3d11_font_init_first,
|
||||
MENU_VIDEO_DRIVER_DIRECT3D11,
|
||||
"menu_display_d3d11",
|
||||
"d3d11",
|
||||
true,
|
||||
NULL,
|
||||
NULL
|
||||
|
@ -308,7 +308,7 @@ menu_display_ctx_driver_t menu_display_ctx_d3d12 = {
|
||||
menu_display_d3d12_get_default_tex_coords,
|
||||
menu_display_d3d12_font_init_first,
|
||||
MENU_VIDEO_DRIVER_DIRECT3D12,
|
||||
"menu_display_d3d12",
|
||||
"d3d12",
|
||||
true,
|
||||
NULL,
|
||||
NULL
|
||||
|
@ -285,7 +285,7 @@ menu_display_ctx_driver_t menu_display_ctx_d3d8 = {
|
||||
menu_display_d3d8_get_default_tex_coords,
|
||||
menu_display_d3d8_font_init_first,
|
||||
MENU_VIDEO_DRIVER_DIRECT3D8,
|
||||
"menu_display_d3d8",
|
||||
"d3d8",
|
||||
false,
|
||||
NULL,
|
||||
NULL
|
||||
|
@ -322,7 +322,7 @@ menu_display_ctx_driver_t menu_display_ctx_d3d9 = {
|
||||
menu_display_d3d9_get_default_tex_coords,
|
||||
menu_display_d3d9_font_init_first,
|
||||
MENU_VIDEO_DRIVER_DIRECT3D9,
|
||||
"menu_display_d3d9",
|
||||
"d3d9",
|
||||
false,
|
||||
NULL,
|
||||
NULL
|
||||
|
@ -109,7 +109,7 @@ menu_display_ctx_driver_t menu_display_ctx_gdi = {
|
||||
menu_display_gdi_get_default_tex_coords,
|
||||
menu_display_gdi_font_init_first,
|
||||
MENU_VIDEO_DRIVER_GDI,
|
||||
"menu_display_gdi",
|
||||
"gdi",
|
||||
false,
|
||||
NULL,
|
||||
NULL
|
||||
|
@ -275,7 +275,7 @@ menu_display_ctx_driver_t menu_display_ctx_gl = {
|
||||
menu_display_gl_get_default_tex_coords,
|
||||
menu_display_gl_font_init_first,
|
||||
MENU_VIDEO_DRIVER_OPENGL,
|
||||
"menu_display_gl",
|
||||
"gl",
|
||||
false,
|
||||
menu_display_gl_scissor_begin,
|
||||
menu_display_gl_scissor_end
|
||||
|
@ -95,7 +95,7 @@ menu_display_ctx_driver_t menu_display_ctx_null = {
|
||||
menu_display_null_get_default_tex_coords,
|
||||
menu_display_null_font_init_first,
|
||||
MENU_VIDEO_DRIVER_GENERIC,
|
||||
"menu_display_null",
|
||||
"null",
|
||||
false,
|
||||
NULL,
|
||||
NULL
|
||||
|
@ -102,7 +102,7 @@ menu_display_ctx_driver_t menu_display_ctx_sixel = {
|
||||
menu_display_sixel_get_default_tex_coords,
|
||||
menu_display_sixel_font_init_first,
|
||||
MENU_VIDEO_DRIVER_SIXEL,
|
||||
"menu_display_sixel",
|
||||
"sixel",
|
||||
false,
|
||||
NULL,
|
||||
NULL
|
||||
|
@ -99,7 +99,7 @@ menu_display_ctx_driver_t menu_display_ctx_switch = {
|
||||
menu_display_switch_get_default_tex_coords,
|
||||
menu_display_switch_font_init_first,
|
||||
MENU_VIDEO_DRIVER_SWITCH,
|
||||
"menu_display_switch",
|
||||
"switch",
|
||||
false,
|
||||
NULL,
|
||||
NULL
|
||||
|
@ -386,7 +386,7 @@ menu_display_ctx_driver_t menu_display_ctx_vulkan = {
|
||||
menu_display_vk_get_default_tex_coords,
|
||||
menu_display_vk_font_init_first,
|
||||
MENU_VIDEO_DRIVER_VULKAN,
|
||||
"menu_display_vulkan",
|
||||
"vulkan",
|
||||
false,
|
||||
menu_display_vk_scissor_begin,
|
||||
menu_display_vk_scissor_end
|
||||
|
@ -352,7 +352,7 @@ menu_display_ctx_driver_t menu_display_ctx_wiiu = {
|
||||
menu_display_wiiu_get_default_tex_coords,
|
||||
menu_display_wiiu_font_init_first,
|
||||
MENU_VIDEO_DRIVER_WIIU,
|
||||
"menu_display_wiiu",
|
||||
"gx2",
|
||||
true,
|
||||
menu_display_wiiu_scissor_begin,
|
||||
menu_display_wiiu_scissor_end
|
||||
|
@ -47,6 +47,10 @@
|
||||
#include "../network/netplay/netplay_discovery.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LAKKA_SWITCH
|
||||
#include "../../lakka.h"
|
||||
#endif
|
||||
|
||||
#if defined(__linux__) || (defined(BSD) && !defined(__MACH__))
|
||||
#include "../frontend/drivers/platform_unix.h"
|
||||
#endif
|
||||
@ -291,7 +295,6 @@ static int menu_displaylist_parse_core_info(menu_displaylist_info_t *info)
|
||||
core_info_ctx_firmware_t firmware_info;
|
||||
bool update_missing_firmware = false;
|
||||
bool set_missing_firmware = false;
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
firmware_info.path = core_info->path;
|
||||
firmware_info.directory.system = settings->paths.directory_system;
|
||||
@ -1286,7 +1289,7 @@ static int menu_displaylist_parse_playlist(menu_displaylist_info_t *info,
|
||||
if (!string_is_empty(info->path))
|
||||
{
|
||||
size_t lpl_basename_size = PATH_MAX_LENGTH * sizeof(char);
|
||||
char *lpl_basename = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
char *lpl_basename = (char*)malloc(lpl_basename_size);
|
||||
lpl_basename[0] = '\0';
|
||||
|
||||
fill_pathname_base_noext(lpl_basename, info->path, lpl_basename_size);
|
||||
@ -1299,9 +1302,9 @@ static int menu_displaylist_parse_playlist(menu_displaylist_info_t *info,
|
||||
|
||||
for (i = 0; i < list_size; i++)
|
||||
{
|
||||
char *path_copy = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
char *fill_buf = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
size_t path_size = PATH_MAX_LENGTH * sizeof(char);
|
||||
char *path_copy = (char*)malloc(path_size);
|
||||
char *fill_buf = (char*)malloc(path_size);
|
||||
const char *core_name = NULL;
|
||||
const char *path = NULL;
|
||||
const char *label = NULL;
|
||||
@ -1334,9 +1337,10 @@ static int menu_displaylist_parse_playlist(menu_displaylist_info_t *info,
|
||||
|
||||
if (path)
|
||||
{
|
||||
char *path_short = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
size_t path_size = PATH_MAX_LENGTH * sizeof(char);
|
||||
char *path_short = (char*)malloc(path_size);
|
||||
|
||||
path_short[0] = '\0';
|
||||
path_short[0] = '\0';
|
||||
|
||||
fill_short_pathname_representation(path_short, path,
|
||||
path_size);
|
||||
@ -1349,10 +1353,9 @@ static int menu_displaylist_parse_playlist(menu_displaylist_info_t *info,
|
||||
if (!string_is_equal(core_name,
|
||||
file_path_str(FILE_PATH_DETECT)))
|
||||
{
|
||||
char *tmp = (char*)
|
||||
malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
char *tmp = (char*)malloc(path_size);
|
||||
|
||||
tmp[0] = '\0';
|
||||
tmp[0] = '\0';
|
||||
|
||||
snprintf(tmp, path_size, " (%s)", core_name);
|
||||
strlcat(fill_buf, tmp, path_size);
|
||||
@ -1483,12 +1486,13 @@ static int create_string_list_rdb_entry_string(
|
||||
char *output_label = NULL;
|
||||
int str_len = 0;
|
||||
struct string_list *str_list = string_list_new();
|
||||
size_t path_size = PATH_MAX_LENGTH * sizeof(char);
|
||||
|
||||
if (!str_list)
|
||||
return -1;
|
||||
|
||||
attr.i = 0;
|
||||
tmp = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
tmp = (char*)malloc(path_size);
|
||||
tmp[0] = '\0';
|
||||
|
||||
str_len += strlen(label) + 1;
|
||||
@ -1512,8 +1516,7 @@ static int create_string_list_rdb_entry_string(
|
||||
string_list_join_concat(output_label, str_len, str_list, "|");
|
||||
|
||||
fill_pathname_join_concat_noext(tmp, desc, ": ",
|
||||
actual_string,
|
||||
PATH_MAX_LENGTH * sizeof(char));
|
||||
actual_string, path_size);
|
||||
menu_entries_append_enum(list, tmp, output_label,
|
||||
enum_idx,
|
||||
0, 0, 0);
|
||||
@ -1544,8 +1547,8 @@ static int create_string_list_rdb_entry_int(
|
||||
goto error;
|
||||
|
||||
attr.i = 0;
|
||||
tmp = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
str = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
tmp = (char*)malloc(path_size);
|
||||
str = (char*)malloc(path_size);
|
||||
tmp[0] = str[0] = '\0';
|
||||
|
||||
str_len += strlen(label) + 1;
|
||||
@ -1651,10 +1654,12 @@ static int menu_displaylist_parse_database_entry(menu_handle_t *menu,
|
||||
snprintf(crc_str, sizeof(crc_str), "%08X", db_info_entry->crc32);
|
||||
|
||||
if (!string_is_empty(db_info_entry->name))
|
||||
strlcpy(thumbnail_content, db_info_entry->name, sizeof(thumbnail_content));
|
||||
strlcpy(thumbnail_content, db_info_entry->name,
|
||||
sizeof(thumbnail_content));
|
||||
|
||||
if (!string_is_empty(thumbnail_content))
|
||||
menu_driver_set_thumbnail_content(thumbnail_content, sizeof(thumbnail_content));
|
||||
menu_driver_set_thumbnail_content(thumbnail_content,
|
||||
sizeof(thumbnail_content));
|
||||
|
||||
menu_driver_ctl(RARCH_MENU_CTL_UPDATE_THUMBNAIL_PATH, NULL);
|
||||
menu_driver_ctl(RARCH_MENU_CTL_UPDATE_THUMBNAIL_IMAGE, NULL);
|
||||
@ -3741,19 +3746,16 @@ static unsigned menu_displaylist_parse_cores(
|
||||
|
||||
if (type == FILE_TYPE_CORE)
|
||||
{
|
||||
char *core_path = (char*)
|
||||
malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
char *display_name = (char*)
|
||||
malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
size_t path_size = PATH_MAX_LENGTH * sizeof(char);
|
||||
char *core_path = (char*)malloc(path_size);
|
||||
char *display_name = (char*)malloc(path_size);
|
||||
core_path[0] =
|
||||
display_name[0] = '\0';
|
||||
|
||||
fill_pathname_join(core_path, dir, path,
|
||||
PATH_MAX_LENGTH * sizeof(char));
|
||||
fill_pathname_join(core_path, dir, path, path_size);
|
||||
|
||||
if (core_info_list_get_display_name(list,
|
||||
core_path, display_name,
|
||||
PATH_MAX_LENGTH * sizeof(char)))
|
||||
core_path, display_name, path_size))
|
||||
file_list_set_alt_at_offset(info->list, i, display_name);
|
||||
|
||||
free(core_path);
|
||||
@ -4274,6 +4276,125 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
|
||||
|
||||
switch (type)
|
||||
{
|
||||
#ifdef HAVE_LAKKA_SWITCH
|
||||
case DISPLAYLIST_SWITCH_CPU_PROFILE:
|
||||
{
|
||||
unsigned i;
|
||||
char text[PATH_MAX_LENGTH];
|
||||
char current_profile[PATH_MAX_LENGTH];
|
||||
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);
|
||||
|
||||
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);
|
||||
|
||||
menu_entries_append_enum(info->list,
|
||||
text,
|
||||
"",
|
||||
0,
|
||||
MENU_INFO_MESSAGE, 0, 0);
|
||||
|
||||
for (i = 0; i < profiles_count; i++)
|
||||
{
|
||||
char* profile = SWITCH_CPU_PROFILES[i];
|
||||
char* speed = SWITCH_CPU_SPEEDS[i];
|
||||
|
||||
char title[PATH_MAX_LENGTH] = {0};
|
||||
|
||||
snprintf(title, sizeof(title), "%s (%s)", profile, speed);
|
||||
|
||||
menu_entries_append_enum(info->list,
|
||||
title,
|
||||
"",
|
||||
0, MENU_SET_SWITCH_CPU_PROFILE, 0, i);
|
||||
|
||||
}
|
||||
|
||||
info->need_push = true;
|
||||
info->need_refresh = true;
|
||||
info->need_clear = true;
|
||||
|
||||
break;
|
||||
}
|
||||
case DISPLAYLIST_SWITCH_GPU_PROFILE:
|
||||
{
|
||||
unsigned i;
|
||||
char text[PATH_MAX_LENGTH];
|
||||
char current_profile[PATH_MAX_LENGTH];
|
||||
FILE *profile = NULL;
|
||||
const size_t profiles_count = sizeof(SWITCH_GPU_PROFILES)/sizeof(SWITCH_GPU_PROFILES[1]);
|
||||
|
||||
runloop_msg_queue_push("Warning : extented overclocking can damage the Switch", 1, 90, true);
|
||||
|
||||
profile = popen("gpu-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);
|
||||
|
||||
menu_entries_append_enum(info->list,
|
||||
text,
|
||||
"",
|
||||
0,
|
||||
MENU_INFO_MESSAGE, 0, 0);
|
||||
|
||||
|
||||
for (i = 0; i < profiles_count; i++)
|
||||
{
|
||||
char* profile = SWITCH_GPU_PROFILES[i];
|
||||
char* speed = SWITCH_GPU_SPEEDS[i];
|
||||
char title[PATH_MAX_LENGTH] = {0};
|
||||
|
||||
snprintf(title, sizeof(title), "%s (%s)", profile, speed);
|
||||
|
||||
menu_entries_append_enum(info->list,
|
||||
title,
|
||||
"",
|
||||
0, MENU_SET_SWITCH_GPU_PROFILE, 0, i);
|
||||
}
|
||||
|
||||
info->need_push = true;
|
||||
info->need_refresh = true;
|
||||
info->need_clear = true;
|
||||
|
||||
break;
|
||||
}
|
||||
case DISPLAYLIST_SWITCH_BACKLIGHT_CONTROL:
|
||||
{
|
||||
unsigned i;
|
||||
const size_t brightness_count = sizeof(SWITCH_BRIGHTNESS)/sizeof(SWITCH_BRIGHTNESS[1]);
|
||||
|
||||
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
|
||||
|
||||
for (i = 0; i < brightness_count; i++)
|
||||
{
|
||||
char title[PATH_MAX_LENGTH] = {0};
|
||||
|
||||
snprintf(title, sizeof(title), "Set to %d%%", SWITCH_BRIGHTNESS[i]);
|
||||
|
||||
menu_entries_append_enum(info->list,
|
||||
title,
|
||||
"",
|
||||
0, MENU_SET_SWITCH_BRIGHTNESS, 0, i);
|
||||
}
|
||||
|
||||
info->need_push = true;
|
||||
info->need_refresh = true;
|
||||
info->need_clear = true;
|
||||
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
case DISPLAYLIST_MUSIC_LIST:
|
||||
{
|
||||
char combined_path[PATH_MAX_LENGTH];
|
||||
@ -5658,6 +5779,9 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
|
||||
menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_TIMEDATE_ENABLE,
|
||||
PARSE_ONLY_BOOL, false);
|
||||
menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_TIMEDATE_STYLE,
|
||||
PARSE_ONLY_UINT, false);
|
||||
menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_BATTERY_LEVEL_ENABLE,
|
||||
PARSE_ONLY_BOOL, false);
|
||||
@ -7186,9 +7310,10 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
|
||||
if (!string_is_empty(system->info.library_name) &&
|
||||
!string_is_equal(system->info.library_name,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NO_CORE)))
|
||||
menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_CONTENT_SETTINGS,
|
||||
PARSE_ACTION, false);
|
||||
if (!rarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL))
|
||||
menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_CONTENT_SETTINGS,
|
||||
PARSE_ACTION, false);
|
||||
|
||||
if (system->load_no_content)
|
||||
menu_displaylist_parse_settings_enum(menu, info,
|
||||
@ -7245,6 +7370,15 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
|
||||
menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_QUIT_RETROARCH,
|
||||
PARSE_ACTION, false);
|
||||
#ifdef HAVE_LAKKA_SWITCH
|
||||
menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_SWITCH_GPU_PROFILE,
|
||||
PARSE_ACTION, false);
|
||||
|
||||
menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_SWITCH_BACKLIGHT_CONTROL,
|
||||
PARSE_ACTION, false);
|
||||
#endif
|
||||
if (settings->bools.menu_show_reboot)
|
||||
menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_REBOOT,
|
||||
|
@ -179,6 +179,11 @@ enum menu_displaylist_ctl_state
|
||||
DISPLAYLIST_CORE_CONTENT,
|
||||
DISPLAYLIST_CORE_CONTENT_DIRS,
|
||||
DISPLAYLIST_CORE_CONTENT_DIRS_SUBDIR,
|
||||
#ifdef HAVE_LAKKA_SWITCH
|
||||
DISPLAYLIST_SWITCH_GPU_PROFILE,
|
||||
DISPLAYLIST_SWITCH_BACKLIGHT_CONTROL,
|
||||
DISPLAYLIST_SWITCH_CPU_PROFILE,
|
||||
#endif
|
||||
DISPLAYLIST_PENDING_CLEAR
|
||||
};
|
||||
|
||||
|
@ -17,13 +17,14 @@
|
||||
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
|
||||
#include <locale.h>
|
||||
#include <compat/strl.h>
|
||||
#include <retro_miscellaneous.h>
|
||||
#include <formats/image.h>
|
||||
#include <file/file_path.h>
|
||||
#include <streams/file_stream.h>
|
||||
#include <string/stdstring.h>
|
||||
#include <encodings/utf.h>
|
||||
|
||||
#ifdef WIIU
|
||||
#include <wiiu/os/energy.h>
|
||||
@ -346,28 +347,58 @@ void menu_display_timedate(menu_display_ctx_datetime_t *datetime)
|
||||
|
||||
time(&time_);
|
||||
|
||||
setlocale(LC_TIME, "");
|
||||
|
||||
switch (datetime->time_mode)
|
||||
{
|
||||
case 0: /* Date and time */
|
||||
strftime(datetime->s, datetime->len,
|
||||
"%Y-%m-%d %H:%M:%S", localtime(&time_));
|
||||
break;
|
||||
case 1: /* Date */
|
||||
case 1: /* YY-MM-DD HH:MM */
|
||||
strftime(datetime->s, datetime->len,
|
||||
"%Y-%m-%d", localtime(&time_));
|
||||
"%Y-%m-%d %H:%M", localtime(&time_));
|
||||
break;
|
||||
case 2: /* Time */
|
||||
case 2: /* MM-DD-YYYY HH:MM */
|
||||
strftime(datetime->s, datetime->len,
|
||||
"%m-%d-%Y %H:%M", localtime(&time_));
|
||||
break;
|
||||
case 3: /* Time */
|
||||
strftime(datetime->s, datetime->len,
|
||||
"%H:%M:%S", localtime(&time_));
|
||||
break;
|
||||
case 3: /* Time (hours-minutes) */
|
||||
case 4: /* Time (hours-minutes) */
|
||||
strftime(datetime->s, datetime->len,
|
||||
"%H:%M", localtime(&time_));
|
||||
break;
|
||||
case 4: /* Date and time, without year and seconds */
|
||||
case 5: /* Date and time, without year and seconds */
|
||||
strftime(datetime->s, datetime->len,
|
||||
"%d/%m %H:%M", localtime(&time_));
|
||||
break;
|
||||
case 6:
|
||||
strftime(datetime->s, datetime->len,
|
||||
"%m/%d %H:%M", localtime(&time_));
|
||||
break;
|
||||
case 7: /* Time (hours-minutes), in 12 hour AM-PM designation */
|
||||
#if defined(__linux__) && !defined(ANDROID)
|
||||
strftime(datetime->s, datetime->len,
|
||||
"%r", localtime(&time_));
|
||||
#else
|
||||
{
|
||||
char *local;
|
||||
|
||||
strftime(datetime->s, datetime->len,
|
||||
|
||||
"%I:%M:%S %p", localtime(&time_));
|
||||
local = local_to_utf8_string_alloc(datetime->s);
|
||||
|
||||
if (local)
|
||||
{
|
||||
strlcpy(datetime->s, local, datetime->len);
|
||||
free(local);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@ -634,6 +665,18 @@ float menu_display_get_dpi(void)
|
||||
return dpi;
|
||||
}
|
||||
|
||||
bool menu_display_driver_exists(const char *s)
|
||||
{
|
||||
unsigned i;
|
||||
for (i = 0; i < ARRAY_SIZE(menu_display_ctx_drivers); i++)
|
||||
{
|
||||
if (string_is_equal(s, menu_display_ctx_drivers[i]->ident))
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool menu_display_init_first_driver(bool video_is_threaded)
|
||||
{
|
||||
unsigned i;
|
||||
|
@ -171,10 +171,8 @@ enum menu_settings_type
|
||||
MENU_SETTING_ACTION_RESUME_ACHIEVEMENTS,
|
||||
MENU_WIFI,
|
||||
MENU_ROOM,
|
||||
/*
|
||||
MENU_ROOM_LAN,
|
||||
MENU_ROOM_MITM,
|
||||
*/
|
||||
MENU_ROOM_RELAY,
|
||||
MENU_NETPLAY_LAN_SCAN,
|
||||
MENU_INFO_MESSAGE,
|
||||
MENU_SETTINGS_SHADER_PARAMETER_0,
|
||||
@ -233,6 +231,13 @@ enum menu_settings_type
|
||||
MENU_SETTINGS_SUBSYSTEM_ADD,
|
||||
MENU_SETTINGS_SUBSYSTEM_LAST = MENU_SETTINGS_SUBSYSTEM_ADD + RARCH_MAX_SUBSYSTEMS,
|
||||
MENU_SETTINGS_CHEAT_MATCH,
|
||||
|
||||
#ifdef HAVE_LAKKA_SWITCH
|
||||
MENU_SET_SWITCH_GPU_PROFILE,
|
||||
MENU_SET_SWITCH_BRIGHTNESS,
|
||||
MENU_SET_SWITCH_CPU_PROFILE,
|
||||
#endif
|
||||
|
||||
MENU_SETTINGS_LAST
|
||||
};
|
||||
|
||||
@ -817,6 +822,8 @@ void menu_display_reset_textures_list(
|
||||
int menu_display_osk_ptr_at_pos(void *data, int x, int y,
|
||||
unsigned width, unsigned height);
|
||||
|
||||
bool menu_display_driver_exists(const char *s);
|
||||
|
||||
void menu_driver_destroy(void);
|
||||
|
||||
extern uintptr_t menu_display_white_texture;
|
||||
|
@ -505,6 +505,56 @@ static void setting_get_string_representation_uint_menu_left_thumbnails(
|
||||
}
|
||||
}
|
||||
|
||||
static void setting_get_string_representation_uint_menu_timedate_style(
|
||||
rarch_setting_t *setting,
|
||||
char *s, size_t len)
|
||||
{
|
||||
if (!setting)
|
||||
return;
|
||||
|
||||
switch (*setting->value.target.unsigned_integer)
|
||||
{
|
||||
case 0:
|
||||
strlcpy(s, msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_TIMEDATE_STYLE_YMD_HMS), len);
|
||||
break;
|
||||
case 1:
|
||||
strlcpy(s, msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_TIMEDATE_STYLE_YMD_HM), len);
|
||||
break;
|
||||
case 2:
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_TIMEDATE_STYLE_MDYYYY), len);
|
||||
break;
|
||||
case 3:
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_TIMEDATE_STYLE_HMS), len);
|
||||
break;
|
||||
case 4:
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_TIMEDATE_STYLE_HM), len);
|
||||
break;
|
||||
case 5:
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_TIMEDATE_STYLE_DM_HM), len);
|
||||
break;
|
||||
case 6:
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_TIMEDATE_STYLE_MD_HM), len);
|
||||
break;
|
||||
case 7:
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_TIMEDATE_STYLE_AM_PM), len);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void setting_get_string_representation_uint_xmb_icon_theme(
|
||||
rarch_setting_t *setting,
|
||||
char *s, size_t len)
|
||||
@ -3641,6 +3691,31 @@ static bool setting_append_list(
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_LAKKA)
|
||||
#ifdef HAVE_LAKKA_SWITCH
|
||||
CONFIG_ACTION(
|
||||
list, list_info,
|
||||
MENU_ENUM_LABEL_SWITCH_CPU_PROFILE,
|
||||
MENU_ENUM_LABEL_VALUE_SWITCH_CPU_PROFILE,
|
||||
&group_info,
|
||||
&subgroup_info,
|
||||
parent_group);
|
||||
|
||||
CONFIG_ACTION(
|
||||
list, list_info,
|
||||
MENU_ENUM_LABEL_SWITCH_GPU_PROFILE,
|
||||
MENU_ENUM_LABEL_VALUE_SWITCH_GPU_PROFILE,
|
||||
&group_info,
|
||||
&subgroup_info,
|
||||
parent_group);
|
||||
|
||||
CONFIG_ACTION(
|
||||
list, list_info,
|
||||
MENU_ENUM_LABEL_SWITCH_BACKLIGHT_CONTROL,
|
||||
MENU_ENUM_LABEL_VALUE_SWITCH_BACKLIGHT_CONTROL,
|
||||
&group_info,
|
||||
&subgroup_info,
|
||||
parent_group);
|
||||
#endif
|
||||
CONFIG_ACTION(
|
||||
list, list_info,
|
||||
MENU_ENUM_LABEL_REBOOT,
|
||||
@ -8292,6 +8367,21 @@ static bool setting_append_list(
|
||||
general_read_handler,
|
||||
SD_FLAG_ADVANCED);
|
||||
|
||||
CONFIG_UINT(list, list_info,
|
||||
&settings->uints.menu_timedate_style,
|
||||
MENU_ENUM_LABEL_TIMEDATE_STYLE,
|
||||
MENU_ENUM_LABEL_VALUE_TIMEDATE_STYLE,
|
||||
menu_timedate_style,
|
||||
&group_info,
|
||||
&subgroup_info,
|
||||
parent_group,
|
||||
general_write_handler,
|
||||
general_read_handler);
|
||||
(*list)[list_info->index - 1].action_ok = &setting_action_ok_uint;
|
||||
(*list)[list_info->index - 1].get_string_representation =
|
||||
&setting_get_string_representation_uint_menu_timedate_style;
|
||||
menu_settings_list_current_add_range(list, list_info, 0, 7, 1, true, true);
|
||||
|
||||
CONFIG_BOOL(
|
||||
list, list_info,
|
||||
&settings->bools.menu_battery_level_enable,
|
||||
|
@ -80,7 +80,6 @@ bool menu_shader_manager_init(void)
|
||||
{
|
||||
bool is_preset = false;
|
||||
config_file_t *conf = NULL;
|
||||
settings_t *settings = config_get_ptr();
|
||||
char *new_path = NULL;
|
||||
const char *path_shader = retroarch_get_shader_preset();
|
||||
enum rarch_shader_type type = RARCH_SHADER_NONE;
|
||||
@ -112,6 +111,7 @@ bool menu_shader_manager_init(void)
|
||||
else
|
||||
{
|
||||
char preset_path[PATH_MAX_LENGTH];
|
||||
settings_t *settings = config_get_ptr();
|
||||
const char *shader_dir =
|
||||
*settings->paths.directory_video_shader ?
|
||||
settings->paths.directory_video_shader :
|
||||
|
@ -48,7 +48,6 @@ int menu_dialog_iterate(char *s, size_t len, const char *label)
|
||||
cheevos_ctx_desc_t desc_info;
|
||||
#endif
|
||||
bool do_exit = false;
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
switch (menu_dialog_current_type)
|
||||
{
|
||||
@ -204,13 +203,16 @@ int menu_dialog_iterate(char *s, size_t len, const char *label)
|
||||
s, len);
|
||||
break;
|
||||
case MENU_DIALOG_HELP_EXTRACT:
|
||||
menu_hash_get_help_enum(MENU_ENUM_LABEL_VALUE_EXTRACTING_PLEASE_WAIT,
|
||||
s, len);
|
||||
|
||||
if (settings->bools.bundle_finished)
|
||||
{
|
||||
settings->bools.bundle_finished = false;
|
||||
do_exit = true;
|
||||
settings_t *settings = config_get_ptr();
|
||||
menu_hash_get_help_enum(MENU_ENUM_LABEL_VALUE_EXTRACTING_PLEASE_WAIT,
|
||||
s, len);
|
||||
|
||||
if (settings->bools.bundle_finished)
|
||||
{
|
||||
settings->bools.bundle_finished = false;
|
||||
do_exit = true;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case MENU_DIALOG_QUIT_CONFIRM:
|
||||
|
@ -364,7 +364,7 @@ void menu_entry_get(menu_entry_t *entry, size_t stack_idx,
|
||||
|
||||
if (cbs->action_sublabel)
|
||||
{
|
||||
char tmp[255];
|
||||
char tmp[512];
|
||||
tmp[0] = '\0';
|
||||
|
||||
cbs->action_sublabel(list,
|
||||
|
484
midi/drivers/alsa_midi.c
Normal file
484
midi/drivers/alsa_midi.c
Normal file
@ -0,0 +1,484 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2018 The RetroArch team
|
||||
*
|
||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with RetroArch.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <alsa/asoundlib.h>
|
||||
|
||||
#include <libretro.h>
|
||||
#include <verbosity.h>
|
||||
#include <lists/string_list.h>
|
||||
#include <string/stdstring.h>
|
||||
|
||||
#include "../midi_driver.h"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
snd_seq_t *seq;
|
||||
snd_seq_addr_t in;
|
||||
snd_seq_addr_t in_dest;
|
||||
snd_seq_addr_t out;
|
||||
snd_seq_addr_t out_src;
|
||||
int out_queue;
|
||||
snd_seq_real_time_t out_ev_time; /* time of the last output event */
|
||||
} alsa_midi_t;
|
||||
|
||||
static const snd_seq_event_type_t alsa_midi_ev_map[8] =
|
||||
{
|
||||
SND_SEQ_EVENT_NOTEOFF,
|
||||
SND_SEQ_EVENT_NOTEON,
|
||||
SND_SEQ_EVENT_KEYPRESS,
|
||||
SND_SEQ_EVENT_CONTROLLER,
|
||||
SND_SEQ_EVENT_PGMCHANGE,
|
||||
SND_SEQ_EVENT_CHANPRESS,
|
||||
SND_SEQ_EVENT_PITCHBEND,
|
||||
SND_SEQ_EVENT_SYSEX
|
||||
};
|
||||
|
||||
static bool alsa_midi_get_avail_ports(struct string_list *ports, unsigned caps)
|
||||
{
|
||||
int r;
|
||||
snd_seq_t *seq;
|
||||
snd_seq_client_info_t *client_info;
|
||||
snd_seq_port_info_t *port_info;
|
||||
union string_list_elem_attr attr = {0};
|
||||
|
||||
snd_seq_client_info_alloca(&client_info);
|
||||
snd_seq_port_info_alloca(&port_info);
|
||||
|
||||
r = snd_seq_open(&seq, "default", SND_SEQ_OPEN_DUPLEX, SND_SEQ_NONBLOCK);
|
||||
if (r < 0)
|
||||
{
|
||||
RARCH_ERR("[MIDI]: snd_seq_open failed with error %d.\n", r);
|
||||
return false;
|
||||
}
|
||||
|
||||
snd_seq_client_info_set_client(client_info, -1);
|
||||
|
||||
while (snd_seq_query_next_client(seq, client_info) == 0)
|
||||
{
|
||||
int client = snd_seq_client_info_get_client(client_info);
|
||||
|
||||
snd_seq_port_info_set_client(port_info, client);
|
||||
snd_seq_port_info_set_port(port_info, -1);
|
||||
|
||||
while (snd_seq_query_next_port(seq, port_info) == 0)
|
||||
{
|
||||
unsigned port_caps = snd_seq_port_info_get_capability(port_info);
|
||||
unsigned port_type = snd_seq_port_info_get_type(port_info);
|
||||
|
||||
if ((port_type & SND_SEQ_PORT_TYPE_MIDI_GENERIC) &&
|
||||
(port_caps & caps) == caps)
|
||||
{
|
||||
const char *port_name = snd_seq_port_info_get_name(port_info);
|
||||
|
||||
if (!string_list_append(ports, port_name, attr))
|
||||
{
|
||||
RARCH_ERR("[MIDI]: string_list_append failed.\n");
|
||||
snd_seq_close(seq);
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
snd_seq_close(seq);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool alsa_midi_get_port(snd_seq_t *seq, const char *name, unsigned caps,
|
||||
snd_seq_addr_t *addr)
|
||||
{
|
||||
snd_seq_client_info_t *client_info;
|
||||
snd_seq_port_info_t *port_info;
|
||||
|
||||
snd_seq_client_info_alloca(&client_info);
|
||||
snd_seq_port_info_alloca(&port_info);
|
||||
|
||||
snd_seq_client_info_set_client(client_info, -1);
|
||||
while (snd_seq_query_next_client(seq, client_info) == 0)
|
||||
{
|
||||
int client_id = snd_seq_client_info_get_client(client_info);
|
||||
|
||||
snd_seq_port_info_set_client(port_info, client_id);
|
||||
snd_seq_port_info_set_port(port_info, -1);
|
||||
|
||||
while (snd_seq_query_next_port(seq, port_info) == 0)
|
||||
{
|
||||
unsigned port_caps = snd_seq_port_info_get_capability(port_info);
|
||||
unsigned type = snd_seq_port_info_get_type(port_info);
|
||||
|
||||
if ((type & SND_SEQ_PORT_TYPE_MIDI_GENERIC) && (port_caps & caps) == caps)
|
||||
{
|
||||
const char *port_name = snd_seq_port_info_get_name(port_info);
|
||||
|
||||
if (string_is_equal(port_name, name))
|
||||
{
|
||||
addr->client = client_id;
|
||||
addr->port = snd_seq_port_info_get_port(port_info);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool alsa_midi_get_avail_inputs(struct string_list *inputs)
|
||||
{
|
||||
return alsa_midi_get_avail_ports(inputs, SND_SEQ_PORT_CAP_READ |
|
||||
SND_SEQ_PORT_CAP_SUBS_READ);
|
||||
}
|
||||
|
||||
static bool alsa_midi_get_avail_outputs(struct string_list *outputs)
|
||||
{
|
||||
return alsa_midi_get_avail_ports(outputs, SND_SEQ_PORT_CAP_WRITE |
|
||||
SND_SEQ_PORT_CAP_SUBS_WRITE);
|
||||
}
|
||||
|
||||
static void alsa_midi_free(void *p)
|
||||
{
|
||||
alsa_midi_t *d = (alsa_midi_t*)p;
|
||||
|
||||
if (d)
|
||||
{
|
||||
if (d->seq)
|
||||
snd_seq_close(d->seq);
|
||||
free(d);
|
||||
}
|
||||
}
|
||||
|
||||
static bool alsa_midi_set_input(void *p, const char *input)
|
||||
{
|
||||
int r;
|
||||
snd_seq_port_subscribe_t *sub;
|
||||
alsa_midi_t *d = (alsa_midi_t*)p;
|
||||
|
||||
if (!input)
|
||||
{
|
||||
if (d->in_dest.port >= 0)
|
||||
{
|
||||
snd_seq_delete_simple_port(d->seq, d->in_dest.port);
|
||||
d->in_dest.port = -1;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!alsa_midi_get_port(d->seq, input, SND_SEQ_PORT_CAP_READ |
|
||||
SND_SEQ_PORT_CAP_SUBS_READ, &d->in))
|
||||
return false;
|
||||
|
||||
r = snd_seq_create_simple_port(d->seq, "in", SND_SEQ_PORT_CAP_WRITE |
|
||||
SND_SEQ_PORT_CAP_SUBS_WRITE, SND_SEQ_PORT_TYPE_APPLICATION);
|
||||
if (r < 0)
|
||||
{
|
||||
RARCH_ERR("[MIDI]: snd_seq_create_simple_port failed with error %d.\n", r);
|
||||
return false;
|
||||
}
|
||||
|
||||
d->in_dest.client = snd_seq_client_id(d->seq);
|
||||
d->in_dest.port = r;
|
||||
|
||||
snd_seq_port_subscribe_alloca(&sub);
|
||||
snd_seq_port_subscribe_set_sender(sub, &d->in);
|
||||
snd_seq_port_subscribe_set_dest(sub, &d->in_dest);
|
||||
r = snd_seq_subscribe_port(d->seq, sub);
|
||||
if (r < 0)
|
||||
RARCH_ERR("[MIDI]: snd_seq_subscribe_port failed with error %d.\n", r);
|
||||
|
||||
return r >= 0;
|
||||
}
|
||||
|
||||
static bool alsa_midi_set_output(void *p, const char *output)
|
||||
{
|
||||
int r;
|
||||
alsa_midi_t *d = (alsa_midi_t*)p;
|
||||
|
||||
if (!output)
|
||||
{
|
||||
if (d->out_queue >= 0)
|
||||
{
|
||||
snd_seq_stop_queue(d->seq, d->out_queue, NULL);
|
||||
snd_seq_free_queue(d->seq, d->out_queue);
|
||||
d->out_queue = -1;
|
||||
}
|
||||
if (d->out_src.port >= 0)
|
||||
{
|
||||
snd_seq_delete_simple_port(d->seq, d->out_src.port);
|
||||
d->out_src.port = -1;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!alsa_midi_get_port(d->seq, output, SND_SEQ_PORT_CAP_WRITE |
|
||||
SND_SEQ_PORT_CAP_SUBS_WRITE, &d->out))
|
||||
return false;
|
||||
|
||||
r = snd_seq_create_simple_port(d->seq, "out", SND_SEQ_PORT_CAP_READ |
|
||||
SND_SEQ_PORT_CAP_SUBS_READ, SND_SEQ_PORT_TYPE_APPLICATION);
|
||||
if (r < 0)
|
||||
{
|
||||
RARCH_ERR("[MIDI]: snd_seq_create_simple_port failed with error %d.\n", r);
|
||||
return false;
|
||||
}
|
||||
|
||||
d->out_src.client = snd_seq_client_id(d->seq);
|
||||
d->out_src.port = r;
|
||||
|
||||
r = snd_seq_connect_to(d->seq, d->out_src.port, d->out.client, d->out.port);
|
||||
if (r < 0)
|
||||
{
|
||||
RARCH_ERR("[MIDI]: snd_seq_connect_to failed with error %d.\n", r);
|
||||
return false;
|
||||
}
|
||||
|
||||
d->out_queue = snd_seq_alloc_queue(d->seq);
|
||||
if (d->out_queue < 0)
|
||||
{
|
||||
RARCH_ERR("[MIDI]: snd_seq_alloc_queue failed with error %d.\n", d->out_queue);
|
||||
return false;
|
||||
}
|
||||
|
||||
r = snd_seq_start_queue(d->seq, d->out_queue, NULL);
|
||||
if (r < 0)
|
||||
{
|
||||
RARCH_ERR("[MIDI]: snd_seq_start_queue failed with error %d.\n", r);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static void *alsa_midi_init(const char *input, const char *output)
|
||||
{
|
||||
int r;
|
||||
bool err = false;
|
||||
alsa_midi_t *d = (alsa_midi_t*)calloc(sizeof(alsa_midi_t), 1);
|
||||
|
||||
if (!d)
|
||||
{
|
||||
RARCH_ERR("[MIDI]: Out of memory.\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
d->in_dest.port = -1;
|
||||
d->out_src.port = -1;
|
||||
d->out_queue = -1;
|
||||
|
||||
r = snd_seq_open(&d->seq, "default", SND_SEQ_OPEN_DUPLEX, SND_SEQ_NONBLOCK);
|
||||
if (r < 0)
|
||||
{
|
||||
RARCH_ERR("[MIDI]: snd_seq_open failed with error %d.\n", r);
|
||||
err = true;
|
||||
}
|
||||
else if (!alsa_midi_set_input(d, input))
|
||||
err = true;
|
||||
else if (!alsa_midi_set_output(d, output))
|
||||
err = true;
|
||||
|
||||
if (err)
|
||||
{
|
||||
alsa_midi_free(d);
|
||||
d = NULL;
|
||||
}
|
||||
|
||||
return d;
|
||||
}
|
||||
|
||||
static bool alsa_midi_read(void *p, midi_event_t *event)
|
||||
{
|
||||
int r;
|
||||
snd_seq_event_t *ev;
|
||||
alsa_midi_t *d = (alsa_midi_t*)p;
|
||||
|
||||
r = snd_seq_event_input(d->seq, &ev);
|
||||
if (r < 0)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
if (r != -EAGAIN)
|
||||
RARCH_ERR("[MIDI]: snd_seq_event_input failed with error %d.\n", r);
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
if (ev->type == SND_SEQ_EVENT_NOTEOFF)
|
||||
{
|
||||
event->data[0] = 0x80 | ev->data.note.channel;
|
||||
event->data[1] = ev->data.note.note;
|
||||
event->data[2] = ev->data.note.velocity;
|
||||
event->data_size = 3;
|
||||
}
|
||||
else if (ev->type == SND_SEQ_EVENT_NOTEON)
|
||||
{
|
||||
event->data[0] = 0x90 | ev->data.note.channel;
|
||||
event->data[1] = ev->data.note.note;
|
||||
event->data[2] = ev->data.note.velocity;
|
||||
event->data_size = 3;
|
||||
}
|
||||
else if (ev->type == SND_SEQ_EVENT_KEYPRESS)
|
||||
{
|
||||
event->data[0] = 0xA0 | ev->data.note.channel;
|
||||
event->data[1] = ev->data.note.note;
|
||||
event->data[2] = ev->data.note.velocity;
|
||||
event->data_size = 3;
|
||||
}
|
||||
else if (ev->type == SND_SEQ_EVENT_CONTROLLER)
|
||||
{
|
||||
event->data[0] = 0xB0 | ev->data.control.channel;
|
||||
event->data[1] = ev->data.control.param;
|
||||
event->data[2] = ev->data.control.value;
|
||||
event->data_size = 3;
|
||||
}
|
||||
else if (ev->type == SND_SEQ_EVENT_PGMCHANGE)
|
||||
{
|
||||
event->data[0] = 0xC0 | ev->data.control.channel;
|
||||
event->data[1] = ev->data.control.value;
|
||||
event->data_size = 2;
|
||||
}
|
||||
else if (ev->type == SND_SEQ_EVENT_CHANPRESS)
|
||||
{
|
||||
event->data[0] = 0xD0 | ev->data.control.channel;
|
||||
event->data[1] = ev->data.control.value;
|
||||
event->data_size = 2;
|
||||
}
|
||||
else if (ev->type == SND_SEQ_EVENT_PITCHBEND)
|
||||
{
|
||||
event->data[0] = 0xE0 | ev->data.control.channel;
|
||||
event->data[1] = ev->data.control.value & 127;
|
||||
event->data[2] = ev->data.control.value >> 7;
|
||||
event->data_size = 3;
|
||||
}
|
||||
else if (ev->type == SND_SEQ_EVENT_SYSEX)
|
||||
{
|
||||
if (ev->data.ext.len <= event->data_size)
|
||||
{
|
||||
size_t i;
|
||||
uint8_t *ev_data = (uint8_t*)ev->data.ext.ptr;
|
||||
|
||||
for (i = 0; i < ev->data.ext.len; ++i)
|
||||
event->data[i] = ev_data[i];
|
||||
|
||||
event->data_size = ev->data.ext.len;
|
||||
}
|
||||
#ifdef DEBUG
|
||||
else
|
||||
{
|
||||
RARCH_ERR("[MIDI]: SysEx event too big.\n");
|
||||
r = -1;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else
|
||||
r = -1;
|
||||
|
||||
event->delta_time = 0;
|
||||
snd_seq_free_event(ev);
|
||||
|
||||
return r >= 0;
|
||||
}
|
||||
|
||||
static bool alsa_midi_write(void *p, const midi_event_t *event)
|
||||
{
|
||||
int r;
|
||||
snd_seq_event_t ev;
|
||||
alsa_midi_t *d = (alsa_midi_t*)p;
|
||||
|
||||
ev.type = alsa_midi_ev_map[(event->data[0] >> 4) & 7];
|
||||
ev.flags = SND_SEQ_TIME_STAMP_REAL | SND_SEQ_TIME_MODE_ABS;
|
||||
ev.queue = d->out_queue;
|
||||
ev.time.time.tv_sec = d->out_ev_time.tv_sec + event->delta_time / 1000000;
|
||||
ev.time.time.tv_nsec = d->out_ev_time.tv_nsec +
|
||||
(event->delta_time % 1000000) * 1000;
|
||||
if(ev.time.time.tv_nsec >= 1000000000)
|
||||
{
|
||||
ev.time.time.tv_sec += 1;
|
||||
ev.time.time.tv_nsec -= 1000000000;
|
||||
}
|
||||
ev.source.port = d->out_src.port;
|
||||
ev.dest.client = SND_SEQ_ADDRESS_SUBSCRIBERS;
|
||||
|
||||
if (ev.type == SND_SEQ_EVENT_NOTEOFF || ev.type == SND_SEQ_EVENT_NOTEON ||
|
||||
ev.type == SND_SEQ_EVENT_KEYPRESS)
|
||||
{
|
||||
ev.data.note.channel = event->data[0] & 0x0F;
|
||||
ev.data.note.note = event->data[1];
|
||||
ev.data.note.velocity = event->data[2];
|
||||
}
|
||||
else if (ev.type == SND_SEQ_EVENT_CONTROLLER)
|
||||
{
|
||||
ev.data.control.channel = event->data[0] & 0x0F;
|
||||
ev.data.control.param = event->data[1];
|
||||
ev.data.control.value = event->data[2];
|
||||
}
|
||||
else if (ev.type == SND_SEQ_EVENT_PGMCHANGE ||
|
||||
ev.type == SND_SEQ_EVENT_CHANPRESS)
|
||||
{
|
||||
ev.data.control.channel = event->data[0] & 0x0F;
|
||||
ev.data.control.value = event->data[1];
|
||||
}
|
||||
else if (ev.type == SND_SEQ_EVENT_PITCHBEND)
|
||||
{
|
||||
ev.data.control.channel = event->data[0] & 0x0F;
|
||||
ev.data.control.value = event->data[1] | (event->data[2] << 7);
|
||||
}
|
||||
else if (ev.type == SND_SEQ_EVENT_SYSEX)
|
||||
{
|
||||
ev.flags |= SND_SEQ_EVENT_LENGTH_VARIABLE;
|
||||
ev.data.ext.ptr = event->data;
|
||||
ev.data.ext.len = event->data_size;
|
||||
}
|
||||
|
||||
r = snd_seq_event_output(d->seq, &ev);
|
||||
#ifdef DEBUG
|
||||
if (r < 0)
|
||||
RARCH_ERR("[MIDI]: snd_seq_event_output failed with error %d.\n", r);
|
||||
#endif
|
||||
|
||||
d->out_ev_time.tv_sec = ev.time.time.tv_sec;
|
||||
d->out_ev_time.tv_nsec = ev.time.time.tv_nsec;
|
||||
|
||||
return r >= 0;
|
||||
}
|
||||
|
||||
static bool alsa_midi_flush(void *p)
|
||||
{
|
||||
int r;
|
||||
alsa_midi_t *d = (alsa_midi_t*)p;
|
||||
|
||||
r = snd_seq_drain_output(d->seq);
|
||||
#ifdef DEBUG
|
||||
if (r < 0)
|
||||
RARCH_ERR("[MIDI]: snd_seq_drain_output failed with error %d.\n", r);
|
||||
#endif
|
||||
|
||||
return r == 0;
|
||||
}
|
||||
|
||||
midi_driver_t midi_alsa = {
|
||||
"alsa",
|
||||
alsa_midi_get_avail_inputs,
|
||||
alsa_midi_get_avail_outputs,
|
||||
alsa_midi_init,
|
||||
alsa_midi_free,
|
||||
alsa_midi_set_input,
|
||||
alsa_midi_set_output,
|
||||
alsa_midi_read,
|
||||
alsa_midi_write,
|
||||
alsa_midi_flush
|
||||
};
|
@ -27,8 +27,12 @@
|
||||
|
||||
extern midi_driver_t midi_null;
|
||||
extern midi_driver_t midi_winmm;
|
||||
extern midi_driver_t midi_alsa;
|
||||
|
||||
static midi_driver_t *midi_drivers[] = {
|
||||
#ifdef HAVE_ALSA
|
||||
&midi_alsa,
|
||||
#endif
|
||||
#ifdef HAVE_WINMM
|
||||
&midi_winmm,
|
||||
#endif
|
||||
|
2
movie.c
2
movie.c
@ -531,7 +531,7 @@ static bool runloop_check_movie_record(void)
|
||||
|
||||
static bool runloop_check_movie_init(void)
|
||||
{
|
||||
char msg[8192], path[8192];
|
||||
char msg[16384], path[8192];
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
msg[0] = path[0] = '\0';
|
||||
|
23
msg_hash.h
23
msg_hash.h
@ -833,6 +833,7 @@ enum msg_hash_enums
|
||||
MENU_LABEL(LEFT_THUMBNAILS),
|
||||
MENU_LABEL(XMB_VERTICAL_THUMBNAILS),
|
||||
MENU_LABEL(TIMEDATE_ENABLE),
|
||||
MENU_LABEL(TIMEDATE_STYLE),
|
||||
MENU_LABEL(BATTERY_LEVEL_ENABLE),
|
||||
MENU_LABEL(MATERIALUI_MENU_COLOR_THEME),
|
||||
MENU_LABEL(QUICK_MENU_OVERRIDE_OPTIONS),
|
||||
@ -2129,6 +2130,28 @@ enum msg_hash_enums
|
||||
MSG_CHEAT_SEARCH_ADD_MATCH_FAIL,
|
||||
MSG_CHEAT_SEARCH_DELETE_MATCH_SUCCESS,
|
||||
MSG_CHEEVOS_HARDCORE_MODE_DISABLED,
|
||||
MENU_ENUM_LABEL_VALUE_TIMEDATE_STYLE_YMD_HMS,
|
||||
MENU_ENUM_LABEL_VALUE_TIMEDATE_STYLE_YMD_HM,
|
||||
MENU_ENUM_LABEL_VALUE_TIMEDATE_STYLE_MDYYYY,
|
||||
MENU_ENUM_LABEL_VALUE_TIMEDATE_STYLE_HMS,
|
||||
MENU_ENUM_LABEL_VALUE_TIMEDATE_STYLE_HM,
|
||||
MENU_ENUM_LABEL_VALUE_TIMEDATE_STYLE_DM_HM,
|
||||
MENU_ENUM_LABEL_VALUE_TIMEDATE_STYLE_MD_HM,
|
||||
MENU_ENUM_LABEL_VALUE_TIMEDATE_STYLE_AM_PM,
|
||||
|
||||
#ifdef HAVE_LAKKA_SWITCH
|
||||
MENU_ENUM_LABEL_SWITCH_GPU_PROFILE,
|
||||
MENU_ENUM_LABEL_VALUE_SWITCH_GPU_PROFILE,
|
||||
MENU_ENUM_SUBLABEL_SWITCH_GPU_PROFILE,
|
||||
|
||||
MENU_ENUM_LABEL_SWITCH_BACKLIGHT_CONTROL,
|
||||
MENU_ENUM_LABEL_VALUE_SWITCH_BACKLIGHT_CONTROL,
|
||||
MENU_ENUM_SUBLABEL_SWITCH_BACKLIGHT_CONTROL,
|
||||
|
||||
MENU_ENUM_LABEL_SWITCH_CPU_PROFILE,
|
||||
MENU_ENUM_LABEL_VALUE_SWITCH_CPU_PROFILE,
|
||||
MENU_ENUM_SUBLABEL_SWITCH_CPU_PROFILE,
|
||||
#endif
|
||||
|
||||
MSG_LAST
|
||||
};
|
||||
|
@ -142,7 +142,7 @@
|
||||
053FC25521433F1700D98D46 /* QtConcurrent.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QtConcurrent.framework; path = /usr/local/opt/qt/lib/QtConcurrent.framework; sourceTree = "<group>"; };
|
||||
053FC25621433F1800D98D46 /* QtNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QtNetwork.framework; path = /usr/local/opt/qt/lib/QtNetwork.framework; sourceTree = "<group>"; };
|
||||
053FC25721433F1800D98D46 /* QtWidgets.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QtWidgets.framework; path = /usr/local/opt/qt/lib/QtWidgets.framework; sourceTree = "<group>"; };
|
||||
05422E592140C8DB00F09961 /* RetroArchQT.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = RetroArchQT.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
05422E592140C8DB00F09961 /* RetroArch.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = RetroArch.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
05422E5B2140CE3500F09961 /* VulkanConfig.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = VulkanConfig.xcconfig; sourceTree = "<group>"; };
|
||||
05422E5C2140CFC500F09961 /* Metal.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Metal.xcconfig; sourceTree = "<group>"; };
|
||||
0548E2B220F976E10094A083 /* driver.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = driver.c; path = ../../driver.c; sourceTree = "<group>"; };
|
||||
@ -1426,7 +1426,7 @@
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8D1107320486CEB800E47090 /* RetroArch.app */,
|
||||
05422E592140C8DB00F09961 /* RetroArchQT.app */,
|
||||
05422E592140C8DB00F09961 /* RetroArch.app */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
@ -1502,9 +1502,9 @@
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
05422E3C2140C8DB00F09961 /* RetroArchQT */ = {
|
||||
05422E3C2140C8DB00F09961 /* RetroArchQt */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 05422E562140C8DB00F09961 /* Build configuration list for PBXNativeTarget "RetroArchQT" */;
|
||||
buildConfigurationList = 05422E562140C8DB00F09961 /* Build configuration list for PBXNativeTarget "RetroArchQt" */;
|
||||
buildPhases = (
|
||||
053FC2782143764B00D98D46 /* ShellScript */,
|
||||
05422E3D2140C8DB00F09961 /* Resources */,
|
||||
@ -1518,10 +1518,10 @@
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = RetroArchQT;
|
||||
name = RetroArchQt;
|
||||
productInstallPath = "$(HOME)/Applications";
|
||||
productName = RetroArch;
|
||||
productReference = 05422E592140C8DB00F09961 /* RetroArchQT.app */;
|
||||
productReference = 05422E592140C8DB00F09961 /* RetroArch.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
8D1107260486CEB800E47090 /* RetroArch */ = {
|
||||
@ -1563,7 +1563,7 @@
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
8D1107260486CEB800E47090 /* RetroArch */,
|
||||
05422E3C2140C8DB00F09961 /* RetroArchQT */,
|
||||
05422E3C2140C8DB00F09961 /* RetroArchQt */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
@ -1690,7 +1690,7 @@
|
||||
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
||||
PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = YES;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = libretro.RetroArch;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PRODUCT_NAME = RetroArch;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
@ -1711,7 +1711,7 @@
|
||||
);
|
||||
PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = YES;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = libretro.RetroArch;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PRODUCT_NAME = RetroArch;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
@ -1986,7 +1986,7 @@
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
05422E562140C8DB00F09961 /* Build configuration list for PBXNativeTarget "RetroArchQT" */ = {
|
||||
05422E562140C8DB00F09961 /* Build configuration list for PBXNativeTarget "RetroArchQt" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
05422E572140C8DB00F09961 /* Debug */,
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 20 KiB |
@ -147,7 +147,9 @@ static int pending_subsystem_id = 0;
|
||||
static unsigned pending_subsystem_rom_id = 0;
|
||||
|
||||
static char pending_subsystem_ident[255];
|
||||
#if 0
|
||||
static char pending_subsystem_extensions[PATH_MAX_LENGTH];
|
||||
#endif
|
||||
static char *pending_subsystem_roms[RARCH_MAX_SUBSYSTEM_ROMS];
|
||||
|
||||
|
||||
|
@ -597,7 +597,8 @@ static void task_save_handler(retro_task_t *task)
|
||||
|
||||
if (!state->file)
|
||||
{
|
||||
state->file = intfstream_open_file(state->path, RETRO_VFS_FILE_ACCESS_WRITE,
|
||||
state->file = intfstream_open_file(
|
||||
state->path, RETRO_VFS_FILE_ACCESS_WRITE,
|
||||
RETRO_VFS_FILE_ACCESS_HINT_NONE);
|
||||
|
||||
if (!state->file)
|
||||
@ -605,21 +606,15 @@ static void task_save_handler(retro_task_t *task)
|
||||
}
|
||||
|
||||
if (!state->data)
|
||||
{
|
||||
state->data = get_serialized_data(state->path, state->size) ;
|
||||
}
|
||||
state->data = get_serialized_data(state->path, state->size) ;
|
||||
|
||||
remaining = MIN(state->size - state->written, SAVE_STATE_CHUNK);
|
||||
|
||||
if ( state->data )
|
||||
{
|
||||
written = (int)intfstream_write(state->file,
|
||||
(uint8_t*)state->data + state->written, remaining);
|
||||
}
|
||||
else
|
||||
{
|
||||
written = 0 ;
|
||||
}
|
||||
written = 0;
|
||||
|
||||
state->written += written;
|
||||
|
||||
@ -627,7 +622,7 @@ static void task_save_handler(retro_task_t *task)
|
||||
|
||||
if (task_get_cancelled(task) || written != remaining)
|
||||
{
|
||||
char err[256];
|
||||
char err[8192];
|
||||
|
||||
err[0] = '\0';
|
||||
|
||||
@ -642,7 +637,9 @@ static void task_save_handler(retro_task_t *task)
|
||||
"RAM");
|
||||
}
|
||||
else
|
||||
snprintf(err, sizeof(err), "%s %s", msg_hash_to_str(MSG_FAILED_TO_SAVE_STATE_TO), state->path);
|
||||
snprintf(err, sizeof(err),
|
||||
"%s %s",
|
||||
msg_hash_to_str(MSG_FAILED_TO_SAVE_STATE_TO), state->path);
|
||||
|
||||
task_set_error(task, strdup(err));
|
||||
task_save_handler_finished(task, state);
|
||||
@ -845,30 +842,26 @@ static void task_load_handler(retro_task_t *task)
|
||||
|
||||
if (state->bytes_read == state->size)
|
||||
{
|
||||
char *msg = (char*)malloc(1024 * sizeof(char));
|
||||
size_t sizeof_msg = 8192;
|
||||
char *msg = (char*)malloc(sizeof_msg * sizeof(char));
|
||||
|
||||
msg[0] = '\0';
|
||||
msg[0] = '\0';
|
||||
|
||||
task_free_title(task);
|
||||
|
||||
if (state->autoload)
|
||||
{
|
||||
snprintf(msg,
|
||||
1024 * sizeof(char),
|
||||
snprintf(msg, sizeof_msg,
|
||||
"%s \"%s\" %s.",
|
||||
msg_hash_to_str(MSG_AUTOLOADING_SAVESTATE_FROM),
|
||||
state->path,
|
||||
msg_hash_to_str(MSG_SUCCEEDED));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (state->state_slot < 0)
|
||||
strlcpy(msg, msg_hash_to_str(MSG_LOADED_STATE_FROM_SLOT_AUTO),
|
||||
1024 * sizeof(char)
|
||||
);
|
||||
sizeof_msg);
|
||||
else
|
||||
snprintf(msg,
|
||||
1024 * sizeof(char),
|
||||
snprintf(msg, sizeof_msg,
|
||||
msg_hash_to_str(MSG_LOADED_STATE_FROM_SLOT),
|
||||
state->state_slot);
|
||||
|
||||
|
@ -79,7 +79,6 @@ static void ui_companion_cocoatouch_event_command(
|
||||
void *data, enum event_command cmd)
|
||||
{
|
||||
(void)data;
|
||||
command_event(cmd, NULL);
|
||||
}
|
||||
|
||||
static void rarch_draw_observer(CFRunLoopObserverRef observer,
|
||||
|
Loading…
Reference in New Issue
Block a user