Merge branch 'master' into modelview

This commit is contained in:
CozmoP 2018-12-23 00:55:12 +01:00 committed by GitHub
commit 6382bc48c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
80 changed files with 2379 additions and 418 deletions

2
.vscode/launch.json vendored
View File

@ -13,7 +13,7 @@
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"externalConsole": true,
"MIMode": "gdb",
"miDebuggerPath": "c:\\msys64\\mingw64\\bin\\gdb.exe",
"setupCommands": [

View File

@ -16,6 +16,7 @@
- VULKAN: Fix secondary screens in overlays not working.
- WAYLAND: Implement idle-inhibit support (needed for screensaver suspend).
- WINDOWS/WSA: Network Information info is blank until first network operation.
- WINDOWS: SSL/TLS connections now work properly.
- WIIU: Initial netplay peer-to-peer support. Network information working.
# 1.7.5

View File

@ -245,10 +245,10 @@ install: $(TARGET)
chmod 644 $(DESTDIR)$(DATA_DIR)/pixmaps/retroarch.svg
@if test -d media/assets; then \
echo "Installing media assets..."; \
mkdir -p $(DESTDIR)$(ASSETS_DIR)/assets/xmb; \
mkdir -p $(DESTDIR)$(ASSETS_DIR)/assets/glui; \
mkdir -p $(DESTDIR)$(ASSETS_DIR)/assets; \
cp -r media/assets/xmb/ $(DESTDIR)$(ASSETS_DIR)/assets; \
cp -r media/assets/glui/ $(DESTDIR)$(ASSETS_DIR)/assets; \
cp -r media/assets/ozone/ $(DESTDIR)$(ASSETS_DIR)/assets; \
cp media/assets/COPYING $(DESTDIR)$(DOC_DIR)/COPYING.assets; \
echo "Asset copying done."; \
fi

View File

@ -11,10 +11,13 @@
# patchelf
# bc
include version.all
# Classic Readme Variables ############
CLASSIC_MODS_VER := Official_Retroarch_v1_7_5c_COptimised
CLASSIC_MODS_NAME := RetroArch v1.7.5c (Official Classic Optimised)
CLASSIC_VERSION := 1.7.5c \(Classic+\)
CLASSIC_ALT_VER := $(shell echo $(RARCH_VERSION) | tr . _)
CLASSIC_MODS_VER := Official_Retroarch_v$(CLASSIC_ALT_VER)c_COptimised
CLASSIC_MODS_NAME := RetroArch v$(RARCH_VERSION)c \(Official Classic Optimised\)
CLASSIC_VERSION := $(RARCH_VERSION)c \(Classic+\)
MOD_CREATOR := Libretro + ModMyClassic
MOD_CATEGORY := RetroArch
GIT_COMMIT := $(shell echo "`git rev-parse --short HEAD``git diff-index --quiet HEAD -- || echo '-dirty'`")

View File

@ -393,97 +393,95 @@ ifeq ($(HAVE_LIBRETRODB), 1)
tasks/task_database_cue.o
endif
ifneq ($(C89_BUILD), 1)
HAVE_GTKPLUS = 0
ifeq ($(HAVE_BUILTINMBEDTLS), 1)
HAVE_SSL = 1
DEFINES += -DHAVE_SSL
ifeq ($(HAVE_SSL), 1)
ifeq ($(HAVE_NETWORKING), 1)
DEFINES += -DHAVE_SSL
ifeq ($(DEBUG), 1)
DEFINES += -DMBEDTLS_SSL_DEBUG_ALL
endif
# MinGW requires this for some reason, even though the include paths are relative to the source
INCLUDE_DIRS += -Ideps/mbedtls
OBJS_TLS_CRYPTO = deps/mbedtls/aes.o \
deps/mbedtls/aesni.o \
deps/mbedtls/arc4.o \
deps/mbedtls/asn1parse.o \
deps/mbedtls/asn1write.o \
deps/mbedtls/base64.o \
deps/mbedtls/bignum.o \
deps/mbedtls/blowfish.o \
deps/mbedtls/camellia.o \
deps/mbedtls/ccm.o \
deps/mbedtls/cipher.o \
deps/mbedtls/cipher_wrap.o \
deps/mbedtls/cmac.o \
deps/mbedtls/ctr_drbg.o \
deps/mbedtls/des.o \
deps/mbedtls/dhm.o \
deps/mbedtls/ecdh.o \
deps/mbedtls/ecdsa.o \
deps/mbedtls/ecjpake.o \
deps/mbedtls/ecp.o \
deps/mbedtls/ecp_curves.o \
deps/mbedtls/entropy.o \
deps/mbedtls/entropy_poll.o \
deps/mbedtls/error.o \
deps/mbedtls/gcm.o \
deps/mbedtls/havege.o \
deps/mbedtls/hmac_drbg.o \
deps/mbedtls/md.o \
deps/mbedtls/md2.o \
deps/mbedtls/md4.o \
deps/mbedtls/md5.o \
deps/mbedtls/md_wrap.o \
deps/mbedtls/memory_buffer_alloc.o \
deps/mbedtls/oid.o \
deps/mbedtls/padlock.o \
deps/mbedtls/pem.o \
deps/mbedtls/pk.o \
deps/mbedtls/pk_wrap.o \
deps/mbedtls/pkcs12.o \
deps/mbedtls/pkcs5.o \
deps/mbedtls/pkparse.o \
deps/mbedtls/pkwrite.o \
deps/mbedtls/platform.o \
deps/mbedtls/ripemd160.o \
deps/mbedtls/rsa.o \
deps/mbedtls/sha1.o \
deps/mbedtls/sha256.o \
deps/mbedtls/sha512.o \
deps/mbedtls/threading.o \
deps/mbedtls/timing.o \
deps/mbedtls/version.o \
deps/mbedtls/version_features.o \
deps/mbedtls/xtea.o
OBJS_TLS_X509 = deps/mbedtls/certs.o \
deps/mbedtls/pkcs11.o \
deps/mbedtls/x509.o \
deps/mbedtls/x509_create.o \
deps/mbedtls/x509_crl.o \
deps/mbedtls/x509_crt.o \
deps/mbedtls/x509_csr.o \
deps/mbedtls/x509write_crt.o \
deps/mbedtls/x509write_csr.o
OBJS_TLS = deps/mbedtls/debug.o \
deps/mbedtls/net_sockets.o \
deps/mbedtls/ssl_cache.o \
deps/mbedtls/ssl_ciphersuites.o \
deps/mbedtls/ssl_cli.o \
deps/mbedtls/ssl_cookie.o \
deps/mbedtls/ssl_srv.o \
deps/mbedtls/ssl_ticket.o \
deps/mbedtls/ssl_tls.o
OBJ += $(OBJS_TLS_CRYPTO) $(OBJS_TLS_X509) $(OBJS_TLS)
endif
ifeq ($(DEBUG), 1)
DEFINES += -DMBEDTLS_SSL_DEBUG_ALL
endif
# MinGW requires this for some reason, even though the include paths are relative to the source
INCLUDE_DIRS += -Ideps/mbedtls
OBJS_TLS_CRYPTO = deps/mbedtls/aes.o \
deps/mbedtls/aesni.o \
deps/mbedtls/arc4.o \
deps/mbedtls/asn1parse.o \
deps/mbedtls/asn1write.o \
deps/mbedtls/base64.o \
deps/mbedtls/bignum.o \
deps/mbedtls/blowfish.o \
deps/mbedtls/camellia.o \
deps/mbedtls/ccm.o \
deps/mbedtls/cipher.o \
deps/mbedtls/cipher_wrap.o \
deps/mbedtls/cmac.o \
deps/mbedtls/ctr_drbg.o \
deps/mbedtls/des.o \
deps/mbedtls/dhm.o \
deps/mbedtls/ecdh.o \
deps/mbedtls/ecdsa.o \
deps/mbedtls/ecjpake.o \
deps/mbedtls/ecp.o \
deps/mbedtls/ecp_curves.o \
deps/mbedtls/entropy.o \
deps/mbedtls/entropy_poll.o \
deps/mbedtls/error.o \
deps/mbedtls/gcm.o \
deps/mbedtls/havege.o \
deps/mbedtls/hmac_drbg.o \
deps/mbedtls/md.o \
deps/mbedtls/md2.o \
deps/mbedtls/md4.o \
deps/mbedtls/md5.o \
deps/mbedtls/md_wrap.o \
deps/mbedtls/memory_buffer_alloc.o \
deps/mbedtls/oid.o \
deps/mbedtls/padlock.o \
deps/mbedtls/pem.o \
deps/mbedtls/pk.o \
deps/mbedtls/pk_wrap.o \
deps/mbedtls/pkcs12.o \
deps/mbedtls/pkcs5.o \
deps/mbedtls/pkparse.o \
deps/mbedtls/pkwrite.o \
deps/mbedtls/platform.o \
deps/mbedtls/ripemd160.o \
deps/mbedtls/rsa.o \
deps/mbedtls/sha1.o \
deps/mbedtls/sha256.o \
deps/mbedtls/sha512.o \
deps/mbedtls/threading.o \
deps/mbedtls/timing.o \
deps/mbedtls/version.o \
deps/mbedtls/version_features.o \
deps/mbedtls/xtea.o
OBJS_TLS_X509 = deps/mbedtls/certs.o \
deps/mbedtls/pkcs11.o \
deps/mbedtls/x509.o \
deps/mbedtls/x509_create.o \
deps/mbedtls/x509_crl.o \
deps/mbedtls/x509_crt.o \
deps/mbedtls/x509_csr.o \
deps/mbedtls/x509write_crt.o \
deps/mbedtls/x509write_csr.o
OBJS_TLS = deps/mbedtls/debug.o \
deps/mbedtls/net_sockets.o \
deps/mbedtls/ssl_cache.o \
deps/mbedtls/ssl_ciphersuites.o \
deps/mbedtls/ssl_cli.o \
deps/mbedtls/ssl_cookie.o \
deps/mbedtls/ssl_srv.o \
deps/mbedtls/ssl_ticket.o \
deps/mbedtls/ssl_tls.o
OBJ += $(OBJS_TLS_CRYPTO) $(OBJS_TLS_X509) $(OBJS_TLS)
else ifeq ($(HAVE_SSL), 1)
DEFINES += -DHAVE_SSL
LIBS += $(MBEDTLS_LIBS) $(MBEDX509_LIBS) $(MBEDCRYPTO_LIBS)
endif
# Miscellaneous
@ -529,6 +527,10 @@ ifeq ($(HAVE_LIBNX), 1)
OBJ += gfx/drivers_font/switch_font.o
endif
ifeq ($(HAVE_AUDIOIO), 1)
OBJ += audio/drivers/audioio.o
endif
ifeq ($(HAVE_OSS), 1)
OBJ += audio/drivers/oss.o
else ifeq ($(HAVE_OSS_BSD), 1)
@ -1088,11 +1090,9 @@ ifeq ($(HAVE_GL_CONTEXT), 1)
endif
ifeq ($(HAVE_FFMPEG), 1)
ifneq ($(C89_BUILD), 1)
ifneq ($(HAVE_OPENGLES), 1)
OBJ += cores/libretro-ffmpeg/ffmpeg_fft.o
DEFINES += -I$(DEPS_DIR) -DHAVE_GL_FFT
endif
ifneq ($(HAVE_OPENGLES), 1)
OBJ += cores/libretro-ffmpeg/ffmpeg_fft.o
DEFINES += -I$(DEPS_DIR) -DHAVE_GL_FFT
endif
endif

View File

@ -53,7 +53,7 @@ ifeq ($(GRIFFIN_BUILD), 1)
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
#-DHAVE_SSL -DMBEDTLS_SSL_DEBUG_ALL
#-DHAVE_SSL -DHAVE_BUILTINMBEDTLS -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
HAVE_CC_RESAMPLER = 1
@ -77,6 +77,7 @@ else
#HAVE_SOCKET_LEGACY = 1
#HAVE_THREADS = 1
#HAVE_SSL = 1
#HAVE_BUILTINMBEDTLS = 1
include Makefile.common
BLACKLIST :=

View File

@ -1,3 +1,5 @@
include version.all
#---------------------------------------------------------------------------------
.SUFFIXES:
#---------------------------------------------------------------------------------
@ -104,7 +106,7 @@ EXEFS_SRC := exefs_src
#ROMFS := switch/romfs
APP_TITLE := RetroArch
APP_VERSION := 1.7.5
APP_VERSION := $(RARCH_VERSION)
APP_AUTHOR := libretro Team
APP_ICON := pkg/libnx/retroarch.jpg

View File

@ -65,6 +65,9 @@ static const audio_driver_t *audio_drivers[] = {
#ifdef HAVE_TINYALSA
&audio_tinyalsa,
#endif
#if defined(HAVE_AUDIOIO)
&audio_audioio,
#endif
#if defined(HAVE_OSS) || defined(HAVE_OSS_BSD)
&audio_oss,
#endif

View File

@ -316,6 +316,7 @@ const char *audio_driver_mixer_get_stream_name(unsigned i);
bool compute_audio_buffer_statistics(audio_statistics_t *stats);
extern audio_driver_t audio_rsound;
extern audio_driver_t audio_audioio;
extern audio_driver_t audio_oss;
extern audio_driver_t audio_alsa;
extern audio_driver_t audio_alsathread;

204
audio/drivers/audioio.c Normal file
View File

@ -0,0 +1,204 @@
/* 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 <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <unistd.h>
#include <errno.h>
#include <sys/audioio.h>
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "../audio_driver.h"
#include "../../verbosity.h"
#define DEFAULT_DEV "/dev/audio"
static void *audioio_init(const char *device, unsigned rate, unsigned latency,
unsigned block_frames,
unsigned *new_out_rate)
{
int *fd = (int*)calloc(1, sizeof(int));
const char *audiodev = device ? device : DEFAULT_DEV;
struct audio_info info;
if (!fd)
return NULL;
AUDIO_INITINFO(&info);
#ifdef AUMODE_PLAY_ALL
info.mode = AUMODE_PLAY_ALL;
#endif
info.play.sample_rate = rate;
info.play.channels = 2;
info.play.precision = 16;
#ifdef AUDIO_ENCODING_SLINEAR
info.play.encoding = AUDIO_ENCODING_SLINEAR;
#else
info.play.encoding = AUDIO_ENCODING_LINEAR;
#endif
if ((*fd = open(audiodev, O_WRONLY)) < 0)
{
free(fd);
perror("open");
return NULL;
}
if (ioctl(*fd, AUDIO_SETINFO, &info) < 0)
goto error;
if (ioctl(*fd, AUDIO_GETINFO, &info) < 0)
goto error;
*new_out_rate = info.play.sample_rate;
return fd;
error:
close(*fd);
free(fd);
perror("ioctl");
return NULL;
}
static ssize_t audioio_write(void *data, const void *buf, size_t size)
{
ssize_t ret;
int *fd = (int*)data;
if (size == 0)
return 0;
if ((ret = write(*fd, buf, size)) < 0)
{
if (errno == EAGAIN && (fcntl(*fd, F_GETFL) & O_NONBLOCK))
return 0;
return -1;
}
return ret;
}
static bool audioio_stop(void *data)
{
struct audio_info info;
int *fd = (int*)data;
if (ioctl(*fd, AUDIO_FLUSH, NULL) < 0)
return false;
if (ioctl(*fd, AUDIO_GETINFO, &info) < 0)
return false;
info.play.pause = true;
return ioctl(*fd, AUDIO_SETINFO, &info) == 0;
}
static bool audioio_start(void *data, bool is_shutdown)
{
struct audio_info info;
int *fd = (int*)data;
if (ioctl(*fd, AUDIO_FLUSH, NULL) < 0)
return false;
if (ioctl(*fd, AUDIO_GETINFO, &info) < 0)
return false;
info.play.pause = false;
return ioctl(*fd, AUDIO_SETINFO, &info) == 0;
}
static bool audioio_alive(void *data)
{
struct audio_info info;
int *fd = (int*)data;
if (ioctl(*fd, AUDIO_GETINFO, &info) < 0)
return false;
return !info.play.pause;
}
static void audioio_set_nonblock_state(void *data, bool state)
{
int rc;
int *fd = (int*)data;
if (state)
rc = fcntl(*fd, F_SETFL, fcntl(*fd, F_GETFL) | O_NONBLOCK);
else
rc = fcntl(*fd, F_SETFL, fcntl(*fd, F_GETFL) & (~O_NONBLOCK));
if (rc != 0)
RARCH_WARN("Could not set nonblocking on audio file descriptor. Will not be able to fast-forward.\n");
}
static void audioio_free(void *data)
{
int *fd = (int*)data;
(void)ioctl(*fd, AUDIO_FLUSH, NULL);
close(*fd);
free(fd);
}
static size_t audioio_buffer_size(void *data)
{
struct audio_info info;
int *fd = (int*)data;
if (ioctl(*fd, AUDIO_GETINFO, &info) < 0)
return false;
return info.play.buffer_size;
}
static size_t audioio_write_avail(void *data)
{
return audioio_buffer_size(data);
}
static bool audioio_use_float(void *data)
{
(void)data;
return false;
}
audio_driver_t audio_audioio = {
audioio_init,
audioio_write,
audioio_stop,
audioio_start,
audioio_alive,
audioio_set_nonblock_state,
audioio_free,
audioio_use_float,
"audioio",
NULL,
NULL,
audioio_write_avail,
audioio_buffer_size,
};

View File

@ -285,6 +285,8 @@ static bool quick_menu_show_take_screenshot = true;
static bool quick_menu_show_save_load_state = true;
static bool quick_menu_show_undo_save_load_state = true;
static bool quick_menu_show_add_to_favorites = true;
static bool quick_menu_show_start_recording = true;
static bool quick_menu_show_start_streaming = true;
static bool quick_menu_show_reset_core_association = true;
static bool quick_menu_show_options = true;
static bool quick_menu_show_controls = true;
@ -373,6 +375,10 @@ static bool show_advanced_settings = false;
static const uint32_t menu_entry_normal_color = 0xffffffff;
static const uint32_t menu_entry_hover_color = 0xff64ff64;
static const uint32_t menu_title_color = 0xff64ff64;
static const uint32_t menu_bg_dark_color = 0xc0202020;
static const uint32_t menu_bg_light_color = 0xc0404040;
static const uint32_t menu_border_dark_color = 0xc0204020;
static const uint32_t menu_border_light_color = 0xc0408040;
#else
static bool default_block_config_read = false;

View File

@ -1402,6 +1402,8 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
SETTING_BOOL("quick_menu_show_save_load_state", &settings->bools.quick_menu_show_save_load_state, true, quick_menu_show_save_load_state, false);
SETTING_BOOL("quick_menu_show_undo_save_load_state", &settings->bools.quick_menu_show_undo_save_load_state, true, quick_menu_show_undo_save_load_state, false);
SETTING_BOOL("quick_menu_show_add_to_favorites", &settings->bools.quick_menu_show_add_to_favorites, true, quick_menu_show_add_to_favorites, false);
SETTING_BOOL("quick_menu_show_start_recording", &settings->bools.quick_menu_show_start_recording, true, quick_menu_show_start_recording, false);
SETTING_BOOL("quick_menu_show_start_streaming", &settings->bools.quick_menu_show_start_streaming, true, quick_menu_show_start_streaming, false);
SETTING_BOOL("quick_menu_show_reset_core_association", &settings->bools.quick_menu_show_reset_core_association, true, quick_menu_show_reset_core_association, false);
SETTING_BOOL("quick_menu_show_options", &settings->bools.quick_menu_show_options, true, quick_menu_show_options, false);
SETTING_BOOL("quick_menu_show_controls", &settings->bools.quick_menu_show_controls, true, quick_menu_show_controls, false);
@ -1912,6 +1914,10 @@ void config_set_defaults(void)
settings->uints.menu_entry_normal_color = menu_entry_normal_color;
settings->uints.menu_entry_hover_color = menu_entry_hover_color;
settings->uints.menu_title_color = menu_title_color;
settings->uints.menu_bg_dark_color = menu_bg_dark_color;
settings->uints.menu_bg_light_color = menu_bg_light_color;
settings->uints.menu_border_dark_color = menu_border_dark_color;
settings->uints.menu_border_light_color = menu_border_light_color;
#endif
#ifdef HAVE_CHEEVOS
@ -1945,7 +1951,7 @@ void config_set_defaults(void)
for (i = 0; i < MAX_USERS; i++)
{
settings->uints.input_joypad_map[i] = i;
#ifdef SWITCH // Switch prefered default dpad mode
#ifdef SWITCH /* Switch prefered default dpad mode */
settings->uints.input_analog_dpad_mode[i] = ANALOG_DPAD_LSTICK;
#else
settings->uints.input_analog_dpad_mode[i] = ANALOG_DPAD_NONE;
@ -2829,6 +2835,14 @@ static bool config_load_file(const char *path, bool set_defaults,
&settings->uints.menu_entry_hover_color);
config_get_hex_base(conf, "menu_title_color",
&settings->uints.menu_title_color);
config_get_hex_base(conf, "menu_bg_dark_color",
&settings->uints.menu_bg_dark_color);
config_get_hex_base(conf, "menu_bg_light_color",
&settings->uints.menu_bg_light_color);
config_get_hex_base(conf, "menu_border_dark_color",
&settings->uints.menu_border_dark_color);
config_get_hex_base(conf, "menu_border_light_color",
&settings->uints.menu_border_light_color);
#endif
/* Float settings */
@ -4333,6 +4347,14 @@ bool config_save_file(const char *path)
settings->uints.menu_entry_hover_color);
config_set_hex(conf, "menu_title_color",
settings->uints.menu_title_color);
config_set_hex(conf, "menu_bg_dark_color",
settings->uints.menu_bg_dark_color);
config_set_hex(conf, "menu_bg_light_color",
settings->uints.menu_bg_light_color);
config_set_hex(conf, "menu_border_dark_color",
settings->uints.menu_border_dark_color);
config_set_hex(conf, "menu_border_light_color",
settings->uints.menu_border_light_color);
#endif

View File

@ -184,6 +184,8 @@ typedef struct settings
bool quick_menu_show_save_load_state;
bool quick_menu_show_undo_save_load_state;
bool quick_menu_show_add_to_favorites;
bool quick_menu_show_start_recording;
bool quick_menu_show_start_streaming;
bool quick_menu_show_reset_core_association;
bool quick_menu_show_options;
bool quick_menu_show_controls;
@ -404,6 +406,10 @@ typedef struct settings
unsigned menu_entry_normal_color;
unsigned menu_entry_hover_color;
unsigned menu_title_color;
unsigned menu_bg_dark_color;
unsigned menu_bg_light_color;
unsigned menu_border_dark_color;
unsigned menu_border_light_color;
unsigned menu_xmb_layout;
unsigned menu_xmb_shader_pipeline;
unsigned menu_xmb_scale_factor;

View File

@ -103,6 +103,9 @@ unsigned content_get_subsystem_rom_id(void);
/* Set environment variables before a subsystem load */
void content_set_subsystem_info(void);
/* Get the path to the last selected subsystem rom */
char* content_get_subsystem_rom(unsigned index);
RETRO_END_DECLS
#endif

View File

@ -45,7 +45,7 @@
#define STB_RECT_PACK_VERSION 1
#ifdef STBRP_STATIC
#define STBRP_DEF static
#define STBRP_DEF STATIC
#else
#define STBRP_DEF extern
#endif
@ -498,7 +498,7 @@ static int rect_height_compare(const void *a, const void *b)
return (p->w > q->w) ? -1 : (p->w < q->w);
}
static int rect_width_compare(const void *a, const void *b)
STBRP_DEF int rect_width_compare(const void *a, const void *b)
{
stbrp_rect *p = (stbrp_rect *) a;
stbrp_rect *q = (stbrp_rect *) b;

View File

@ -288,7 +288,7 @@
#define __STB_INCLUDE_STB_TRUETYPE_H__
#ifdef STBTT_STATIC
#define STBTT_DEF static
#define STBTT_DEF STATIC
#else
#define STBTT_DEF extern
#endif

View File

@ -435,7 +435,10 @@ void driver_uninit(int flags)
#ifdef HAVE_MENU
if (flags & DRIVER_MENU_MASK)
{
menu_driver_ctl(RARCH_MENU_CTL_DEINIT, NULL);
menu_driver_free();
}
#endif
if ((flags & DRIVER_LOCATION_MASK) && !location_driver_ctl(RARCH_LOCATION_CTL_OWNS_DRIVER, NULL))

View File

@ -184,7 +184,8 @@ static bool environ_cb_get_system_info(unsigned cmd, void *data)
break;
case RETRO_ENVIRONMENT_SET_SUBSYSTEM_INFO:
{
unsigned i, j;
unsigned i = 0;
unsigned j = 0;
unsigned size = i;
const struct retro_subsystem_info *info =
(const struct retro_subsystem_info*)data;

View File

@ -218,14 +218,14 @@ static bool x11_display_server_set_resolution(void *data,
/* create interlaced newmode from modline variables */
if (height < 300)
{
snprintf(xrandr, sizeof(xrandr), "xrandr --newmode \"%dx%d_%0.2f\" %lf %d %d %d %d %d %d %d %d -hsync -vsync", width, height, hz, pixel_clock,
snprintf(xrandr, sizeof(xrandr), "xrandr --newmode \"%dx%d_%0.2f\" %f %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,
snprintf(xrandr, sizeof(xrandr), "xrandr --newmode \"%dx%d_%0.2f\" %f %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);
}

View File

@ -28,10 +28,10 @@
#define STB_RECT_PACK_IMPLEMENTATION
#define STBTT_STATIC
#define STBRP_STATIC
#define static static INLINE
#define STATIC static INLINE
#include "../../deps/stb/stb_rect_pack.h"
#include "../../deps/stb/stb_truetype.h"
#undef static
#undef STATIC
#endif
typedef struct

View File

@ -32,10 +32,10 @@
#define STB_RECT_PACK_IMPLEMENTATION
#define STBTT_STATIC
#define STBRP_STATIC
#define static static INLINE
#define STATIC static INLINE
#include "../../deps/stb/stb_rect_pack.h"
#include "../../deps/stb/stb_truetype.h"
#undef static
#undef STATIC
#endif
#define STB_UNICODE_ATLAS_ROWS 16

View File

@ -1106,12 +1106,12 @@ StaticTexture::StaticTexture(string id,
bool linear,
bool mipmap,
vulkan_filter_chain_address address)
: id(move(id)),
device(device),
: device(device),
image(image),
view(view),
memory(memory),
buffer(move(buffer))
buffer(move(buffer)),
id(move(id))
{
texture.filter = linear ? VULKAN_FILTER_CHAIN_LINEAR : VULKAN_FILTER_CHAIN_NEAREST;
texture.mip_filter =
@ -2104,8 +2104,8 @@ Framebuffer::Framebuffer(
const VkPhysicalDeviceMemoryProperties &mem_props,
const Size2D &max_size, VkFormat format,
unsigned max_levels) :
device(device),
memory_properties(mem_props),
device(device),
size(max_size),
format(format),
max_levels(max(max_levels, 1u))

View File

@ -1466,6 +1466,7 @@ SSL
============================================================ */
#if defined(HAVE_SSL)
#if defined(HAVE_NETWORKING)
#if defined(HAVE_BUILTINMBEDTLS)
#include "../deps/mbedtls/aes.c"
#include "../deps/mbedtls/aesni.c"
#include "../deps/mbedtls/arc4.c"
@ -1543,3 +1544,4 @@ SSL
#include "../libretro-common/net/net_socket_ssl.c"
#endif
#endif
#endif

View File

@ -505,41 +505,40 @@ static bool udev_input_add_device(udev_input_t *udev,
strlcpy(device->devnode, devnode, sizeof(device->devnode));
/* Touchpads report in absolute coords. */
if (type == UDEV_INPUT_TOUCHPAD)
{
if (ioctl(fd, EVIOCGABS(ABS_X), &absinfo) < 0 ||
absinfo.minimum >= absinfo.maximum)
goto error;
device->mouse.x_min = absinfo.minimum;
device->mouse.x_max = absinfo.maximum;
if (ioctl(fd, EVIOCGABS(ABS_Y), &absinfo) < 0 ||
absinfo.minimum >= absinfo.maximum)
goto error;
device->mouse.y_min = absinfo.minimum;
device->mouse.y_max = absinfo.maximum;
}
/* UDEV_INPUT_MOUSE may report in absolute coords too */
else if (type == UDEV_INPUT_MOUSE && ioctl(fd, EVIOCGABS(ABS_X), &absinfo) >= 0)
if (type == UDEV_INPUT_MOUSE || type == UDEV_INPUT_TOUCHPAD )
{
if (absinfo.minimum >= absinfo.maximum)
goto error;
if (ioctl(fd, EVIOCGABS(ABS_X), &absinfo) >= 0)
{
if (absinfo.minimum >= absinfo.maximum )
{
device->mouse.x_min = -1;
device->mouse.x_max = -1;
}
else
{
device->mouse.x_min = absinfo.minimum;
device->mouse.x_min = absinfo.maximum;
}
}
device->mouse.x_min = absinfo.minimum;
device->mouse.x_max = absinfo.maximum;
if (ioctl(fd, EVIOCGABS(ABS_Y), &absinfo) < 0 ||
absinfo.minimum >= absinfo.maximum)
goto error;
device->mouse.y_min = absinfo.minimum;
device->mouse.y_max = absinfo.maximum;
if (ioctl(fd, EVIOCGABS(ABS_Y), &absinfo) >= 0)
{
if (absinfo.minimum >= absinfo.maximum )
{
device->mouse.y_min = -1;
device->mouse.y_max = -1;
}
else
{
device->mouse.y_min = absinfo.minimum;
device->mouse.y_min = absinfo.maximum;
}
}
}
tmp = ( udev_input_device_t**)realloc(udev->devices,
tmp = ( udev_input_device_t**)realloc(udev->devices,
(udev->num_devices + 1) * sizeof(*udev->devices));
if (!tmp)

View File

@ -205,28 +205,28 @@ DECL_AXIS_EX(r_y_plus, +3, "R-Stick down") \
DECL_AXIS_EX(r_y_minus, -3, "R-Stick up")
#define CTRINPUT_DEFAULT_BINDS \
DECL_BTN(a, 8) \
DECL_BTN(b, 0) \
DECL_BTN(x, 9) \
DECL_BTN(y, 1) \
DECL_BTN(start, 3) \
DECL_BTN(select, 2) \
DECL_BTN(up, 4) \
DECL_BTN(down, 5) \
DECL_BTN(left, 6) \
DECL_BTN(right, 7) \
DECL_BTN(l, 10) \
DECL_BTN(r, 11) \
DECL_BTN(l2, 12) \
DECL_BTN(r2, 13) \
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, 8, "A") \
DECL_BTN_EX(b, 0, "B") \
DECL_BTN_EX(x, 9, "X") \
DECL_BTN_EX(y, 1, "Y") \
DECL_BTN_EX(start, 3, "Start") \
DECL_BTN_EX(select, 2, "Select") \
DECL_BTN_EX(up, 4, "D-Pad Up") \
DECL_BTN_EX(down, 5, "D-Pad Down") \
DECL_BTN_EX(left, 6, "D-Pad Left") \
DECL_BTN_EX(right, 7, "D-Pad Right") \
DECL_BTN_EX(l, 10, "L") \
DECL_BTN_EX(r, 11, "R") \
DECL_BTN_EX(l2, 12, "ZL") \
DECL_BTN_EX(r2, 13, "ZR") \
DECL_AXIS_EX(l_x_plus, +0, "Circle Pad Right") \
DECL_AXIS_EX(l_x_minus, -0, "Circle Pad Left") \
DECL_AXIS_EX(l_y_plus, +1, "Circle Pad Down") \
DECL_AXIS_EX(l_y_minus, -1, "Circle Pad Up") \
DECL_AXIS_EX(r_x_plus, +2, "C Stick Right") \
DECL_AXIS_EX(r_x_minus, -2, "C Stick Left") \
DECL_AXIS_EX(r_y_plus, -3, "C Stick Down") \
DECL_AXIS_EX(r_y_minus, +3, "C Stick Up")
#define DOSINPUT_DEFAULT_BINDS \
DECL_BTN(a, 8) \

View File

@ -2683,7 +2683,7 @@ static void input_config_get_bind_string_joyaxis(char *buf, const char *prefix,
if (bind->joyaxis_label &&
!string_is_empty(bind->joyaxis_label)
&& settings->bools.input_descriptor_label_show)
snprintf(buf, size, "%s%s (axis) ", prefix, bind->joyaxis_label);
snprintf(buf, size, "%s%s (axis)", prefix, bind->joyaxis_label);
else
{
unsigned axis = 0;

View File

@ -59,6 +59,7 @@ enum input_toggle_type
INPUT_TOGGLE_START_SELECT,
INPUT_TOGGLE_L3_R,
INPUT_TOGGLE_L_R,
INPUT_TOGGLE_HOLD_START,
INPUT_TOGGLE_LAST
};

View File

@ -3369,6 +3369,14 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_FAVORITES,
"Show Add to Favorites")
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES,
"Show/hide the 'Add to Favorites' option.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_START_RECORDING,
"Show Start Recording")
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_START_RECORDING,
"Show/hide the 'Start Recording' option.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_START_STREAMING,
"Show Start Streaming")
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_START_STREAMING,
"Show/hide the 'Start Streaming' option.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION,
"Show Reset Core Association")
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION,

View File

@ -3646,6 +3646,14 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_FAVORITES,
"显示「添加到收藏夹」")
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES,
"显示或隐藏「添加到收藏夹」选项。")
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_START_RECORDING,
"Show Start Recording")
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_START_RECORDING,
"Show/hide the 'Start Recording' option.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_START_STREAMING,
"Show Start Streaming")
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_START_STREAMING,
"Show/hide the 'Start Streaming' option.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION,
"Show Reset Core Association")
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION,

View File

@ -3177,6 +3177,14 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_FAVORITES,
"顯示 Add to Favorites")
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES,
"顯示/隱藏 the 'Add to Favorites' option.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_START_RECORDING,
"Show Start Recording")
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_START_RECORDING,
"Show/hide the 'Start Recording' option.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_START_STREAMING,
"Show Start Streaming")
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_START_STREAMING,
"Show/hide the 'Start Streaming' option.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION,
"Show Reset Core Association")
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION,

View File

@ -3297,6 +3297,14 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_FAVORITES,
"Zeige 'Zu Favoriten hinzufügen'")
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES,
"Zeige/verstecke die Option 'Zu Favoriten hinzufügen'.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_START_RECORDING,
"Show Start Recording")
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_START_RECORDING,
"Show/hide the 'Start Recording' option.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_START_STREAMING,
"Show Start Streaming")
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_START_STREAMING,
"Show/hide the 'Start Streaming' option.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION,
"Show Reset Core Association")
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION,

View File

@ -6098,6 +6098,22 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES,
"Show/hide the 'Add to Favorites' option."
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_START_RECORDING,
"Show Start Recording"
)
MSG_HASH(
MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_START_RECORDING,
"Show/hide the 'Start Recording' option."
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_START_STREAMING,
"Show Start Streaming"
)
MSG_HASH(
MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_START_STREAMING,
"Show/hide the 'Start Streaming' option."
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION,
"Show Reset Core Association"

View File

@ -3052,6 +3052,14 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_FAVORITES,
"Show Add to Favorites")
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES,
"Show/hide the 'Add to Favorites' option.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_START_RECORDING,
"Show Start Recording")
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_START_RECORDING,
"Show/hide the 'Start Recording' option.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_START_STREAMING,
"Show Start Streaming")
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_START_STREAMING,
"Show/hide the 'Start Streaming' option.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION,
"Show Reset Core Association")
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION,

View File

@ -6101,6 +6101,22 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES,
"Mostrar/ocultar la opción de 'Agregar a favoritos'"
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_START_RECORDING,
"Show Start Recording"
)
MSG_HASH(
MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_START_RECORDING,
"Show/hide the 'Start Recording' option."
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_START_STREAMING,
"Show Start Streaming"
)
MSG_HASH(
MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_START_STREAMING,
"Show/hide the 'Start Streaming' option."
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION,
"Show Reset Core Association"

View File

@ -3211,6 +3211,14 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_FAVORITES,
"Show Add to Favorites")
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES,
"Show/hide the 'Add to Favorites' option.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_START_RECORDING,
"Show Start Recording")
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_START_RECORDING,
"Show/hide the 'Start Recording' option.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_START_STREAMING,
"Show Start Streaming")
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_START_STREAMING,
"Show/hide the 'Start Streaming' option.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION,
"Show Reset Core Association")
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION,

View File

@ -3061,11 +3061,11 @@ MSG_HASH(
)
MSG_HASH(
MENU_ENUM_SUBLABEL_AUDIO_FILTER_DIR,
"Directory in cui vengono conservati i file di filtro audio DSP."
"Cartella in cui vengono conservati i file di filtro audio DSP."
)
MSG_HASH(
MENU_ENUM_SUBLABEL_VIDEO_FILTER_DIR,
"Directory dove vengono conservati i file del filtro video basati su CPU."
"Cartella dove vengono conservati i file del filtro video basati su CPU."
)
MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_SHADER_DIR,
"Definisce una directory in cui i file shader del video basati su GPU vengono mantenuti per un facile accesso.")
@ -3271,10 +3271,18 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_FAVORITES,
"Visualizza Aggiungi a Preferiti")
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES,
"Mostra/nasconde l'opzione Aggiungi a Preferiti.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_START_RECORDING,
"Visualizza inizia la registrazione")
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_START_RECORDING,
"Mostra/Nasconde l'opzione 'Inizia la Registrazione'.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_START_STREAMING,
"Visualizza Inizia lo Streaming")
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_START_STREAMING,
"Mostra/Nasconde l'opzione 'Inizia lo streaming'.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION,
"Show Reset Core Association")
"Visualizza associazione Reset Core")
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION,
"Show/hide the 'Reset Core Association' option.")
"Mostra/Nasconde l'opzione 'Associazione Reset Core'.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_OPTIONS,
"Visualizza Opzioni")
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_OPTIONS,
@ -3345,7 +3353,7 @@ MSG_HASH(MENU_ENUM_SUBLABEL_CRT_SWITCH_RESOLUTION, "Solo per schermi CRT. Tenta
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."
"Passa dalle risoluzioni native e ultrawide super risoluzione."
)
MSG_HASH(MENU_ENUM_LABEL_VALUE_CRT_SWITCH_RESOLUTION_SUPER, "CRT Super Risoluzione")
MSG_HASH(MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_REWIND,
@ -3599,4 +3607,4 @@ MSG_HASH(
"Nessun preferito disponibile."
)
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_WINDOW_SAVE_POSITION,
"Remember Window Position and Size")
"Ricorda la dimensione e posizione della finestra")

View File

@ -3397,6 +3397,14 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_FAVORITES,
"「お気に入りに追加」を表示")
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES,
"「お気に入りに追加」オプションを表示/非表示にする。")
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_START_RECORDING,
"Show Start Recording")
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_START_RECORDING,
"Show/hide the 'Start Recording' option.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_START_STREAMING,
"Show Start Streaming")
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_START_STREAMING,
"Show/hide the 'Start Streaming' option.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION,
"Show Reset Core Association")
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION,

View File

@ -3172,6 +3172,14 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_FAVORITES,
"Show Add to Favorites")
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES,
"Show/hide the 'Add to Favorites' option.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_START_RECORDING,
"Show Start Recording")
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_START_RECORDING,
"Show/hide the 'Start Recording' option.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_START_STREAMING,
"Show Start Streaming")
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_START_STREAMING,
"Show/hide the 'Start Streaming' option.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION,
"Show Reset Core Association")
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION,

View File

@ -223,6 +223,8 @@ MSG_HASH(MENU_ENUM_LABEL_INPUT_SPLIT_JOYCON,
"input_split_joycon")
MSG_HASH(MENU_ENUM_LABEL_CORE_LIST,
"load_core")
MSG_HASH(MENU_ENUM_LABEL_SIDELOAD_CORE_LIST,
"sideload_core")
MSG_HASH(MENU_ENUM_LABEL_CORE_OPTIONS,
"core_options")
MSG_HASH(MENU_ENUM_LABEL_CORE_OPTION_ENTRY,
@ -1123,6 +1125,14 @@ 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_BG_DARK_COLOR,
"menu_bg_dark_color")
MSG_HASH(MENU_ENUM_LABEL_BG_LIGHT_COLOR,
"menu_bg_light_color")
MSG_HASH(MENU_ENUM_LABEL_BORDER_DARK_COLOR,
"menu_border_dark_color")
MSG_HASH(MENU_ENUM_LABEL_BORDER_LIGHT_COLOR,
"menu_border_light_color")
MSG_HASH(MENU_ENUM_LABEL_UI_COMPANION_ENABLE,
"ui_companion_enable")
MSG_HASH(MENU_ENUM_LABEL_UI_COMPANION_START_ON_BOOT,
@ -1515,6 +1525,10 @@ MSG_HASH(MENU_ENUM_LABEL_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE,
"quick_menu_show_undo_save_load_state")
MSG_HASH(MENU_ENUM_LABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES,
"quick_menu_show_add_to_favorites")
MSG_HASH(MENU_ENUM_LABEL_QUICK_MENU_SHOW_START_RECORDING,
"quick_menu_show_start_recording")
MSG_HASH(MENU_ENUM_LABEL_QUICK_MENU_SHOW_START_STREAMING,
"quick_menu_show_start_streaming")
MSG_HASH(MENU_ENUM_LABEL_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION,
"quick_menu_show_reset_core_association")
MSG_HASH(MENU_ENUM_LABEL_QUICK_MENU_SHOW_OPTIONS,

View File

@ -3066,6 +3066,14 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_FAVORITES,
"Show Add to Favorites")
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES,
"Show/hide the 'Add to Favorites' option.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_START_RECORDING,
"Show Start Recording")
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_START_RECORDING,
"Show/hide the 'Start Recording' option.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_START_STREAMING,
"Show Start Streaming")
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_START_STREAMING,
"Show/hide the 'Start Streaming' option.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION,
"Show Reset Core Association")
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION,

View File

@ -3438,6 +3438,14 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_FAVORITES,
"Pokaż dodaj do ulubionych")
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES,
"Pokaż/ukryj opcję 'Dodaj do ulubionych'.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_START_RECORDING,
"Show Start Recording")
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_START_RECORDING,
"Show/hide the 'Start Recording' option.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_START_STREAMING,
"Show Start Streaming")
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_START_STREAMING,
"Show/hide the 'Start Streaming' option.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION,
"Show Reset Core Association")
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION,

View File

@ -6133,6 +6133,22 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES,
"Exibir/ocultar a opção 'Adicionar aos Favoritos'."
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_START_RECORDING,
"Show Start Recording"
)
MSG_HASH(
MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_START_RECORDING,
"Show/hide the 'Start Recording' option."
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_START_STREAMING,
"Show Start Streaming"
)
MSG_HASH(
MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_START_STREAMING,
"Show/hide the 'Start Streaming' option."
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION,
"Show Reset Core Association"

View File

@ -3146,6 +3146,14 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_FAVORITES,
"Mostrar 'Adicionar aos favoritos'")
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES,
"Mostrar/esconder a opção 'Adicionar aos favoritos'.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_START_RECORDING,
"Show Start Recording")
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_START_RECORDING,
"Show/hide the 'Start Recording' option.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_START_STREAMING,
"Show Start Streaming")
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_START_STREAMING,
"Show/hide the 'Start Streaming' option.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION,
"Show Reset Core Association")
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION,

View File

@ -3220,6 +3220,14 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_FAVORITES,
"Показать Добавить в избранное")
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES,
"Показать/скрыть настройку 'Добавить в избранное'.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_START_RECORDING,
"Show Start Recording")
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_START_RECORDING,
"Show/hide the 'Start Recording' option.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_START_STREAMING,
"Show Start Streaming")
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_START_STREAMING,
"Show/hide the 'Start Streaming' option.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION,
"Show Reset Core Association")
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION,

View File

@ -7,7 +7,7 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_SWITCH_GPU_PROFILE,
"Overclock or underclock the Switch GPU"
)
MSG_HASH(
MSG_HASH(
MENU_ENUM_LABEL_VALUE_SWITCH_BACKLIGHT_CONTROL,
"Screen brightness"
)
@ -673,6 +673,18 @@ MSG_HASH(
MENU_ENUM_LABEL_VALUE_CORE_LIST,
"Load Core"
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_SIDELOAD_CORE_LIST,
"Install or Restore a Core"
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_SIDELOAD_CORE_ERROR,
"Core installation failed"
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_SIDELOAD_CORE_SUCCESS,
"Core installation succesful"
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_CORE_OPTIONS,
"Options"
@ -783,7 +795,7 @@ MSG_HASH(
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_DOWNLOAD_CORE,
"Download Core..."
"Download a Core"
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_DOWNLOAD_CORE_CONTENT,
@ -2964,6 +2976,22 @@ MSG_HASH(
MENU_ENUM_LABEL_VALUE_TITLE_COLOR,
"Menu title color"
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_BG_DARK_COLOR,
"Menu background dark color"
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_BG_LIGHT_COLOR,
"Menu background light color"
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_BORDER_DARK_COLOR,
"Menu border dark color"
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_BORDER_LIGHT_COLOR,
"Menu border light color"
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_TRUE,
"True"
@ -4890,6 +4918,14 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_CORE_LIST,
"Select which core to use."
)
MSG_HASH(
MENU_ENUM_SUBLABEL_DOWNLOAD_CORE,
"Install a core from the online updater."
)
MSG_HASH(
MENU_ENUM_SUBLABEL_SIDELOAD_CORE_LIST,
"Install or restore a core from the downloads directory."
)
MSG_HASH(
MENU_ENUM_SUBLABEL_LOAD_CONTENT_LIST,
"Select which content to start."
@ -6157,6 +6193,22 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES,
"Show/hide the 'Add to Favorites' option."
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_START_RECORDING,
"Show Start Recording"
)
MSG_HASH(
MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_START_RECORDING,
"Show/hide the 'Start Recording' option."
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_START_STREAMING,
"Show Start Streaming"
)
MSG_HASH(
MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_START_STREAMING,
"Show/hide the 'Start Streaming' option."
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION,
"Show Reset Core Association"
@ -7826,3 +7878,7 @@ MSG_HASH(
MENU_ENUM_LABEL_VALUE_VIDEO_WINDOW_SAVE_POSITION,
"Remember Window Position and Size"
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_HOLD_START,
"Hold Start (2 seconds)"
)

View File

@ -3209,6 +3209,14 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_FAVORITES,
"Show Add to Favorites")
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES,
"Show/hide the 'Add to Favorites' option.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_START_RECORDING,
"Show Start Recording")
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_START_RECORDING,
"Show/hide the 'Start Recording' option.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_START_STREAMING,
"Show Start Streaming")
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_START_STREAMING,
"Show/hide the 'Start Streaming' option.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION,
"Show Reset Core Association")
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION,

File diff suppressed because it is too large Load Diff

View File

@ -166,7 +166,7 @@ typedef struct
#endif
# endif
#else
# define PRI_SIZET "zu"
# define PRI_SIZET "lu"
#endif
#endif

View File

@ -25,6 +25,7 @@
#include <net/net_socket.h>
#include <net/net_socket_ssl.h>
#if defined(HAVE_BUILTINMBEDTLS)
#include "../../deps/mbedtls/mbedtls/config.h"
#include "../../deps/mbedtls/mbedtls/certs.h"
#include "../../deps/mbedtls/mbedtls/debug.h"
@ -33,7 +34,18 @@
#include "../../deps/mbedtls/mbedtls/ssl.h"
#include "../../deps/mbedtls/mbedtls/ctr_drbg.h"
#include "../../deps/mbedtls/mbedtls/entropy.h"
#else
#include <mbedtls/config.h>
#include <mbedtls/certs.h>
#include <mbedtls/debug.h>
#include <mbedtls/platform.h>
#include <mbedtls/net_sockets.h>
#include <mbedtls/ssl.h>
#include <mbedtls/ctr_drbg.h>
#include <mbedtls/entropy.h>
#endif
/* Not part of the mbedtls upstream source */
#include "../../deps/mbedtls/cacert.h"
#define DEBUG_LEVEL 0
@ -163,7 +175,7 @@ ssize_t ssl_socket_receive_all_nonblocking(void *state_data, bool *error, void *
return -1;
}
if (isagain((int)ret))
if (isagain((int)ret) || ret == MBEDTLS_ERR_SSL_WANT_READ)
return 0;
*error = true;

View File

@ -9,7 +9,7 @@ Files specified later in the chain **will override** earlier ones if the same ke
* To create an index `libretrodb_tool <db file> create-index <index name> <field name>`
* To find an entry with an index `libretrodb_tool <db file> find <index name> <value>`
# Compiling a single database with `c_converter`
# Compiling a single DAT into a single RDB with `c_converter`
```
git clone git@github.com:libretro/libretro-super.git
cd libretro-super
@ -20,7 +20,19 @@ cd libretro-db
c_converter "NAME_OF_RDB_FILE.rdb" "NAME_OF_SOURCE_DAT.dat"
```
# Compiling all databases with libretro-build-database.sh
# Compiling multiple DATs into a single RDB with `c_converter`
Specify `rom.crc` as the second parameter to use CRC as the unique fingerprint.
```
git clone git@github.com:libretro/libretro-super.git
cd libretro-super
./libretro-fetch.sh retroarch
cd retroarch
./configure
cd libretro-db
c_converter "NAME_OF_RDB_FILE.rdb" "rom.crc" "NAME_OF_SOURCE_DAT_1.dat" "NAME_OF_SOURCE_DAT_2.dat" "NAME_OF_SOURCE_DAT_3.dat"
```
# Compiling all RDBs with libretro-build-database.sh
**This approach builds and uses the `c_converter` program to compile the databases**
```

View File

@ -87,6 +87,7 @@ enum
ACTION_OK_SUBSYSTEM_ADD,
ACTION_OK_LOAD_CONFIG_FILE,
ACTION_OK_LOAD_CORE,
ACTION_OK_SIDELOAD_CORE,
ACTION_OK_LOAD_WALLPAPER,
ACTION_OK_SET_PATH,
ACTION_OK_SET_PATH_AUDIO_FILTER,
@ -538,7 +539,10 @@ int generic_action_ok_displaylist_push(const char *path,
{
char game_dir[PATH_MAX_LENGTH];
filebrowser_clear_type();
strlcpy(game_dir, path_get(RARCH_PATH_CONTENT), sizeof(game_dir));
if (content_get_subsystem_rom_id() > 0)
strlcpy(game_dir, content_get_subsystem_rom(content_get_subsystem_rom_id() - 1), sizeof(game_dir));
else
strlcpy(game_dir, path_get(RARCH_PATH_CONTENT), sizeof(game_dir));
path_basedir(game_dir);
if (content_get_subsystem() != type - MENU_SETTINGS_SUBSYSTEM_ADD)
@ -585,6 +589,14 @@ int generic_action_ok_displaylist_push(const char *path,
info_label = label;
dl_type = DISPLAYLIST_FILE_BROWSER_SELECT_CORE;
break;
case ACTION_OK_DL_SIDELOAD_CORE_LIST:
filebrowser_clear_type();
info.type = type;
info.directory_ptr = idx;
info_path = settings->paths.directory_core_assets;
info_label = label;
dl_type = DISPLAYLIST_FILE_BROWSER_SELECT_SIDELOAD_CORE;
break;
case ACTION_OK_DL_CONTENT_COLLECTION_LIST:
info.type = type;
info.directory_ptr = idx;
@ -1231,6 +1243,61 @@ static int generic_action_ok_command(enum event_command cmd)
return 0;
}
/* TO-DO: Localization for errors */
static bool file_copy(const char *src_path, const char *dst_path, char *msg, size_t size)
{
RFILE *src, *dst;
int numr, numw;
bool ret = true;
src = filestream_open(src_path,
RETRO_VFS_FILE_ACCESS_READ,
RETRO_VFS_FILE_ACCESS_HINT_NONE);
if (!src)
{
strlcpy(msg, "unable to open source file", size);
ret = false;
}
dst = filestream_open(dst_path,
RETRO_VFS_FILE_ACCESS_WRITE,
RETRO_VFS_FILE_ACCESS_HINT_NONE);
if (!dst)
{
strlcpy(msg, "unable to open destination file", size);
ret = false;
}
while (!filestream_eof(src))
{
char buffer[100] = {0};
numr = filestream_read(src, buffer, sizeof(buffer));
if (filestream_error(dst) != 0)
{
strlcpy(msg, "error reading file\n", size);
ret = false;
break;
}
numw = filestream_write(dst, buffer, numr);
if (numw != numr)
{
strlcpy(msg, "error writing to file\n", size);
ret = false;
break;
}
}
filestream_close(src);
filestream_close(dst);
return ret;
}
static int generic_action_ok(const char *path,
const char *label, unsigned type, size_t idx, size_t entry_idx,
unsigned id, enum msg_hash_enums flush_id)
@ -1297,6 +1364,30 @@ static int generic_action_ok(const char *path,
}
}
break;
case ACTION_OK_SIDELOAD_CORE:
{
settings_t *settings = config_get_ptr();
char destination_path[PATH_MAX_LENGTH];
char message[PATH_MAX_LENGTH];
fill_pathname_join(destination_path, settings->paths.directory_libretro, path_basename(action_path), sizeof(destination_path));
if(!file_copy(action_path, destination_path, message, sizeof(message)))
{
runloop_msg_queue_push(msg_hash_to_str(
MENU_ENUM_LABEL_VALUE_SIDELOAD_CORE_ERROR), 1, 100, true);
RARCH_LOG("[sideload] %s: %s\n", msg_hash_to_str(
MENU_ENUM_LABEL_VALUE_SIDELOAD_CORE_ERROR), message);
RARCH_LOG(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SIDELOAD_CORE_ERROR));
}
else
{
runloop_msg_queue_push(msg_hash_to_str(
MENU_ENUM_LABEL_VALUE_SIDELOAD_CORE_SUCCESS), 1, 100, true);
RARCH_LOG("[sideload] %s\n", msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SIDELOAD_CORE_SUCCESS));
}
}
break;
case ACTION_OK_LOAD_CONFIG_FILE:
{
settings_t *settings = config_get_ptr();
@ -1467,6 +1558,7 @@ default_action_ok_set(action_ok_set_path_videofilter, ACTION_OK_SET_PATH_AUDIO_F
default_action_ok_set(action_ok_set_path_overlay, ACTION_OK_SET_PATH_OVERLAY, MSG_UNKNOWN)
default_action_ok_set(action_ok_set_path, ACTION_OK_SET_PATH, MSG_UNKNOWN)
default_action_ok_set(action_ok_load_core, ACTION_OK_LOAD_CORE, MSG_UNKNOWN)
default_action_ok_set(action_ok_sideload_core, ACTION_OK_SIDELOAD_CORE, MSG_UNKNOWN)
default_action_ok_set(action_ok_config_load, ACTION_OK_LOAD_CONFIG_FILE, MSG_UNKNOWN)
default_action_ok_set(action_ok_disk_image_append, ACTION_OK_APPEND_DISK_IMAGE, MSG_UNKNOWN)
default_action_ok_set(action_ok_subsystem_add, ACTION_OK_SUBSYSTEM_ADD, MSG_UNKNOWN)
@ -3829,6 +3921,7 @@ default_action_ok_func(action_ok_rdb_entry, ACTION_OK_DL_RDB_ENTRY)
default_action_ok_func(action_ok_mixer_stream_actions, ACTION_OK_DL_MIXER_STREAM_SETTINGS_LIST)
default_action_ok_func(action_ok_browse_url_list, ACTION_OK_DL_BROWSE_URL_LIST)
default_action_ok_func(action_ok_core_list, ACTION_OK_DL_CORE_LIST)
default_action_ok_func(action_ok_sideload_core_list, ACTION_OK_DL_SIDELOAD_CORE_LIST)
default_action_ok_func(action_ok_cheat_file, ACTION_OK_DL_CHEAT_FILE)
default_action_ok_func(action_ok_cheat_file_append, ACTION_OK_DL_CHEAT_FILE_APPEND)
default_action_ok_func(action_ok_playlist_collection, ACTION_OK_DL_PLAYLIST_COLLECTION)
@ -4987,6 +5080,9 @@ static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs,
case MENU_ENUM_LABEL_FILE_BROWSER_CORE:
BIND_ACTION_OK(cbs, action_ok_load_core);
break;
case MENU_ENUM_LABEL_FILE_BROWSER_SIDELOAD_CORE:
BIND_ACTION_OK(cbs, action_ok_sideload_core);
break;
case MENU_ENUM_LABEL_FILE_BROWSER_CORE_SELECT_FROM_COLLECTION:
case MENU_ENUM_LABEL_FILE_BROWSER_CORE_SELECT_FROM_COLLECTION_CURRENT_CORE:
BIND_ACTION_OK(cbs, action_ok_core_deferred_set);
@ -5296,6 +5392,9 @@ static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs,
case MENU_ENUM_LABEL_CORE_LIST:
BIND_ACTION_OK(cbs, action_ok_core_list);
break;
case MENU_ENUM_LABEL_SIDELOAD_CORE_LIST:
BIND_ACTION_OK(cbs, action_ok_sideload_core_list);
break;
case MENU_ENUM_LABEL_DISK_IMAGE_APPEND:
BIND_ACTION_OK(cbs, action_ok_disk_image_append_list);
break;
@ -5772,6 +5871,9 @@ static int menu_cbs_init_bind_ok_compare_type(menu_file_list_cbs_t *cbs,
case MENU_LABEL_CORE_LIST:
BIND_ACTION_OK(cbs, action_ok_load_core);
break;
case MENU_LABEL_SIDELOAD_CORE_LIST:
BIND_ACTION_OK(cbs, action_ok_sideload_core);
break;
}
}
break;

View File

@ -188,6 +188,8 @@ default_sublabel_macro(action_bind_sublabel_cheevos_username, MENU_
default_sublabel_macro(action_bind_sublabel_cheevos_password, MENU_ENUM_SUBLABEL_CHEEVOS_PASSWORD)
default_sublabel_macro(action_bind_sublabel_video_post_filter_record, MENU_ENUM_SUBLABEL_VIDEO_POST_FILTER_RECORD)
default_sublabel_macro(action_bind_sublabel_core_list, MENU_ENUM_SUBLABEL_CORE_LIST)
default_sublabel_macro(action_bind_sublabel_download_core, MENU_ENUM_SUBLABEL_DOWNLOAD_CORE)
default_sublabel_macro(action_bind_sublabel_sideload_core_list, MENU_ENUM_SUBLABEL_SIDELOAD_CORE_LIST)
default_sublabel_macro(action_bind_sublabel_content_list, MENU_ENUM_SUBLABEL_LOAD_CONTENT_LIST)
default_sublabel_macro(action_bind_sublabel_content_special, MENU_ENUM_SUBLABEL_LOAD_CONTENT_SPECIAL)
default_sublabel_macro(action_bind_sublabel_network_information, MENU_ENUM_SUBLABEL_NETWORK_INFORMATION)
@ -388,6 +390,8 @@ default_sublabel_macro(action_bind_sublabel_quick_menu_show_take_screenshot,
default_sublabel_macro(action_bind_sublabel_quick_menu_show_save_load_state, MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_LOAD_STATE)
default_sublabel_macro(action_bind_sublabel_quick_menu_show_undo_save_load_state, MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE)
default_sublabel_macro(action_bind_sublabel_quick_menu_show_add_to_favorites, MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES)
default_sublabel_macro(action_bind_sublabel_quick_menu_show_start_recording, MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_START_RECORDING)
default_sublabel_macro(action_bind_sublabel_quick_menu_show_start_streaming, MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_START_STREAMING)
default_sublabel_macro(action_bind_sublabel_quick_menu_show_reset_core_association, MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION)
default_sublabel_macro(action_bind_sublabel_quick_menu_show_options, MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_OPTIONS)
default_sublabel_macro(action_bind_sublabel_quick_menu_show_controls, MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CONTROLS)
@ -998,6 +1002,12 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
case MENU_ENUM_LABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_quick_menu_show_add_to_favorites);
break;
case MENU_ENUM_LABEL_QUICK_MENU_SHOW_START_RECORDING:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_quick_menu_show_start_recording);
break;
case MENU_ENUM_LABEL_QUICK_MENU_SHOW_START_STREAMING:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_quick_menu_show_start_streaming);
break;
case MENU_ENUM_LABEL_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_quick_menu_show_reset_core_association);
break;
@ -1665,6 +1675,12 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
case MENU_ENUM_LABEL_CORE_LIST:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_core_list);
break;
case MENU_ENUM_LABEL_SIDELOAD_CORE_LIST:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_sideload_core_list);
break;
case MENU_ENUM_LABEL_CORE_UPDATER_LIST:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_download_core);
break;
case MENU_ENUM_LABEL_VIDEO_POST_FILTER_RECORD:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_video_post_filter_record);
break;

View File

@ -99,6 +99,7 @@ default_title_macro(action_get_download_core_content_list, MENU_ENUM_LABEL_
default_title_macro(action_get_user_accounts_list, MENU_ENUM_LABEL_VALUE_ACCOUNTS_LIST)
default_title_macro(action_get_core_information_list, MENU_ENUM_LABEL_VALUE_CORE_INFORMATION)
default_title_macro(action_get_core_list, MENU_ENUM_LABEL_VALUE_CORE_LIST)
default_title_macro(action_get_sideload_core_list, MENU_ENUM_LABEL_VALUE_SIDELOAD_CORE_LIST)
default_title_macro(action_get_online_updater_list, MENU_ENUM_LABEL_VALUE_ONLINE_UPDATER)
default_title_macro(action_get_netplay_list, MENU_ENUM_LABEL_VALUE_NETPLAY)
default_title_macro(action_get_online_thumbnails_updater_list, MENU_ENUM_LABEL_VALUE_THUMBNAILS_UPDATER_LIST)
@ -718,6 +719,9 @@ static int menu_cbs_init_bind_title_compare_label(menu_file_list_cbs_t *cbs,
case MENU_ENUM_LABEL_CORE_LIST:
BIND_ACTION_GET_TITLE(cbs, action_get_core_list);
break;
case MENU_ENUM_LABEL_SIDELOAD_CORE_LIST:
BIND_ACTION_GET_TITLE(cbs, action_get_sideload_core_list);
break;
case MENU_ENUM_LABEL_LOAD_CONTENT_SPECIAL:
BIND_ACTION_GET_TITLE(cbs, action_get_load_content_special);
break;
@ -1047,6 +1051,9 @@ static int menu_cbs_init_bind_title_compare_label(menu_file_list_cbs_t *cbs,
case MENU_LABEL_CORE_LIST:
BIND_ACTION_GET_TITLE(cbs, action_get_core_list);
break;
case MENU_LABEL_SIDELOAD_CORE_LIST:
BIND_ACTION_GET_TITLE(cbs, action_get_core_list);
break;
case MENU_ENUM_LABEL_LOAD_CONTENT_SPECIAL:
BIND_ACTION_GET_TITLE(cbs, action_get_load_content_special);
break;

View File

@ -295,17 +295,17 @@ static void ozone_free(void *data)
static void ozone_context_reset(void *data, bool is_threaded)
{
/* Fonts init */
unsigned i;
unsigned size;
char font_path[PATH_MAX_LENGTH];
ozone_handle_t *ozone = (ozone_handle_t*) data;
if (ozone)
{
ozone->has_all_assets = true;
/* Fonts init */
unsigned i;
unsigned size;
char font_path[PATH_MAX_LENGTH];
fill_pathname_join(font_path, ozone->assets_path, "regular.ttf", sizeof(font_path));
ozone->fonts.footer = menu_display_font_file(font_path, FONT_SIZE_FOOTER, is_threaded);
ozone->fonts.entries_label = menu_display_font_file(font_path, FONT_SIZE_ENTRIES_LABEL, is_threaded);
@ -423,6 +423,7 @@ static void ozone_context_destroy(void *data)
{
unsigned i;
ozone_handle_t *ozone = (ozone_handle_t*) data;
menu_animation_ctx_tag tag;
if (!ozone)
return;
@ -458,7 +459,7 @@ static void ozone_context_destroy(void *data)
ozone->fonts.entries_sublabel = NULL;
ozone->fonts.sidebar = NULL;
menu_animation_ctx_tag tag = (uintptr_t) &ozone_default_theme;
tag = (uintptr_t) &ozone_default_theme;
menu_animation_kill_by_tag(&tag);
/* Horizontal list */
@ -798,6 +799,7 @@ static void ozone_compute_entries_position(ozone_handle_t *ozone)
/* Compute entries height and adjust scrolling if needed */
unsigned video_info_height;
unsigned video_info_width;
unsigned lines;
size_t i, entries_end;
file_list_t *selection_buf = NULL;
@ -847,7 +849,7 @@ static void ozone_compute_entries_position(ozone_handle_t *ozone)
word_wrap(sublabel_str, sublabel_str, (video_info_width - 548) / ozone->sublabel_font_glyph_width, false);
unsigned lines = ozone_count_lines(sublabel_str);
lines = ozone_count_lines(sublabel_str);
if (lines > 1)
{
@ -1358,6 +1360,8 @@ static void ozone_populate_entries(void *data, const char *path, const char *lab
{
ozone_handle_t *ozone = (ozone_handle_t*) data;
int new_depth;
if (!ozone)
return;
@ -1374,7 +1378,7 @@ static void ozone_populate_entries(void *data, const char *path, const char *lab
ozone->need_compute = true;
int new_depth = (int)ozone_list_get_size(ozone, MENU_LIST_PLAIN);
new_depth = (int)ozone_list_get_size(ozone, MENU_LIST_PLAIN);
ozone->fade_direction = new_depth <= ozone->depth;
ozone->depth = new_depth;

View File

@ -427,4 +427,4 @@ void ozone_draw_messagebox(ozone_handle_t *ozone,
end:
string_list_free(list);
}
}

View File

@ -59,4 +59,4 @@ void ozone_draw_osk(ozone_handle_t *ozone,
void ozone_draw_messagebox(ozone_handle_t *ozone,
video_frame_info_t *video_info,
const char *message);
const char *message);

View File

@ -317,4 +317,4 @@ icons_iterate:
/* Text layer */
font_driver_flush(video_info->width, video_info->height, ozone->fonts.entries_label, video_info);
font_driver_flush(video_info->width, video_info->height, ozone->fonts.entries_sublabel, video_info);
}
}

View File

@ -295,11 +295,20 @@ void ozone_sidebar_goto(ozone_handle_t *ozone, unsigned new_selection)
{
unsigned video_info_height;
video_driver_get_size(NULL, &video_info_height);
struct menu_animation_ctx_entry entry;
menu_animation_ctx_tag tag = (uintptr_t)ozone;
menu_animation_ctx_tag tag;
float new_scroll;
float selected_position_y;
float current_selection_middle_onscreen;
float bottom_boundary;
float entries_middle;
float entries_height;
video_driver_get_size(NULL, &video_info_height);
tag = (uintptr_t)ozone;
if (ozone->categories_selection_ptr != new_selection)
{
@ -325,12 +334,12 @@ void ozone_sidebar_goto(ozone_handle_t *ozone, unsigned new_selection)
menu_animation_push(&entry);
/* Scroll animation */
float new_scroll = 0;
float selected_position_y = ozone_get_selected_sidebar_y_position(ozone);
float current_selection_middle_onscreen = ENTRIES_START_Y - 10 + ozone->animations.scroll_y_sidebar + selected_position_y + 65 / 2;
float bottom_boundary = video_info_height - 87 - 78;
float entries_middle = video_info_height/2;
float entries_height = ozone_get_sidebar_height(ozone);
new_scroll = 0;
selected_position_y = ozone_get_selected_sidebar_y_position(ozone);
current_selection_middle_onscreen = ENTRIES_START_Y - 10 + ozone->animations.scroll_y_sidebar + selected_position_y + 65 / 2;
bottom_boundary = video_info_height - 87 - 78;
entries_middle = video_info_height/2;
entries_height = ozone_get_sidebar_height(ozone);
if (current_selection_middle_onscreen != entries_middle)
new_scroll = ozone->animations.scroll_y_sidebar - (current_selection_middle_onscreen - entries_middle);
@ -456,6 +465,8 @@ void ozone_context_reset_horizontal_list(ozone_handle_t *ozone)
unsigned i;
const char *title;
char title_noext[255];
char *chr;
bool hyphen_found;
size_t list_size = ozone_list_get_size(ozone, MENU_LIST_HORIZONTAL);
@ -567,8 +578,8 @@ void ozone_context_reset_horizontal_list(ozone_handle_t *ozone)
/* Format : "Vendor - Console"
Remove everything before the hyphen
and the subsequent space */
char *chr = title_noext;
bool hyphen_found = false;
chr = title_noext;
hyphen_found = false;
while (true)
{
@ -651,4 +662,4 @@ bool ozone_is_playlist(ozone_handle_t *ozone)
}
return is_playlist && ozone->depth == 1;
}
}

View File

@ -52,4 +52,4 @@ extern enum msg_hash_enums ozone_system_tabs_idx[OZONE_SYSTEM_TAB_LAST];
extern unsigned ozone_system_tabs_icons[OZONE_SYSTEM_TAB_LAST];
#endif
#endif

View File

@ -103,6 +103,7 @@ menu_texture_item ozone_entries_icon_get_texture(ozone_handle_t *ozone,
case MENU_ENUM_LABEL_CHEAT_START_OR_CONT:
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_RUN];
case MENU_ENUM_LABEL_CORE_LIST:
case MENU_ENUM_LABEL_SIDELOAD_CORE_LIST:
case MENU_ENUM_LABEL_CORE_SETTINGS:
case MENU_ENUM_LABEL_CORE_UPDATER_LIST:
case MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_SAVE_CORE:

View File

@ -168,4 +168,4 @@ extern ozone_theme_t *ozone_default_theme;
void ozone_set_color_theme(ozone_handle_t *ozone, unsigned color_theme);
unsigned ozone_get_system_theme();
#endif
#endif

View File

@ -69,18 +69,50 @@ typedef struct
static uint16_t *rgui_framebuf_data = NULL;
#if defined(GEKKO)|| defined(PSP)
#define HOVER_COLOR(settings) ((3 << 0) | (10 << 4) | (3 << 8) | (7 << 12))
#define NORMAL_COLOR(settings) 0x7FFF
#define TITLE_COLOR(settings) HOVER_COLOR(settings)
/* Note: if we knew what colour format each of these
* special cases required, we could do away with all
* this nonsense and handle it inside a single colour
* conversion function...
* In the meantime, we'll use the existing obfuscated
* values for all the non-standard platforms, and leave
* it messy... */
#if defined(GEKKO) || defined(PSP)
/* Is this supposed to be 4444 ABGR?
* Have no idea what's going on here, so have to use
* fixed colour values... */
#define HOVER_COLOR(settings) ((3 << 0) | (10 << 4) | (3 << 8) | (7 << 12))
#define NORMAL_COLOR(settings) 0x7FFF
#define TITLE_COLOR(settings) HOVER_COLOR(settings)
#define BG_DARK_COLOR(settings) ((6 << 12) | (1 << 8) | (1 << 4) | (1 << 0))
#define BG_LIGHT_COLOR(settings) ((6 << 12) | (2 << 8) | (2 << 4) | (2 << 0))
#define BORDER_DARK_COLOR(settings) ((6 << 12) | (1 << 8) | (1 << 5) | (1 << 0))
#define BORDER_LIGHT_COLOR(settings) ((6 << 12) | (2 << 8) | (2 << 5) | (2 << 0))
#elif defined(PS2)
#define HOVER_COLOR(settings) 0x03E0
#define NORMAL_COLOR(settings) 0x7FFF
#define TITLE_COLOR(settings) HOVER_COLOR(settings)
#else
/* Have no idea what's going on here, so have to use
* fixed colour values... */
#define HOVER_COLOR(settings) 0x03E0
#define NORMAL_COLOR(settings) 0x7FFF
#define TITLE_COLOR(settings) HOVER_COLOR(settings)
#define BG_DARK_COLOR(settings) ((0 << 15) | (1 << 12) | (1 << 7) | (1 << 2))
#define BG_LIGHT_COLOR(settings) ((0 << 15) | (2 << 12) | (2 << 7) | (2 << 2))
#define BORDER_DARK_COLOR(settings) ((0 << 15) | (1 << 12) | (1 << 8) | (1 << 2))
#define BORDER_LIGHT_COLOR(settings) ((0 << 15) | (2 << 12) | (2 << 8) | (2 << 2))
#elif defined(HAVE_LIBNX) && !defined(HAVE_OPENGL)
#define HOVER_COLOR(settings) (argb32_to_rgba4444(settings->uints.menu_entry_hover_color))
#define NORMAL_COLOR(settings) (argb32_to_rgba4444(settings->uints.menu_entry_normal_color))
#define TITLE_COLOR(settings) (argb32_to_rgba4444(settings->uints.menu_title_color))
/* Is this supposed to be RGB565?
* Have no idea what's going on here, so have to use
* fixed colour values... */
#define BG_DARK_COLOR(settings) ((((31 * (54)) / 255) << 11) | (((63 * (54)) / 255) << 5) | ((31 * (54)) / 255))
#define BG_LIGHT_COLOR(settings) BG_DARK_COLOR(settings)
#define BORDER_DARK_COLOR(settings) ((((31 * (54)) / 255) << 11) | (((63 * (109)) / 255) << 5) | ((31 * (54)) / 255))
#define BORDER_LIGHT_COLOR(settings) BORDER_DARK_COLOR(settings)
static uint16_t argb32_to_rgba4444(uint32_t col)
{
@ -90,41 +122,41 @@ static uint16_t argb32_to_rgba4444(uint32_t col)
unsigned b = ((col & 0xff) ) >> 4;
return (r << 12) | (g << 8) | (b << 4) | a;
}
#endif
static uint16_t rgui_gray_filler(rgui_t *rgui, unsigned x, unsigned y)
{
unsigned shft = (rgui->bg_thickness ? 1 : 0);
unsigned col = (((x >> shft) + (y >> shft)) & 1) + 1;
#if defined(GEKKO) || defined(PSP)
return (6 << 12) | (col << 8) | (col << 4) | (col << 0);
#elif defined(PS2)
return (0 << 15) | (col << 12) | (col << 7) | (col << 2);
#elif defined(HAVE_LIBNX) && !defined(HAVE_OPENGL)
return (((31 * (54)) / 255) << 11) |
(((63 * (54)) / 255) << 5) |
((31 * (54)) / 255);
#else
return (col << 13) | (col << 9) | (col << 5) | (12 << 0);
#endif
/* This is the only sane case... */
#define HOVER_COLOR(settings) (argb32_to_rgba4444(settings->uints.menu_entry_hover_color))
#define NORMAL_COLOR(settings) (argb32_to_rgba4444(settings->uints.menu_entry_normal_color))
#define TITLE_COLOR(settings) (argb32_to_rgba4444(settings->uints.menu_title_color))
#define BG_DARK_COLOR(settings) (argb32_to_rgba4444(settings->uints.menu_bg_dark_color))
#define BG_LIGHT_COLOR(settings) (argb32_to_rgba4444(settings->uints.menu_bg_light_color))
#define BORDER_DARK_COLOR(settings) (argb32_to_rgba4444(settings->uints.menu_border_dark_color))
#define BORDER_LIGHT_COLOR(settings) (argb32_to_rgba4444(settings->uints.menu_border_light_color))
static uint16_t argb32_to_rgba4444(uint32_t col)
{
unsigned a = ((col >> 24) & 0xff) >> 4;
unsigned r = ((col >> 16) & 0xff) >> 4;
unsigned g = ((col >> 8) & 0xff) >> 4;
unsigned b = ((col & 0xff) ) >> 4;
return (r << 12) | (g << 8) | (b << 4) | a;
}
static uint16_t rgui_green_filler(rgui_t *rgui, unsigned x, unsigned y)
{
unsigned shft = (rgui->border_thickness ? 1 : 0);
unsigned col = (((x >> shft) + (y >> shft)) & 1) + 1;
#if defined(GEKKO) || defined(PSP)
return (6 << 12) | (col << 8) | (col << 5) | (col << 0);
#elif defined(PS2)
return (0 << 15) | (col << 12) | (col << 8) | (col << 2);
#elif defined(HAVE_LIBNX) && !defined(HAVE_OPENGL)
return (((31 * (54)) / 255) << 11) |
(((63 * (109)) / 255) << 5) |
((31 * (54)) / 255);
#else
return (col << 13) | (col << 10) | (col << 5) | (12 << 0);
#endif
static uint16_t rgui_bg_filler(rgui_t *rgui, unsigned x, unsigned y, uint16_t dark_color, uint16_t light_color)
{
unsigned shift = (rgui->bg_thickness ? 1 : 0);
unsigned select = ((x >> shift) + (y >> shift)) & 1;
return (select == 0) ? dark_color : light_color;
}
static uint16_t rgui_border_filler(rgui_t *rgui, unsigned x, unsigned y, uint16_t dark_color, uint16_t light_color)
{
unsigned shift = (rgui->border_thickness ? 1 : 0);
unsigned select = ((x >> shift) + (y >> shift)) & 1;
return (select == 0) ? dark_color : light_color;
}
static void rgui_fill_rect(
@ -133,13 +165,14 @@ static void rgui_fill_rect(
size_t pitch,
unsigned x, unsigned y,
unsigned width, unsigned height,
uint16_t (*col)(rgui_t *rgui, unsigned x, unsigned y))
uint16_t dark_color, uint16_t light_color,
uint16_t (*col)(rgui_t *rgui, unsigned x, unsigned y, uint16_t dark_color, uint16_t light_color))
{
unsigned i, j;
for (j = y; j < y + height; j++)
for (i = x; i < x + width; i++)
data[j * (pitch >> 1) + i] = col(rgui, i, j);
data[j * (pitch >> 1) + i] = col(rgui, i, j, dark_color, light_color);
}
static void rgui_color_rect(
@ -267,7 +300,8 @@ static void rgui_render_background(rgui_t *rgui)
unsigned fb_width, fb_height;
uint16_t *src = NULL;
uint16_t *dst = NULL;
uint16_t dark_color, light_color;
menu_display_get_fb_size(&fb_width, &fb_height,
&fb_pitch);
@ -288,12 +322,18 @@ static void rgui_render_background(rgui_t *rgui)
if (settings->bools.menu_rgui_border_filler_enable)
{
rgui_fill_rect(rgui, rgui_framebuf_data, fb_pitch, 5, 5, fb_width - 10, 5, rgui_green_filler);
rgui_fill_rect(rgui, rgui_framebuf_data, fb_pitch, 5, fb_height - 10, fb_width - 10, 5, rgui_green_filler);
dark_color = BORDER_DARK_COLOR(settings);
light_color = BORDER_LIGHT_COLOR(settings);
rgui_fill_rect(rgui, rgui_framebuf_data, fb_pitch, 5, 5, fb_width - 10, 5,
dark_color, light_color, rgui_border_filler);
rgui_fill_rect(rgui, rgui_framebuf_data, fb_pitch, 5, fb_height - 10, fb_width - 10, 5,
dark_color, light_color, rgui_border_filler);
rgui_fill_rect(rgui, rgui_framebuf_data, fb_pitch, 5, 5, 5, fb_height - 10, rgui_green_filler);
rgui_fill_rect(rgui, rgui_framebuf_data, fb_pitch, 5, 5, 5, fb_height - 10,
dark_color, light_color, rgui_border_filler);
rgui_fill_rect(rgui, rgui_framebuf_data, fb_pitch, fb_width - 10, 5, 5, fb_height - 10,
rgui_green_filler);
dark_color, light_color, rgui_border_filler);
}
}
}
@ -314,7 +354,8 @@ static void rgui_set_message(void *data, const char *message)
static void rgui_render_messagebox(rgui_t *rgui, const char *message)
{
int x, y;
uint16_t color;
uint16_t normal_color;
uint16_t dark_color, light_color;
size_t i, fb_pitch;
unsigned fb_width, fb_height;
unsigned width, glyphs_width, height;
@ -364,27 +405,30 @@ static void rgui_render_messagebox(rgui_t *rgui, const char *message)
if (rgui_framebuf_data)
{
rgui_fill_rect(rgui, rgui_framebuf_data,
fb_pitch, x + 5, y + 5, width - 10,
height - 10, rgui_gray_filler);
dark_color = BG_DARK_COLOR(settings);
light_color = BG_LIGHT_COLOR(settings);
rgui_fill_rect(rgui, rgui_framebuf_data, fb_pitch, x + 5, y + 5, width - 10, height - 10,
dark_color, light_color, rgui_bg_filler);
if (settings->bools.menu_rgui_border_filler_enable)
{
rgui_fill_rect(rgui, rgui_framebuf_data,
fb_pitch, x, y, width - 5, 5, rgui_green_filler);
rgui_fill_rect(rgui, rgui_framebuf_data,
fb_pitch, x + width - 5, y, 5,
height - 5, rgui_green_filler);
rgui_fill_rect(rgui, rgui_framebuf_data,
fb_pitch, x + 5, y + height - 5,
width - 5, 5, rgui_green_filler);
rgui_fill_rect(rgui, rgui_framebuf_data,
fb_pitch, x, y + 5, 5,
height - 5, rgui_green_filler);
dark_color = BORDER_DARK_COLOR(settings);
light_color = BORDER_LIGHT_COLOR(settings);
rgui_fill_rect(rgui, rgui_framebuf_data, fb_pitch, x, y, width - 5, 5,
dark_color, light_color, rgui_border_filler);
rgui_fill_rect(rgui, rgui_framebuf_data, fb_pitch, x + width - 5, y, 5, height - 5,
dark_color, light_color, rgui_border_filler);
rgui_fill_rect(rgui, rgui_framebuf_data, fb_pitch, x + 5, y + height - 5, width - 5, 5,
dark_color, light_color, rgui_border_filler);
rgui_fill_rect(rgui, rgui_framebuf_data, fb_pitch, x, y + 5, 5, height - 5,
dark_color, light_color, rgui_border_filler);
}
}
color = NORMAL_COLOR(settings);
normal_color = NORMAL_COLOR(settings);
for (i = 0; i < list->size; i++)
{
@ -393,7 +437,7 @@ static void rgui_render_messagebox(rgui_t *rgui, const char *message)
int offset_y = (int)(FONT_HEIGHT_STRIDE * i);
if (rgui_framebuf_data)
blit_line(x + 8 + offset_x, y + 8 + offset_y, msg, color);
blit_line(x + 8 + offset_x, y + 8 + offset_y, msg, normal_color);
}
end:
@ -438,6 +482,7 @@ static void rgui_render(void *data, bool is_idle)
menu_animation_ctx_ticker_t ticker;
unsigned x, y;
uint16_t hover_color, normal_color;
uint16_t dark_color, light_color;
size_t i, end, fb_pitch, old_start;
unsigned fb_width, fb_height;
int bottom;
@ -472,8 +517,13 @@ static void rgui_render(void *data, bool is_idle)
if (rgui->bg_modified || rgui->last_width != fb_width || rgui->last_height != fb_height)
{
if (rgui_framebuf_data)
rgui_fill_rect(rgui, rgui_framebuf_data,
fb_pitch, 0, fb_height, fb_width, 4, rgui_gray_filler);
{
dark_color = BG_DARK_COLOR(settings);
light_color = BG_LIGHT_COLOR(settings);
rgui_fill_rect(rgui, rgui_framebuf_data, fb_pitch, 0, fb_height, fb_width, 4,
dark_color, light_color, rgui_bg_filler);
}
rgui->last_width = fb_width;
rgui->last_height = fb_height;
}
@ -667,7 +717,7 @@ static void rgui_render(void *data, bool is_idle)
entry_title_buf_utf8len = utf8len(entry_title_buf);
entry_title_buf_len = strlen(entry_title_buf);
snprintf(message, sizeof(message), "%c %-*.*s %-*s",
snprintf(message, sizeof(message), "%c %-*.*s %-.*s",
entry_selected ? '>' : ' ',
(int)(RGUI_TERM_WIDTH(fb_width) - (entry_spacing + 1 + 2) - entry_title_buf_utf8len + entry_title_buf_len),
(int)(RGUI_TERM_WIDTH(fb_width) - (entry_spacing + 1 + 2) - entry_title_buf_utf8len + entry_title_buf_len),

View File

@ -2347,6 +2347,7 @@ static uintptr_t xmb_icon_get_id(xmb_handle_t *xmb,
case MENU_ENUM_LABEL_CHEAT_START_OR_CONT:
return xmb->textures.list[XMB_TEXTURE_RUN];
case MENU_ENUM_LABEL_CORE_LIST:
case MENU_ENUM_LABEL_SIDELOAD_CORE_LIST:
case MENU_ENUM_LABEL_CORE_SETTINGS:
case MENU_ENUM_LABEL_CORE_UPDATER_LIST:
case MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_SAVE_CORE:

View File

@ -23,6 +23,10 @@
#include <retro_miscellaneous.h>
#include <features/features_cpu.h>
#define DG_DYNARR_IMPLEMENTATION
#include <array/dynarray.h>
#undef DG_DYNARR_IMPLEMENTATION
#include "menu_animation.h"
#include "../configuration.h"
#include "../performance_counters.h"
@ -31,7 +35,6 @@
struct tween
{
bool alive;
float duration;
float running_since;
float initial_value;
@ -41,16 +44,17 @@ struct tween
easing_cb easing;
tween_cb cb;
void *userdata;
bool deleted;
};
DA_TYPEDEF(struct tween, tween_array_t)
struct menu_animation
{
struct tween *list;
bool need_defrag;
size_t capacity;
size_t size;
size_t first_dead;
tween_array_t list;
tween_array_t pending;
bool pending_deletes;
bool in_update;
};
typedef struct menu_animation menu_animation_t;
@ -314,12 +318,22 @@ static void menu_animation_ticker_generic(uint64_t idx,
*width = max_width;
}
void menu_animation_init(void)
{
da_init(anim.list);
da_init(anim.pending);
}
void menu_animation_free(void)
{
da_free(anim.list);
da_free(anim.pending);
}
bool menu_animation_push(menu_animation_ctx_entry_t *entry)
{
struct tween t;
struct tween *target = NULL;
t.alive = true;
t.duration = entry->duration;
t.running_since = 0;
t.initial_value = *entry->subject;
@ -329,6 +343,7 @@ bool menu_animation_push(menu_animation_ctx_entry_t *entry)
t.cb = entry->cb;
t.userdata = entry->userdata;
t.easing = NULL;
t.deleted = false;
switch (entry->easing_enum)
{
@ -446,66 +461,25 @@ bool menu_animation_push(menu_animation_ctx_entry_t *entry)
/* ignore born dead tweens */
if (!t.easing || t.duration == 0 || t.initial_value == t.target_value)
return false;
if (anim.first_dead < anim.size && !anim.list[anim.first_dead].alive)
target = &anim.list[anim.first_dead++];
if (anim.in_update)
da_push(anim.pending, t);
else
{
if (anim.size >= anim.capacity)
{
anim.capacity++;
anim.list = (struct tween*)realloc(anim.list,
anim.capacity * sizeof(struct tween));
}
target = &anim.list[anim.size++];
}
*target = t;
anim.need_defrag = true;
da_push(anim.list, t);
return true;
}
static int menu_animation_defrag_cmp(const void *a, const void *b)
{
const struct tween *ta = (const struct tween *)a;
const struct tween *tb = (const struct tween *)b;
return tb->alive - ta->alive;
}
/* defragments and shrinks the tween list when possible */
static void menu_animation_defrag()
{
size_t i;
qsort(anim.list, anim.size, sizeof(anim.list[0]), menu_animation_defrag_cmp);
for (i = anim.size-1; i > 0; i--)
{
if (anim.list[i].alive)
break;
anim.size--;
}
anim.first_dead = anim.size;
anim.need_defrag = false;
}
bool menu_animation_update(float delta_time)
{
unsigned i;
unsigned active_tweens = 0;
anim.in_update = true;
anim.pending_deletes = false;
for(i = 0; i < anim.size; i++)
for(i = 0; i < da_count(anim.list); i++)
{
struct tween *tween = &anim.list[i];
if (!tween || !tween->alive)
continue;
struct tween *tween = da_getptr(anim.list, i);
tween->running_since += delta_time;
*tween->subject = tween->easing(
@ -517,32 +491,39 @@ bool menu_animation_update(float delta_time)
if (tween->running_since >= tween->duration)
{
*tween->subject = tween->target_value;
tween->alive = false;
anim.need_defrag = true;
if (tween->cb)
tween->cb(tween->userdata);
da_delete(anim.list, i);
i--;
}
if (tween->running_since < tween->duration)
active_tweens += 1;
}
if (anim.need_defrag)
menu_animation_defrag();
if (!active_tweens)
if (anim.pending_deletes)
{
anim.size = 0;
anim.first_dead = 0;
anim.need_defrag = false;
return false;
for(i = 0; i < da_count(anim.list); i++)
{
struct tween *tween = da_getptr(anim.list, i);
if (tween->deleted)
{
da_delete(anim.list, i);
i--;
}
}
anim.pending_deletes = false;
}
if (da_count(anim.pending) > 0)
{
da_addn(anim.list, anim.pending.p, da_count(anim.pending));
da_clear(anim.pending);
}
anim.in_update = false;
animation_is_active = da_count(anim.list) > 0;
animation_is_active = true;
return true;
return animation_is_active;
}
bool menu_animation_ticker(const menu_animation_ctx_ticker_t *ticker)
@ -626,18 +607,22 @@ bool menu_animation_kill_by_tag(menu_animation_ctx_tag *tag)
if (!tag || *tag == (uintptr_t)-1)
return false;
for (i = 0; i < anim.size; ++i)
for (i = 0; i < da_count(anim.list); ++i)
{
if (anim.list[i].tag != *tag)
struct tween *t = da_getptr(anim.list, i);
if (t->tag != *tag)
continue;
anim.list[i].alive = false;
anim.list[i].subject = NULL;
if (i < anim.first_dead)
anim.first_dead = i;
anim.need_defrag = true;
if (anim.in_update)
{
t->deleted = true;
anim.pending_deletes = true;
}
else
{
da_delete(anim.list, i);
--i;
}
}
return true;
@ -648,24 +633,27 @@ void menu_animation_kill_by_subject(menu_animation_ctx_subject_t *subject)
unsigned i, j, killed = 0;
float **sub = (float**)subject->data;
for (i = 0; i < anim.size && killed < subject->count; ++i)
for (i = 0; i < da_count(anim.list) && killed < subject->count; ++i)
{
if (!anim.list[i].alive)
continue;
struct tween *t = da_getptr(anim.list, i);
for (j = 0; j < subject->count; ++j)
{
if (anim.list[i].subject != sub[j])
if (t->subject != sub[j])
continue;
anim.list[i].alive = false;
anim.list[i].subject = NULL;
if (i < anim.first_dead)
anim.first_dead = i;
if (anim.in_update)
{
t->deleted = true;
anim.pending_deletes = true;
}
else
{
da_delete(anim.list, i);
--i;
}
killed++;
anim.need_defrag = true;
break;
}
}
@ -684,13 +672,14 @@ bool menu_animation_ctl(enum menu_animation_ctl_state state, void *data)
{
size_t i;
for (i = 0; i < anim.size; i++)
for (i = 0; i < da_count(anim.list); i++)
{
if (anim.list[i].subject)
anim.list[i].subject = NULL;
struct tween *t = da_getptr(anim.list, i);
if (t->subject)
t->subject = NULL;
}
free(anim.list);
da_free(anim.list);
memset(&anim, 0, sizeof(menu_animation_t));
}

View File

@ -131,6 +131,10 @@ void menu_timer_start(menu_timer_t *timer, menu_timer_ctx_entry_t *timer_entry);
void menu_timer_kill(menu_timer_t *timer);
void menu_animation_init(void);
void menu_animation_free(void);
bool menu_animation_update(float delta_time);
bool menu_animation_get_ideal_delta_time(menu_animation_ctx_delta_t *delta);

View File

@ -102,6 +102,7 @@ enum
ACTION_OK_DL_CHEAT_FILE,
ACTION_OK_DL_CHEAT_FILE_APPEND,
ACTION_OK_DL_CORE_LIST,
ACTION_OK_DL_SIDELOAD_CORE_LIST,
ACTION_OK_DL_LAKKA_LIST,
ACTION_OK_DL_CONFIGURATIONS_LIST,
ACTION_OK_DL_COMPRESSED_ARCHIVE_PUSH,

View File

@ -2672,15 +2672,21 @@ static int menu_displaylist_parse_load_content_settings(
{
if (!recording_is_enabled())
{
menu_entries_append_enum(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QUICK_MENU_START_RECORDING),
msg_hash_to_str(MENU_ENUM_LABEL_QUICK_MENU_START_RECORDING),
MENU_ENUM_LABEL_QUICK_MENU_START_RECORDING, MENU_SETTING_ACTION, 0, 0);
if (settings->bools.quick_menu_show_start_recording)
{
menu_entries_append_enum(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QUICK_MENU_START_RECORDING),
msg_hash_to_str(MENU_ENUM_LABEL_QUICK_MENU_START_RECORDING),
MENU_ENUM_LABEL_QUICK_MENU_START_RECORDING, MENU_SETTING_ACTION, 0, 0);
}
menu_entries_append_enum(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QUICK_MENU_START_STREAMING),
msg_hash_to_str(MENU_ENUM_LABEL_QUICK_MENU_START_STREAMING),
MENU_ENUM_LABEL_QUICK_MENU_START_STREAMING, MENU_SETTING_ACTION, 0, 0);
if (settings->bools.quick_menu_show_start_streaming)
{
menu_entries_append_enum(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QUICK_MENU_START_STREAMING),
msg_hash_to_str(MENU_ENUM_LABEL_QUICK_MENU_START_STREAMING),
MENU_ENUM_LABEL_QUICK_MENU_START_STREAMING, MENU_SETTING_ACTION, 0, 0);
}
}
else
{
@ -3388,6 +3394,15 @@ static int menu_displaylist_parse_options_remappings(
strlcpy(descriptor, desc_label, sizeof(descriptor));
}
/* Add user index when display driver == rgui,
* but only if there is more than one user */
if (string_is_equal(settings->arrays.menu_driver, "rgui") && (max_users > 1))
{
snprintf(desc_label, sizeof(desc_label),
"%s [%s %u]", descriptor, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_USER), p + 1);
strlcpy(descriptor, desc_label, sizeof(descriptor));
}
menu_entries_append_enum(info->list, descriptor, "",
MSG_UNKNOWN,
MENU_SETTINGS_INPUT_DESC_BEGIN +
@ -3398,7 +3413,8 @@ static int menu_displaylist_parse_options_remappings(
{
for (retro_id = 0; retro_id < RARCH_FIRST_CUSTOM_BIND; retro_id++)
{
char descriptor[255];
char desc_label[400];
char descriptor[300];
const struct retro_keybind *auto_bind = NULL;
const struct retro_keybind *keybind = NULL;
@ -3417,6 +3433,15 @@ static int menu_displaylist_parse_options_remappings(
strlcpy(descriptor, msg_hash_to_str(keyptr->enum_idx), sizeof(descriptor));
}
/* Add user index when display driver == rgui,
* but only if there is more than one user */
if (string_is_equal(settings->arrays.menu_driver, "rgui") && (max_users > 1))
{
snprintf(desc_label, sizeof(desc_label),
"%s [%s %u]", descriptor, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_USER), p + 1);
strlcpy(descriptor, desc_label, sizeof(descriptor));
}
menu_entries_append_enum(info->list, descriptor, "",
MSG_UNKNOWN,
MENU_SETTINGS_INPUT_DESC_KBD_BEGIN +
@ -3623,7 +3648,8 @@ static unsigned menu_displaylist_parse_cores(
return items_found;
}
info->download_core = true;
if (string_is_equal(info->label, msg_hash_to_str(MENU_ENUM_LABEL_CORE_LIST)))
info->download_core = true;
dir_list_sort(str_list, true);
@ -3700,7 +3726,10 @@ static unsigned menu_displaylist_parse_cores(
else
{
file_type = FILE_TYPE_CORE;
enum_idx = MENU_ENUM_LABEL_FILE_BROWSER_CORE;
if (string_is_equal(info->label, msg_hash_to_str(MENU_ENUM_LABEL_SIDELOAD_CORE_LIST)))
enum_idx = MENU_ENUM_LABEL_FILE_BROWSER_SIDELOAD_CORE;
else
enum_idx = MENU_ENUM_LABEL_FILE_BROWSER_CORE;
}
items_found++;
@ -4123,6 +4152,7 @@ bool menu_displaylist_process(menu_displaylist_info_t *info)
#if defined(HAVE_NETWORKING)
if (settings->bools.menu_show_core_updater && !settings->bools.kiosk_mode_enable)
{
if (info->download_core)
{
menu_entries_append_enum(info->list,
@ -4130,7 +4160,14 @@ bool menu_displaylist_process(menu_displaylist_info_t *info)
msg_hash_to_str(MENU_ENUM_LABEL_CORE_UPDATER_LIST),
MENU_ENUM_LABEL_CORE_UPDATER_LIST,
MENU_SETTING_ACTION, 0, 0);
menu_entries_append_enum(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SIDELOAD_CORE_LIST),
msg_hash_to_str(MENU_ENUM_LABEL_SIDELOAD_CORE_LIST),
MENU_ENUM_LABEL_SIDELOAD_CORE_LIST,
MENU_SETTING_ACTION, 0, 0);
}
}
#endif
if (info->push_builtin_cores)
@ -4397,8 +4434,8 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, menu_displaylist
break;
}
#endif // HAVE_LAKKA_SWITCH
#endif // HAVE_LAKKA_SWITCH || HAVE_LIBNX
#endif /* HAVE_LAKKA_SWITCH */
#endif /* HAVE_LAKKA_SWITCH || HAVE_LIBNX */
case DISPLAYLIST_MUSIC_LIST:
{
char combined_path[PATH_MAX_LENGTH];
@ -5837,6 +5874,14 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, menu_displaylist
MENU_ENUM_LABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES,
PARSE_ONLY_BOOL, false);
menu_displaylist_parse_settings_enum(menu, info,
MENU_ENUM_LABEL_QUICK_MENU_SHOW_START_RECORDING,
PARSE_ONLY_BOOL, false);
menu_displaylist_parse_settings_enum(menu, info,
MENU_ENUM_LABEL_QUICK_MENU_SHOW_START_STREAMING,
PARSE_ONLY_BOOL, false);
menu_displaylist_parse_settings_enum(menu, info,
MENU_ENUM_LABEL_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION,
PARSE_ONLY_BOOL, false);
@ -5931,6 +5976,22 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, menu_displaylist
MENU_ENUM_LABEL_TITLE_COLOR,
PARSE_ONLY_HEX, false) == 0)
count++;
if (menu_displaylist_parse_settings_enum(menu, info,
MENU_ENUM_LABEL_BG_DARK_COLOR,
PARSE_ONLY_HEX, false) == 0)
count++;
if (menu_displaylist_parse_settings_enum(menu, info,
MENU_ENUM_LABEL_BG_LIGHT_COLOR,
PARSE_ONLY_HEX, false) == 0)
count++;
if (menu_displaylist_parse_settings_enum(menu, info,
MENU_ENUM_LABEL_BORDER_DARK_COLOR,
PARSE_ONLY_HEX, false) == 0)
count++;
if (menu_displaylist_parse_settings_enum(menu, info,
MENU_ENUM_LABEL_BORDER_LIGHT_COLOR,
PARSE_ONLY_HEX, false) == 0)
count++;
if (menu_displaylist_parse_settings_enum(menu, info,
MENU_ENUM_LABEL_DPI_OVERRIDE_ENABLE,
PARSE_ONLY_BOOL, false) == 0)
@ -6580,9 +6641,6 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, menu_displaylist
menu_displaylist_parse_settings_enum(menu, info,
MENU_ENUM_LABEL_VIDEO_WINDOWED_FULLSCREEN,
PARSE_ONLY_BOOL, false);
menu_displaylist_parse_settings_enum(menu, info,
MENU_ENUM_LABEL_SCREEN_RESOLUTION,
PARSE_ACTION, false);
menu_displaylist_parse_settings_enum(menu, info,
MENU_ENUM_LABEL_VIDEO_FULLSCREEN_X,
PARSE_ONLY_UINT, false);
@ -7388,6 +7446,9 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, menu_displaylist
if (settings->bools.menu_show_load_core)
menu_displaylist_parse_settings_enum(menu, info,
MENU_ENUM_LABEL_CORE_LIST, PARSE_ACTION, false);
if (settings->bools.menu_show_load_core)
menu_displaylist_parse_settings_enum(menu, info,
MENU_ENUM_LABEL_SIDELOAD_CORE_LIST, PARSE_ACTION, false);
}
if (settings->bools.menu_show_load_content)
@ -7634,6 +7695,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, menu_displaylist
case DISPLAYLIST_FILE_BROWSER_SELECT_DIR:
case DISPLAYLIST_FILE_BROWSER_SELECT_FILE:
case DISPLAYLIST_FILE_BROWSER_SELECT_CORE:
case DISPLAYLIST_FILE_BROWSER_SELECT_SIDELOAD_CORE:
case DISPLAYLIST_FILE_BROWSER_SELECT_COLLECTION:
case DISPLAYLIST_GENERIC:
{
@ -8017,7 +8079,8 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, menu_displaylist
info->need_refresh = true;
info->need_push = true;
info->push_builtin_cores = true;
if (string_is_equal(info->label, msg_hash_to_str(MENU_ENUM_LABEL_CORE_LIST)))
info->push_builtin_cores = true;
break;
case DISPLAYLIST_DEFAULT:
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);

View File

@ -78,6 +78,7 @@ enum menu_displaylist_ctl_state
DISPLAYLIST_FILE_BROWSER_SCAN_DIR,
DISPLAYLIST_FILE_BROWSER_SELECT_FILE,
DISPLAYLIST_FILE_BROWSER_SELECT_CORE,
DISPLAYLIST_FILE_BROWSER_SELECT_SIDELOAD_CORE,
DISPLAYLIST_FILE_BROWSER_SELECT_COLLECTION,
DISPLAYLIST_CORES,
DISPLAYLIST_CORES_SUPPORTED,

View File

@ -392,7 +392,7 @@ void menu_display_timedate(menu_display_ctx_datetime_t *datetime)
case 7: /* Time (hours-minutes), in 12 hour AM-PM designation */
#if defined(__linux__) && !defined(ANDROID)
strftime(datetime->s, datetime->len,
"%r", localtime(&time_));
"%I : %M : %S %p", localtime(&time_));
#else
{
char *local;
@ -1979,6 +1979,8 @@ bool menu_driver_iterate(menu_ctx_iterate_t *iterate)
return false;
}
menu_navigation_set_selection(0);
return true;
}
@ -2099,11 +2101,17 @@ static bool menu_driver_context_reset(bool video_is_threaded)
bool menu_driver_init(bool video_is_threaded)
{
menu_animation_init();
if (menu_driver_init_internal(video_is_threaded))
return menu_driver_context_reset(video_is_threaded);
return false;
}
void menu_driver_free(void)
{
menu_animation_free();
}
void menu_driver_navigation_set(bool scroll)
{
if (menu_driver_ctx->navigation_set)
@ -2707,4 +2715,4 @@ void menu_subsystem_populate(const struct retro_subsystem_info* subsystem, menu_
}
}
}
}
}

View File

@ -678,6 +678,8 @@ bool menu_driver_push_list(menu_ctx_displaylist_t *disp_list);
bool menu_driver_init(bool video_is_threaded);
void menu_driver_free(void);
void menu_driver_set_thumbnail_system(char *s, size_t len);
void menu_driver_set_thumbnail_content(char *s, size_t len);

View File

@ -1819,6 +1819,9 @@ static void setting_get_string_representation_toggle_gamepad_combo(
case INPUT_TOGGLE_L_R:
strlcpy(s, "L + R", len);
break;
case INPUT_TOGGLE_HOLD_START:
strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_HOLD_START), len);
break;
}
}
@ -3575,6 +3578,7 @@ static bool setting_append_list(
&subgroup_info,
parent_group);
if (settings->bools.history_list_enable)
{
CONFIG_ACTION(
@ -6827,7 +6831,6 @@ static bool setting_append_list(
general_read_handler);
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_INPUT);
CONFIG_UINT(
list, list_info,
&settings->uints.video_record_threads,
@ -6847,10 +6850,10 @@ static bool setting_append_list(
list, list_info,
global->record.output_dir,
sizeof(global->record.output_dir),
MENU_ENUM_LABEL_SCREENSHOT_DIRECTORY,
MENU_ENUM_LABEL_VALUE_SCREENSHOT_DIRECTORY,
g_defaults.dirs[DEFAULT_DIR_SCREENSHOT],
MENU_ENUM_LABEL_VALUE_DIRECTORY_CONTENT,
MENU_ENUM_LABEL_RECORDING_OUTPUT_DIRECTORY,
MENU_ENUM_LABEL_VALUE_RECORDING_OUTPUT_DIRECTORY,
g_defaults.dirs[DEFAULT_DIR_RECORD_OUTPUT],
MENU_ENUM_LABEL_VALUE_DIRECTORY_DEFAULT,
&group_info,
&subgroup_info,
parent_group,
@ -7675,6 +7678,62 @@ static bool setting_append_list(
general_read_handler);
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_INPUT);
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
CONFIG_HEX(
list, list_info,
&settings->uints.menu_bg_dark_color,
MENU_ENUM_LABEL_BG_DARK_COLOR,
MENU_ENUM_LABEL_VALUE_BG_DARK_COLOR,
menu_bg_dark_color,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_INPUT);
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
CONFIG_HEX(
list, list_info,
&settings->uints.menu_bg_light_color,
MENU_ENUM_LABEL_BG_LIGHT_COLOR,
MENU_ENUM_LABEL_VALUE_BG_LIGHT_COLOR,
menu_bg_light_color,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_INPUT);
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
CONFIG_HEX(
list, list_info,
&settings->uints.menu_border_dark_color,
MENU_ENUM_LABEL_BORDER_DARK_COLOR,
MENU_ENUM_LABEL_VALUE_BORDER_DARK_COLOR,
menu_border_dark_color,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_INPUT);
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
CONFIG_HEX(
list, list_info,
&settings->uints.menu_border_light_color,
MENU_ENUM_LABEL_BORDER_LIGHT_COLOR,
MENU_ENUM_LABEL_VALUE_BORDER_LIGHT_COLOR,
menu_border_light_color,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_INPUT);
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
}
if (string_is_equal(settings->arrays.menu_driver, "xmb"))
@ -8867,6 +8926,36 @@ static bool setting_append_list(
general_read_handler,
SD_FLAG_NONE);
CONFIG_BOOL(
list, list_info,
&settings->bools.quick_menu_show_start_recording,
MENU_ENUM_LABEL_QUICK_MENU_SHOW_START_RECORDING,
MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_START_RECORDING,
quick_menu_show_start_recording,
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE);
CONFIG_BOOL(
list, list_info,
&settings->bools.quick_menu_show_start_streaming,
MENU_ENUM_LABEL_QUICK_MENU_SHOW_START_STREAMING,
MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_START_STREAMING,
quick_menu_show_start_streaming,
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE);
CONFIG_BOOL(
list, list_info,
&settings->bools.quick_menu_show_reset_core_association,

View File

@ -783,8 +783,6 @@ enum msg_hash_enums
MENU_LABEL(VIDEO_REFRESH_RATE_AUTO),
MENU_LABEL(VIDEO_REFRESH_RATE_POLLED),
MENU_ENUM_LABEL_VALUE_DOWNLOAD_CORE,
MENU_LABEL(PARENT_DIRECTORY),
MENU_ENUM_LABEL_CONTENT_ACTIONS,
@ -859,6 +857,8 @@ enum msg_hash_enums
MENU_LABEL(QUICK_MENU_SHOW_SAVE_LOAD_STATE),
MENU_LABEL(QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE),
MENU_LABEL(QUICK_MENU_SHOW_ADD_TO_FAVORITES),
MENU_LABEL(QUICK_MENU_SHOW_START_RECORDING),
MENU_LABEL(QUICK_MENU_SHOW_START_STREAMING),
MENU_LABEL(QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION),
MENU_LABEL(QUICK_MENU_SHOW_OPTIONS),
MENU_LABEL(QUICK_MENU_SHOW_CONTROLS),
@ -892,6 +892,7 @@ enum msg_hash_enums
MENU_ENUM_LABEL_FILE_BROWSER_SHADER,
MENU_ENUM_LABEL_FILE_BROWSER_REMAP,
MENU_ENUM_LABEL_FILE_BROWSER_CORE,
MENU_ENUM_LABEL_FILE_BROWSER_SIDELOAD_CORE,
MENU_ENUM_LABEL_FILE_BROWSER_OVERLAY,
MENU_ENUM_LABEL_FILE_BROWSER_CHEAT,
MENU_ENUM_LABEL_FILE_BROWSER_FONT,
@ -1315,6 +1316,10 @@ enum msg_hash_enums
MENU_LABEL(CHEAT_DELETE_MATCH),
MENU_LABEL(SCREEN_RESOLUTION),
MENU_LABEL(TITLE_COLOR),
MENU_LABEL(BG_DARK_COLOR),
MENU_LABEL(BG_LIGHT_COLOR),
MENU_LABEL(BORDER_DARK_COLOR),
MENU_LABEL(BORDER_LIGHT_COLOR),
MENU_LABEL(SAVESTATE_AUTO_INDEX),
MENU_LABEL(SAVESTATE_AUTO_SAVE),
MENU_LABEL(SAVESTATE_AUTO_LOAD),
@ -1568,6 +1573,10 @@ enum msg_hash_enums
MENU_LABEL(SUBSYSTEM_ADD),
MENU_LABEL(SUBSYSTEM_LOAD),
MENU_LABEL(CORE_LIST),
MENU_LABEL(DOWNLOAD_CORE),
MENU_LABEL(SIDELOAD_CORE_LIST),
MENU_LABEL(SIDELOAD_CORE_ERROR),
MENU_LABEL(SIDELOAD_CORE_SUCCESS),
MENU_LABEL(MANAGEMENT),
MENU_LABEL(ONLINE),
MENU_LABEL(ONLINE_UPDATER),
@ -2182,6 +2191,8 @@ enum msg_hash_enums
MENU_ENUM_SUBLABEL_SWITCH_CPU_PROFILE,
#endif
MENU_ENUM_LABEL_VALUE_HOLD_START,
MSG_LAST
};
@ -2358,6 +2369,7 @@ enum msg_hash_enums
#define MENU_LABEL_DETECT_CORE_LIST 0xaa07c341U
#define MENU_LABEL_DETECT_CORE_LIST_OK 0xabba2a7aU
#define MENU_LABEL_CORE_LIST 0xa22bb14dU
#define MENU_LABEL_SIDELOAD_CORE_LIST 0x88ef1cf2U
#define MENU_LABEL_MANAGEMENT 0x2516c88aU
#define MENU_LABEL_FRONTEND_COUNTERS 0xe5696877U
#define MENU_LABEL_CORE_COUNTERS 0x64cc83e0U

View File

@ -731,7 +731,7 @@ static void netplay_announce_cb(void *task_data, void *user_data, const char *er
if (string_is_equal(key, "game_name"))
strlcpy(host_room->gamename, val, sizeof(host_room->gamename));
if (string_is_equal(key, "game_crc"))
sscanf(val, "%08X", &host_room->gamecrc);
sscanf(val, "%08d", &host_room->gamecrc);
if (string_is_equal(key, "host_method"))
sscanf(val, "%i", &host_room->host_method);
if (string_is_equal(key, "has_password"))

View File

@ -503,6 +503,7 @@
OTHER_CFLAGS = (
"-DHAVE_RUNAHEAD",
"-DHAVE_SSL",
"-DHAVE_BUILTINMBEDTLS",
"-DHAVE_GRIFFIN",
"-DHAVE_FLAC",
"-DHAVE_DR_FLAC",
@ -568,6 +569,7 @@
OTHER_CFLAGS = (
"-DHAVE_RUNAHEAD",
"-DHAVE_SSL",
"-DHAVE_BUILTINMBEDTLS",
"-DHAVE_GRIFFIN",
"-DHAVE_FLAC",
"-DHAVE_DR_FLAC",

View File

@ -214,6 +214,7 @@ else
HAVE_NETWORKGAMEPAD='no'
HAVE_CHEEVOS='no'
HAVE_DISCORD='no'
HAVE_SSL='no'
fi
check_lib '' STDIN_CMD "$CLIB" fcntl
@ -235,6 +236,8 @@ check_val '' ALSA -lasound alsa
check_lib '' CACA -lcaca
check_lib '' SIXEL -lsixel
check_macro AUDIOIO AUDIO_SETINFO sys/audioio.h
if [ "$HAVE_OSS" != 'no' ]; then
check_header OSS sys/soundcard.h
check_header OSS_BSD soundcard.h
@ -315,6 +318,37 @@ fi
check_pkgconf FLAC flac
check_val '' FLAC '-lFLAC'
if [ "$HAVE_SSL" = 'no' ]; then
HAVE_BUILTINMBEDTLS=no
fi
if [ "$HAVE_SSL" != 'no' ]; then
check_header MBEDTLS \
mbedtls/config.h \
mbedtls/certs.h \
mbedtls/debug.h \
mbedtls/platform.h \
mbedtls/net_sockets.h \
mbedtls/ssl.h \
mbedtls/ctr_drbg.h \
mbedtls/entropy.h
check_lib '' MBEDTLS -lmbedtls
check_lib '' MBEDX509 -lmbedx509
check_lib '' MBEDCRYPTO -lmbedcrypto
if [ "$HAVE_MBEDTLS" = 'no' ] ||
[ "$HAVE_MBEDX509" = 'no' ] ||
[ "$HAVE_MBEDCRYPTO" = 'no' ]; then
if [ "$HAVE_BUILTINMBEDTLS" != 'yes' ]; then
die : 'Notice: System mbedtls libraries not found, disabling SSL support.'
HAVE_SSL=no
fi
else
HAVE_SSL=yes
fi
fi
check_pkgconf LIBUSB libusb-1.0 1.0.13
check_val '' LIBUSB -lusb-1.0 libusb-1.0
@ -477,7 +511,7 @@ if [ "$HAVE_WAYLAND_PROTOS" = yes ] && [ "$HAVE_WAYLAND" = yes ]; then
check_pkgconf WAYLAND_SCANNER wayland-scanner 1.15
./gfx/common/wayland/generate_wayland_protos.sh
else
die : 'Notice: wayland-egl or wayland-protocols not present. Skiping Wayland code paths.'
die : 'Notice: wayland-egl or wayland-protocols not found, disabling wayland support.'
HAVE_WAYLAND='no'
fi

View File

@ -15,8 +15,10 @@ HAVE_STRIPES=no # Stripes menu
HAVE_ZARCH=no # Zarch menu
HAVE_NUKLEAR=no # Nuklear menu
HAVE_RUNAHEAD=yes # Runahead support
HAVE_SSL=yes # SSL/mbedtls support
C89_SSL=no
HAVE_SSL=auto # SSL/mbedtls support
C89_SSL=no
HAVE_BUILTINMBEDTLS=yes # Bake in the mbedtls library
C89_BUILTINMBEDTLS=no
HAVE_OVERLAY=yes # Overlay support
HAVE_DYNAMIC=yes # Dynamic loading of libretro library
HAVE_SDL=auto # SDL support
@ -31,8 +33,8 @@ HAVE_UDEV=auto # Udev/Evdev gamepad support
HAVE_THREADS=auto # Threading support
HAVE_THREAD_STORAGE=auto # Thread Local Storage support
HAVE_FFMPEG=auto # FFmpeg support
HAVE_MPV=auto # MPV support
C89_FFMPEG=no
HAVE_MPV=auto # MPV support
HAVE_SSA=auto # SSA/ASS for FFmpeg subtitle support
HAVE_DYLIB=auto # Dynamic loading support
HAVE_NETWORKING=auto # Networking features (recommended)
@ -79,6 +81,7 @@ HAVE_ZLIB=auto # zlib support (ZIP extract, PNG decoding/encoding)
HAVE_ALSA=auto # ALSA support
C89_ALSA=no
HAVE_TINYALSA=auto # TinyALSA support
HAVE_AUDIOIO=auto # AudioIO support
HAVE_OSS=auto # OSS support
HAVE_RSOUND=auto # RSound support
HAVE_ROAR=auto # RoarAudio support

View File

@ -115,18 +115,19 @@ check_pkgconf() # $1 = HAVE_$1 $2 = package $3 = version $4 = critical error
fi
}
check_header() #$1 = HAVE_$1 $2..$5 = header files
check_header() #$1 = HAVE_$1 $2, $3, ... = header files
{ tmpval="$(eval "printf %s \"\$HAVE_$1\"")"
[ "$tmpval" = 'no' ] && return 0
CHECKHEADER="$2"
printf %s\\n "#include <$2>" > "$TEMP_C"
[ "$3" != '' ] && CHECKHEADER="$3" && printf %s\\n "#include <$3>" >> "$TEMP_C"
[ "$4" != '' ] && CHECKHEADER="$4" && printf %s\\n "#include <$4>" >> "$TEMP_C"
[ "$5" != '' ] && CHECKHEADER="$5" && printf %s\\n "#include <$5>" >> "$TEMP_C"
printf %s\\n "int main(void) { return 0; }" >> "$TEMP_C"
answer='no'
rm -f -- "$TEMP_C"
val="$1"
header="$2"
shift
for head do
CHECKHEADER="$head"
printf %s\\n "#include <$head>" >> "$TEMP_C"
done
printf %s\\n "int main(void) { return 0; }" >> "$TEMP_C"
answer='no'
eval "set -- $INCLUDE_DIRS"
"$CC" -o "$TEMP_EXE" "$TEMP_C" "$@" >>config.log 2>&1 && answer='yes'
eval "HAVE_$val=\"$answer\""
@ -136,11 +137,18 @@ check_header() #$1 = HAVE_$1 $2..$5 = header files
die 1 "Build assumed that $header exists, but cannot locate. Exiting ..."
}
check_macro() #$1 = HAVE_$1 $2 = macro name
check_macro() #$1 = HAVE_$1 $2 = macro name $3 = header name [included only if non-empty]
{ tmpval="$(eval "printf %s \"\$HAVE_$1\"")"
[ "$tmpval" = 'no' ] && return 0
ECHOBUF="Checking presence of predefined macro $2"
if [ "${3}" ]; then
ECHOBUF="Checking presence of predefined macro $2 in $3"
header_include="#include <$3>"
else
ECHOBUF="Checking presence of predefined macro $2"
header_include=""
fi
cat << EOF > "$TEMP_C"
$header_include
#ifndef $2
#error $2 is not defined
#endif

View File

@ -140,6 +140,7 @@
#endif
#define SHADER_FILE_WATCH_DELAY_MSEC 500
#define HOLD_START_DELAY_SEC 2
/* Descriptive names for options without short variant.
*
@ -2507,6 +2508,34 @@ static bool input_driver_toggle_button_combo(
if (!BIT256_GET_PTR(p_input, RETRO_DEVICE_ID_JOYPAD_R))
return false;
break;
case INPUT_TOGGLE_HOLD_START:
{
static rarch_timer_t timer = {0};
if (!BIT256_GET_PTR(p_input, RETRO_DEVICE_ID_JOYPAD_START))
{
/* timer only runs while start is held down */
rarch_timer_end(&timer);
return false;
}
if (!rarch_timer_is_running(&timer))
{
/* user started holding down the start button, start the timer */
rarch_timer_begin(&timer, HOLD_START_DELAY_SEC);
}
rarch_timer_tick(&timer);
if (!timer.timer_end && rarch_timer_has_expired(&timer))
{
/* start has been held down long enough, stop timer and enter menu */
rarch_timer_end(&timer);
return true;
}
return false;
}
default:
case INPUT_TOGGLE_NONE:
return false;

View File

@ -122,4 +122,4 @@ static unsigned SWITCH_CPU_SPEEDS_VALUES[] = {
#endif
#endif
#endif

View File

@ -1654,7 +1654,7 @@ bool task_push_start_builtin_core(
/* Preliminary stuff that has to be done before we
* load the actual content. Can differ per mode. */
retroarch_set_current_core_type(type, true);
printf("Step 1\n");
/* Load content */
if (!task_load_content_callback(content_info, true, false))
{
@ -1718,7 +1718,6 @@ bool task_push_load_content_with_core_from_menu(
return true;
}
bool task_push_load_subsystem_with_core_from_menu(
const char *fullpath,
content_ctx_info_t *content_info,
@ -1838,6 +1837,11 @@ uint32_t content_get_crc(void)
return content_rom_crc;
}
char* content_get_subsystem_rom(unsigned index)
{
return pending_subsystem_roms[index];
}
bool content_is_inited(void)
{
return _content_is_inited;