Compare commits

...
84 Commits
Author SHA1 Message Date
Twinaphex 9e25601a56 Merge pull request #10012 from orbea/c99
qb: Improve the gnu99 compiler check.
2020-01-15 19:18:29 +01:00
Twinaphex fca5af7ac3 Merge pull request #10011 from orbea/qb-fix
qb: Don't set cc_works in test_compiler.
2020-01-15 19:18:20 +01:00
Twinaphex 1af0ede1a6 Merge pull request #10013 from jdgleaver/clean-playlists
(Playlist Management) Add 'Clean Playlist' option
2020-01-15 19:17:50 +01:00
jdgleaver e7733abc40 (Playlist Management) Add 'Clean Playlist' option 2020-01-15 18:00:51 +00:00
orbea 4171c93bff qb: Improve the gnu99 compiler check. 2020-01-15 09:55:27 -08:00
orbea dd2c9c911b qb: Don't set cc_works in test_compiler. 2020-01-15 09:23:49 -08:00
Twinaphex de052537ec Update AndroidManifest.xml 2020-01-15 17:18:05 +01:00
Twinaphex 68bc6b37ae Update AndroidManifest.xml 2020-01-15 17:17:43 +01:00
Twinaphex 548d1bae9e Update retroarch-sailfishos.spec 2020-01-15 17:12:35 +01:00
Twinaphex c89e557158 Update bar-descriptor.xml 2020-01-15 17:12:15 +01:00
Twinaphex 62dda5fdbf Update Info.plist 2020-01-15 17:09:26 +01:00
Twinaphex 22f24bd48f Update Info_Metal.plist 2020-01-15 17:09:10 +01:00
Twinaphex eeb0c65b6e Update Info.plist 2020-01-15 17:08:02 +01:00
Twinaphex b23fcf238b Update RetroArch_iOS9-Info.plist 2020-01-15 17:07:00 +01:00
Twinaphex 79698981ad Update version.dtd 2020-01-15 17:06:00 +01:00
Twinaphex ab4e3e8c75 Update version.all 2020-01-15 17:05:43 +01:00
Twinaphex 4bee4429aa Update CHANGES.md 2020-01-15 17:05:04 +01:00
Twinaphex 269ee7e672 Merge pull request #10010 from orbea/uname
Don't use uname -a.
2020-01-15 16:17:20 +01:00
orbea 8d6b70c22c Don't use uname -a. 2020-01-15 06:27:42 -08:00
twinaphex e786059506 frontend_ctx_null - add missing function pointer 2020-01-15 09:11:17 +01:00
twinaphex d48d4385d9 (Wayland) Silence warning 2020-01-15 08:48:13 +01:00
Twinaphex 1521be8acb Merge pull request #10007 from orbea/eval
qb: Move BUILD_DIRS to the correct function.
2020-01-15 08:21:05 +01:00
Twinaphex 76c97bbfad Merge pull request #10009 from orbea/qb-win
qb: Clean up.
2020-01-15 07:52:30 +01:00
Twinaphex 1b931dd410 Merge pull request #10008 from orbea/qt-fix
qb: Fix the qt configure check with older compilers.
2020-01-15 07:51:52 +01:00
orbea 77baa1c930 qb: Clean up. 2020-01-14 22:12:22 -08:00
orbea d41b7770c4 qb: Fix the qt configure check with older compilers. 2020-01-14 21:01:50 -08:00
Twinaphex 4f145a4f4f Update CHANGES.md 2020-01-15 05:29:50 +01:00
twinaphex fc7dc3cef7 (Camera) Add stub null camera driver 2020-01-15 05:20:01 +01:00
orbea 0dbfd721b3 qb: Move BUILD_DIRS to the correct function. 2020-01-14 20:06:09 -08:00
Twinaphex 243505b7cb Merge pull request #10006 from orbea/eval
qb: Remove potentially unsafe uses of eval.
2020-01-15 00:43:09 +01:00
orbea 04af898fe5 qb: Remove potentially unsafe uses of eval. 2020-01-14 14:30:28 -08:00
Twinaphex 9e1c5747f6 Merge pull request #10004 from orbea/exists
qb: Update the exists function.
2020-01-14 22:33:47 +01:00
twinaphex ab49806a5f add another ifdef 2020-01-14 22:09:00 +01:00
twinaphex e24934d5ea Improve compile time checks for determining if ffmpeg
version supports hardware decoder
2020-01-14 21:41:26 +01:00
Twinaphex 8ab162ffb1 Update CHANGES.md 2020-01-14 20:28:41 +01:00
Twinaphex 614e5bc44f Update CHANGES.md 2020-01-14 20:28:23 +01:00
twinaphex c1137ee3fa CoreAudio - Put g_interrupted behind IOS ifdefs 2020-01-14 20:22:06 +01:00
twinaphex 6cfe0ea77c (Audio) Update 2020-01-14 20:20:54 +01:00
orbea d89b7f93b2 qb: Update the exists function. 2020-01-14 10:20:35 -08:00
Twinaphex a6b114e423 Merge pull request #10000 from orbea/comp
qb: Allow multi argument CC and CXX.
2020-01-14 19:01:14 +01:00
Twinaphex 90f2ebeac1 Update CHANGES.md 2020-01-14 18:51:40 +01:00
Twinaphex 60cca4d9d2 Merge pull request #10003 from jdgleaver/disk-control-tweaks
Disk control interface improvements
2020-01-14 18:48:57 +01:00
hizzlekizzle 9b2752ff07 Merge pull request #9896 from m4tsa/update-libnx
fix breaking changes from the 3.0.0 libnx release
2020-01-14 08:32:47 -06:00
jdgleaver 16c4035e1c DISABLE_MENU=1 build fix 2020-01-14 14:04:34 +00:00
jdgleaver b5eba22aaf Disk control interface improvements 2020-01-14 12:30:08 +00:00
twinaphex 98b572d17a (FFmpeg) Add more ffmpeg_sw_decoder_threads options 2020-01-14 06:56:14 +01:00
Twinaphex 76c6e01534 Update CHANGES.md 2020-01-13 19:34:17 +01:00
Twinaphex 15b1281075 Update CHANGES.md 2020-01-13 19:34:05 +01:00
twinaphex e4ef930b47 (Android) Prevent crash when Android device is minimized and you go back to
the app
2020-01-13 19:21:24 +01:00
orbea 19e86a2b19 qb: Allow multi argument CC and CXX. 2020-01-13 09:41:14 -08:00
twinaphex 46b62b4a63 Update Makefile 2020-01-13 08:28:26 +01:00
twinaphex 7874d179da Simplify create_win32_process 2020-01-13 00:01:28 +01:00
twinaphex 341a4d50ea Buildfix 2020-01-12 23:56:08 +01:00
twinaphex b8328a9fdf (Accessibility) Cleanups 2020-01-12 22:04:31 +01:00
twinaphex 5b8411fe77 Silence implicit definition warnings 2020-01-12 21:46:28 +01:00
twinaphex 682d8f23e9 Strip out accessibility settings in menu if HAVE_ACCESSIBILITY
is not defined
2020-01-12 21:38:30 +01:00
twinaphex 34a9224334 Add accessibility.h 2020-01-12 21:34:31 +01:00
twinaphex 88ee7cbfa8 Add HAVE_ACCESSIBILITY switch 2020-01-12 21:33:00 +01:00
twinaphex 70e472e9e2 (menu widgets) Minor variable cleanups; shouldn't affect anything 2020-01-12 21:11:26 +01:00
twinaphex e9adb44c4a Avoid two warnings 2020-01-12 00:07:41 +01:00
twinaphex 81f8cae52a (RGUI) Prevent 'potential uninitialized reference to variables'
in load_custom_theme
2020-01-11 23:22:54 +01:00
twinaphex 36e67108fb Cleanups 2020-01-11 23:22:54 +01:00
Twinaphex f0bad7b091 Merge pull request #9988 from hasenbanck/fix-brackets
Fix brackets in buffer logic of the ffmpeg core.
2020-01-11 23:15:28 +01:00
Nils Hasenbanck 354c50039b Fix brackets in buffer logic of the ffmpeg core. 2020-01-11 15:01:21 +01:00
twinaphex b9c69e24a9 Cleanups 2020-01-11 05:06:38 +01:00
twinaphex 6319262b9c (RGUI) Prevent warning 2020-01-11 05:03:27 +01:00
twinaphex 78e02bf3dd Avoid warnings when HAVE_RUNAHEAD is not defined 2020-01-11 05:02:46 +01:00
twinaphex 3492ba5fd6 (libretro-common) Prevent warning 2020-01-11 04:48:33 +01:00
twinaphex f9ed6cbbfe Prevent another warning 2020-01-11 04:27:38 +01:00
twinaphex 98a573033d Prevent another warning 2020-01-11 04:26:31 +01:00
twinaphex 066089873b Prevent warning when HAVE_NETWORKING is not defined 2020-01-11 04:13:05 +01:00
twinaphex 8032ff6e19 (RCheevos) Cleanups 2020-01-11 03:07:54 +01:00
twinaphex 99d5dba6ae Add signal.h check for linux/unix 2020-01-10 15:19:29 +01:00
Twinaphex 0b0455975b Update CHANGES.md 2020-01-10 15:09:37 +01:00
Twinaphex 4b34894b59 Merge pull request #9978 from dev-0x7C6/master
Added additional CI test for passing sysroot flags via CC and CXX.
2020-01-10 15:07:20 +01:00
Twinaphex 311ee2db62 Update build.gradle 2020-01-10 15:06:00 +01:00
Twinaphex dfafcb0513 Update AndroidManifest.xml 2020-01-10 15:05:34 +01:00
Twinaphex 28520af599 Merge pull request #9979 from hasenbanck/better-buffer-logic
Fix the ffmpeg core packet buffer logic.
2020-01-10 15:04:31 +01:00
Twinaphex 207795abfd Merge pull request #9981 from jdgleaver/thumb-task-cleanup
Thumbnail downloader clean-ups
2020-01-10 15:04:11 +01:00
jdgleaver 495ad41741 Thumbnail downloader clean-ups 2020-01-10 11:08:36 +00:00
Nils Hasenbanck d591529e7a Fix the ffmpeg core packet buffer logic.
The logic for when to consider to decode a buffered packet did
had used a "magic number" when considering when the current packet
should be decoded when compared to the reference packet.
This change uses the media fps so that we never "overshoot" our target
and don't need to rely on a "magic number".
2020-01-10 08:23:18 +01:00
twinaphex 3a5dace583 (WiiU) fix build 2020-01-10 01:16:42 +01:00
Bartłomiej Burdukiewicz e2952586d1 Added additional CI test for passing sysroot flags via CC and CXX. 2020-01-09 23:14:50 +01:00
Mats A ef2ddf6912 fix breaking changes from the 3.0.0 libnx release 2020-01-06 13:12:00 +01:00
90 changed files with 1872 additions and 824 deletions

No files matched your search

+3 -1
View File
@@ -32,6 +32,8 @@ matrix:
env: CXX_BUILD=1 CROSS_COMPILE=x86_64-w64-mingw32- CFLAGS="-D_WIN32_WINNT=0x0501"
- compiler: gcc
env: CC=gcc-8 CXX=g++-8
- compiler: gcc
env: CC="gcc-8 --sysroot=/" CXX="g++-8 --sysroot=/"
- compiler: gcc
env: C89_BUILD=1 CC=gcc-8 CXX=g++-8
- compiler: gcc
@@ -105,7 +107,7 @@ matrix:
before_install:
- |
if [ "$CC" = gcc-8 ]; then
if [[ "$CC" =~ ^gcc-8.* ]]; then
# Install a more recent gcc than the default
sudo apt-get install -y g++-8
elif [ "$CC" = clang-6.0 ]; then
+18
View File
@@ -1,5 +1,21 @@
# Future
# 1.8.4
- ANDROID/BUGFIX: Prevent crash when Android device is minimized and you go back to the app
- CAMERA/BUGFIX: Fix crash when a core requires the camera driver and the platform only has a null driver. This would crash mgba on Wii for example
- DISK CONTROL: Cycle Disk Tray now becomes Eject Disk or Insert Disk depending upon current drive state
- DISK CONTROL: Current Disk Index is only shown when the current disk has been ejected
- DISK CONTROL: The old Insert Disk entry has been changed to Load New Disk, and is only shown when a disk is currently inserted (this is because loading a new disk from the filesystem - i.e. bypassing the m3u playlist disk index interface - automatically ejects and inserts disks, and so cannot be done while the virtual drive is empty)
- DISK CONTROL: The Current Disk Index may now be set more easily via a drop-down list.
- DISK CONTROL: Selecting Eject Disk automatically moves the menu selection to the Current Disk Index entry
- DISK CONTROL: Selecting an index via the Current Disk Index drop-down list automatically moves the menu selection back to Insert Disk
- DISK CONTROL: The Disk Control entry sublabels have been changed for greater clarity
- DISK CONTROL: All of the horrendous notification spam has been removed. Notifications are now only shown in the event of an error, or when the menu itself does not provide sufficient visual feedback (note that using hotkeys to swap disks still produces the old style notifications, since this is typically only done while content is running - i.e. no menu). The duration of disk-related info notifications has also been reduced to a more sane level.
- DISK CONTROL: A new Resume content after changing disks option has been added under Settings > User Interface. When enabled (default setting), content is resumed automatically after selecting either Insert Disk or Load New Disk (when disabled, the menu remains open, obviously...)
- DISK CONTROL/BUGFIX: The Disk Control menu now has the correct title
- DISK CONTROL/BUGFIX: Selecting a disk via the Load New Disk file browser no longer flushes the user back to the top level menu (it now correctly returns to the Disk Control menu)
- LIBNX/SWITCH: Updated libnx integration to v3.0.0. This also cherry-picks libnx commit 583d6bb92dcbb33b6bb4a0fa1a9df6e3725d6ef6, which should fix the requirement having to turn rumble off and on in the system settings once per reboot
# 1.8.3
- ANDROID/BUGFIX: Fix 'Install or Restore Core' regression
- BUGFIX: Ensure core info is always initialised when calling 'drivers_init()'. This bug could prevent cores from doing content runtime logging
@@ -8,6 +24,7 @@
- BUGFIX/CRASH/CORE UPDATER: Fix potential double free error
- BUGFIX/CRASH/OPENGL/WINDOWS: Fix regression in 1.8.2 that would cause GL-based cores to fail because it would try to erroneously load libGLESv2.dll instead of OpenGL32.dll (cores affected: VitaQuake 2/3/Dhewm3, possibly more)
- BUGFIX/MENU/DESKTOP UI: Show desktop menu on startup does not launch Qt UI on Linux
- BUGFIX: Entries in the Playlist Thumbnails Updater list were displaying improper sublabels. I have no idea when this broke... The issue is now fixed
- CHEEVOS: Don't disable achievement when AddAddress generates an out-of-range address
- CHEEVOS: Don't reset triggers/leaderboards that failed to load
- CHEEVOS: Don't count unsupported achievements as unlocked
@@ -32,6 +49,7 @@
- NETPLAY/RELAY: Overall stability has improved. Fixed a memory leak that would cause the relay server to become unresponsive after some time.
- NETPLAY/RELAY: Fixed critical bug that would cause all players to be disconnected from the relay server if one player was leaving the game. That bug had been open for one year and we were finally able to fix it.
- SWITCH/LIBNX/BUGFIX: Fix onscreen keyboard input regression
- THUMBNAIL UPDATER: When waiting for individual thumbnail file http transfers to complete, the task status checking is more accurate. This uses the same method as the new core updater - we now wait until the task is 'really' complete, instead of relying on the (slightly nebulous) 'task finished' state
- UWP: Add ANGLE support
- UWP: Wire up get_metrics to the fake context of D3D9/10/11/12 driver, enabling proper scaling and mouse/touch gestures
- VITA: Re-add Online Updater
+11 -15
View File
@@ -106,10 +106,20 @@ ifneq ($(findstring Win32,$(OS)),)
LDFLAGS += -mwindows
endif
ifneq ($(CXX_BUILD), 1)
ifneq ($(C89_BUILD),)
CFLAGS += -std=c89 -ansi -pedantic -Werror=pedantic -Wno-long-long
else ifeq ($(HAVE_C99), 1)
CFLAGS += $(C99_CFLAGS)
endif
CFLAGS += -D_GNU_SOURCE
endif
DEF_FLAGS += -Wall $(INCLUDE_DIRS) -I. -Ideps -Ideps/stb
CFLAGS += $(DEF_FLAGS)
CXXFLAGS += $(DEF_FLAGS) -std=c++11 -D__STDC_CONSTANT_MACROS
CXXFLAGS += $(DEF_FLAGS) -D__STDC_CONSTANT_MACROS
OBJCFLAGS := $(CFLAGS) -D__STDC_CONSTANT_MACROS
ifeq ($(HAVE_CXX), 1)
@@ -127,20 +137,6 @@ else
LINK = $(CC)
endif
ifneq ($(CXX_BUILD), 1)
ifneq ($(GNU90_BUILD), 1)
ifneq ($(findstring icc,$(CC)),)
CFLAGS += -std=c99 -D_GNU_SOURCE
else
CFLAGS += -std=gnu99 -D_GNU_SOURCE
endif
endif
ifneq ($(C89_BUILD),)
CFLAGS += -std=c89 -ansi -pedantic -Werror=pedantic -Wno-long-long
endif
endif
ifeq ($(NOUNUSED), yes)
CFLAGS += -Wno-unused-result
CXXFLAGS += -Wno-unused-result
+9
View File
@@ -7,6 +7,10 @@ ifeq ($(HAVE_STACK_USAGE), 1)
DEF_FLAGS += -fstack-usage
endif
ifeq ($(HAVE_CXX11), 1)
CXXFLAGS += $(CXX11_CFLAGS)
endif
ifeq ($(HAVE_GL_CONTEXT),)
HAVE_GL_CONTEXT = 0
HAVE_GL_MODERN = 0
@@ -1748,6 +1752,11 @@ ifeq ($(HAVE_V4L2),1)
LIBS += $(V4L2_LIBS)
endif
# Accessibility
ifeq ($(HAVE_ACCESSIBILITY), 1)
DEFINES += -DHAVE_ACCESSIBILITY
endif
# Things that depend on network availability
ifeq ($(HAVE_NETWORKING), 1)
+1
View File
@@ -71,6 +71,7 @@ PPU_SRCS = griffin/griffin.c
#DEFINES += -DHAVE_VIDEO_LAYOUT
DEFINES += -DHAVE_MENU -DHAVE_MENU_WIDGETS -DHAVE_RGUI -DHAVE_XMB -DHAVE_OZONE -DHAVE_LIBRETRODB -DHAVE_MATERIALUI -DHAVE_SHADERPIPELINE -DRARCH_INTERNAL -DMSB_FIRST -DHAVE_OVERLAY -DHAVE_CC_RESAMPLER -DHAVE_STB_VORBIS -DHAVE_STB_FONT -DHAVE_RUNAHEAD -DHAVE_DR_MP3 -DHAVE_DR_FLAC
DEFINES += -DHAVE_ONLINE_UPDATER -DHAVE_UPDATE_ASSETS -DHAVE_UPDATE_CORES
ifeq ($(DEX_BUILD), 1)
DEFINES += -DDEX_BUILD
+1
View File
@@ -57,6 +57,7 @@ ifeq ($(SALAMANDER_BUILD),1)
OBJ += libretro-common/compat/compat_strcasestr.o
OBJ += libretro-common/compat/fopen_utf8.o
OBJ += libretro-common/file/file_path.o
OBJ += libretro-common/file/file_path_io.o
OBJ += libretro-common/string/stdstring.o
OBJ += libretro-common/lists/string_list.o
OBJ += libretro-common/lists/dir_list.o
+42
View File
@@ -0,0 +1,42 @@
/* RetroArch - A frontend for libretro.
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
* Copyright (C) 2011-2016 - Daniel De Matteis
*
* RetroArch is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with RetroArch.
* If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __RETROARCH_ACCESSIBILITY_H
#define __RETROARCH_ACCESSIBILITY_H
#include <stdint.h>
#include <stddef.h>
#include <sys/types.h>
#include <stdlib.h>
#include <boolean.h>
#include <retro_inline.h>
#include <retro_common_api.h>
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
RETRO_BEGIN_DECLS
bool is_accessibility_enabled(void);
bool accessibility_speak_priority(const char* speak_text, int priority);
RETRO_END_DECLS
#endif
+28 -49
View File
@@ -53,7 +53,7 @@ typedef struct coreaudio
} coreaudio_t;
#if TARGET_OS_IOS
static bool g_interrupted = false;
static bool g_interrupted;
#endif
static void coreaudio_free(void *data)
@@ -245,7 +245,7 @@ static void *coreaudio_init(const char *device,
#else
comp = AudioComponentFindNext(NULL, &desc);
#endif
if (!comp)
if (comp == NULL)
goto error;
#if (defined(__MACH__) && (defined(__ppc__) || defined(__ppc64__)))
@@ -346,61 +346,40 @@ static ssize_t coreaudio_write(void *data, const void *buf_, size_t size)
const uint8_t *buf = (const uint8_t*)buf_;
size_t written = 0;
if (dev->nonblock)
{
bool cond = size > 0;
#if TARGET_OS_IOS
cond = cond && !g_interrupted;
#endif
if (cond)
{
size_t write_avail;
slock_lock(dev->lock);
write_avail = fifo_write_avail(dev->buffer);
if (write_avail > size)
write_avail = size;
fifo_write(dev->buffer, buf, write_avail);
buf += write_avail;
written += write_avail;
size -= write_avail;
slock_unlock(dev->lock);
}
}
else
{
#if TARGET_OS_IOS
while (!g_interrupted && size > 0)
while (!g_interrupted && size > 0)
#else
while (size > 0)
while (size > 0)
#endif
{
size_t write_avail;
slock_lock(dev->lock);
write_avail = fifo_write_avail(dev->buffer);
if (write_avail > size)
write_avail = size;
fifo_write(dev->buffer, buf, write_avail);
buf += write_avail;
written += write_avail;
size -= write_avail;
if (dev->nonblock)
{
size_t write_avail;
slock_lock(dev->lock);
write_avail = fifo_write_avail(dev->buffer);
if (write_avail > size)
write_avail = size;
fifo_write(dev->buffer, buf, write_avail);
buf += write_avail;
written += write_avail;
size -= write_avail;
slock_unlock(dev->lock);
break;
}
#if TARGET_OS_IPHONE
if (write_avail == 0 && !scond_wait_timeout(
dev->cond, dev->lock, 3000000))
g_interrupted = true;
if (write_avail == 0 && !scond_wait_timeout(
dev->cond, dev->lock, 3000000))
g_interrupted = true;
#else
if (write_avail == 0)
scond_wait(dev->cond, dev->lock);
if (write_avail == 0)
scond_wait(dev->cond, dev->lock);
#endif
slock_unlock(dev->lock);
}
slock_unlock(dev->lock);
}
return written;
+12 -27
View File
@@ -260,37 +260,22 @@ static bool g_interrupted;
- (ssize_t)writeFloat:(const float *)data samples:(size_t)samples {
size_t written = 0;
if (_nonBlock)
while (!g_interrupted && samples > 0)
{
if (!g_interrupted && samples > 0)
{
size_t write_avail = rb_avail(&_rb);
if (write_avail > samples)
write_avail = samples;
size_t write_avail = rb_avail(&_rb);
if (write_avail > samples)
write_avail = samples;
rb_write_data(&_rb, data, write_avail);
data += write_avail;
written += write_avail;
samples -= write_avail;
}
}
else
{
while (!g_interrupted && samples > 0)
{
size_t write_avail = rb_avail(&_rb);
if (write_avail > samples)
write_avail = samples;
rb_write_data(&_rb, data, write_avail);
data += write_avail;
written += write_avail;
samples -= write_avail;
rb_write_data(&_rb, data, write_avail);
data += write_avail;
written += write_avail;
samples -= write_avail;
if (_nonBlock)
break;
if (write_avail == 0)
dispatch_semaphore_wait(_sema, DISPATCH_TIME_FOREVER);
}
if (write_avail == 0)
dispatch_semaphore_wait(_sema, DISPATCH_TIME_FOREVER);
}
return written;
+1 -1
View File
@@ -17,7 +17,7 @@ typedef Thread compat_thread;
typedef CondVar compat_condvar;
#define compat_thread_create(thread, func, data, stack_size, prio, cpu) \
threadCreate(thread, func, data, stack_size, prio, cpu)
threadCreate(thread, func, data, NULL, stack_size, prio, cpu)
#define compat_thread_start(thread) \
threadStart(thread)
#define compat_thread_join(thread) \
@@ -232,7 +232,7 @@ static void *libnx_audren_thread_audio_init(const char *device, unsigned rate, u
svcGetThreadPriority(&thread_priority, CUR_THREAD_HANDLE);
rc = threadCreate(&aud->thread, &thread_job,
(void*)aud, thread_stack_size,
(void*)aud, NULL, thread_stack_size,
thread_priority - 1, thread_preferred_cpu);
if (R_FAILED(rc))
{
+2
View File
@@ -180,6 +180,8 @@ enum event_command
CMD_EVENT_DISK_NEXT,
/* Cycle to previous disk. */
CMD_EVENT_DISK_PREV,
/* Switch to specified disk index */
CMD_EVENT_DISK_INDEX,
/* Appends disk image to disk image list. */
CMD_EVENT_DISK_APPEND_IMAGE,
/* Stops rumbling. */
+4
View File
@@ -468,7 +468,9 @@ static bool quick_menu_show_save_core_overrides = true;
static bool quick_menu_show_save_game_overrides = true;
static bool quick_menu_show_save_content_dir_overrides = true;
#ifdef HAVE_NETWORKING
static bool quick_menu_show_download_thumbnails = true;
#endif
static bool kiosk_mode_enable = false;
@@ -507,6 +509,8 @@ static bool menu_savestate_resume = true;
static bool menu_savestate_resume = false;
#endif
#define DEFAULT_MENU_INSERT_DISK_RESUME true
static bool content_show_settings = true;
static bool content_show_favorites = true;
#ifdef HAVE_IMAGEVIEWER
+1
View File
@@ -1460,6 +1460,7 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
SETTING_BOOL("menu_horizontal_animation", &settings->bools.menu_horizontal_animation, true, DEFAULT_MENU_HORIZONTAL_ANIMATION, false);
SETTING_BOOL("menu_pause_libretro", &settings->bools.menu_pause_libretro, true, true, false);
SETTING_BOOL("menu_savestate_resume", &settings->bools.menu_savestate_resume, true, menu_savestate_resume, false);
SETTING_BOOL("menu_insert_disk_resume", &settings->bools.menu_insert_disk_resume, true, DEFAULT_MENU_INSERT_DISK_RESUME, false);
SETTING_BOOL("menu_mouse_enable", &settings->bools.menu_mouse_enable, true, DEFAULT_MOUSE_ENABLE, false);
SETTING_BOOL("menu_pointer_enable", &settings->bools.menu_pointer_enable, true, DEFAULT_POINTER_ENABLE, false);
SETTING_BOOL("menu_timedate_enable", &settings->bools.menu_timedate_enable, true, true, false);
+1
View File
@@ -154,6 +154,7 @@ typedef struct settings
bool menu_show_start_screen;
bool menu_pause_libretro;
bool menu_savestate_resume;
bool menu_insert_disk_resume;
bool menu_timedate_enable;
bool menu_battery_level_enable;
bool menu_core_enable;
+45 -22
View File
@@ -94,7 +94,13 @@ static unsigned sw_sws_threads;
static video_buffer_t *video_buffer;
static tpool_t *tpool;
#if LIBAVUTIL_VERSION_MAJOR > 55
/* If libavutil is at least version 55 or higher,
* and if libavcodec is at least version 57.80.100 or higher,
* enable hardware acceleration */
#define ENABLE_HW_ACCEL ((LIBAVUTIL_VERSION_MAJOR > 55) && ENABLE_HW_ACCEL_CHECK2())
#define ENABLE_HW_ACCEL_CHECK2() ((LIBAVCODEC_VERSION_MAJOR == 57 && LIBAVCODEC_VERSION_MINOR >= 80 && LIBAVCODEC_VERSION_MICRO >= 100) || (LIBAVCODEC_VERSION_MAJOR > 57))
#if ENABLE_HW_ACCEL
static enum AVHWDeviceType hw_decoder;
static bool hw_decoding_enabled;
static enum AVPixelFormat pix_fmt;
@@ -278,11 +284,11 @@ void CORE_PREFIX(retro_get_system_av_info)(struct retro_system_av_info *info)
void CORE_PREFIX(retro_set_environment)(retro_environment_t cb)
{
static const struct retro_variable vars[] = {
#if LIBAVUTIL_VERSION_MAJOR > 55
#if ENABLE_HW_ACCEL
{ "ffmpeg_hw_decoder", "Use Hardware decoder (restart); off|auto|"
"cuda|d3d11va|drm|dxva2|mediacodec|opencl|qsv|vaapi|vdpau|videotoolbox" },
#endif
{ "ffmpeg_sw_decoder_threads", "Software decoder thread count (restart); auto|1|2|4|8|16" },
{ "ffmpeg_sw_decoder_threads", "Software decoder thread count (restart); auto|1|2|4|6|8|10|12|14|16" },
#if defined(HAVE_OPENGL) || defined(HAVE_OPENGLES)
{ "ffmpeg_temporal_interp", "Temporal Interpolation; disabled|enabled" },
#ifdef HAVE_GL_FFT
@@ -409,7 +415,7 @@ static void check_variables(bool firststart)
slock_unlock(decode_thread_lock);
}
#if LIBAVUTIL_VERSION_MAJOR > 55
#if ENABLE_HW_ACCEL
if (firststart)
{
hw_var.key = "ffmpeg_hw_decoder";
@@ -837,7 +843,7 @@ void CORE_PREFIX(retro_run)(void)
CORE_PREFIX(audio_batch_cb)(audio_buffer, to_read_frames);
}
#if LIBAVUTIL_VERSION_MAJOR > 55
#if ENABLE_HW_ACCEL
/*
* Try to initialize a specific HW decoder defined by type.
* Optionaly tests the pixel format list for a compatible pixel format.
@@ -936,7 +942,7 @@ static enum AVPixelFormat select_decoder(AVCodecContext *ctx,
{
enum AVPixelFormat format = AV_PIX_FMT_NONE;
#if LIBAVUTIL_VERSION_MAJOR > 55
#if ENABLE_HW_ACCEL
if (!force_sw_decoder)
{
if (hw_decoder == AV_HWDEVICE_TYPE_NONE)
@@ -960,7 +966,7 @@ static enum AVPixelFormat select_decoder(AVCodecContext *ctx,
format = fctx->streams[video_stream_index]->codec->pix_fmt;
#if LIBAVUTIL_VERSION_MAJOR > 55
#if ENABLE_HW_ACCEL
hw_decoding_enabled = false;
}
else
@@ -970,7 +976,7 @@ static enum AVPixelFormat select_decoder(AVCodecContext *ctx,
return format;
}
#if LIBAVUTIL_VERSION_MAJOR > 55
#if ENABLE_HW_ACCEL
/* Callback used by ffmpeg to configure the pixelformat to use. */
static enum AVPixelFormat get_format(AVCodecContext *ctx,
const enum AVPixelFormat *pix_fmts)
@@ -1005,7 +1011,7 @@ static bool open_codec(AVCodecContext **ctx, enum AVMediaType type, unsigned ind
{
video_stream_index = index;
#if LIBAVUTIL_VERSION_MAJOR > 55
#if ENABLE_HW_ACCEL
vctx->get_format = get_format;
pix_fmt = select_decoder((*ctx), NULL);
#else
@@ -1293,7 +1299,7 @@ static void sws_worker_thread(void *arg)
AVFrame *tmp_frame = NULL;
video_decoder_context_t *ctx = (video_decoder_context_t*) arg;
#if LIBAVUTIL_VERSION_MAJOR > 55
#if ENABLE_HW_ACCEL
if (hw_decoding_enabled)
tmp_frame = ctx->hw_source;
else
@@ -1336,7 +1342,7 @@ static void sws_worker_thread(void *arg)
#endif
av_frame_unref(ctx->source);
#if LIBAVUTIL_VERSION_MAJOR > 55
#if ENABLE_HW_ACCEL
av_frame_unref(ctx->hw_source);
#endif
@@ -1394,7 +1400,7 @@ static void decode_video(AVCodecContext *ctx, AVPacket *pkt, size_t frame_size)
goto end;
}
#if LIBAVUTIL_VERSION_MAJOR > 55
#if ENABLE_HW_ACCEL
if (hw_decoding_enabled)
/* Copy data from VRAM to RAM */
if ((ret = av_hwframe_transfer_data(decoder_ctx->hw_source, decoder_ctx->source, 0)) < 0)
@@ -1530,8 +1536,16 @@ static void decode_thread_seek(double time)
#endif
}
static bool earlier_or_close_enough(double p1, double p2) {
return (p1 <= p2 || (p1-p2) <= 0.001);
/**
* This function makes sure that we don't decode too many
* packets and cause stalls in our decoding pipeline.
* This could happen if we decode too many packets and
* saturate our buffers. We have a window of "still okay"
* to decode, that depends on the media fps.
**/
static bool earlier_or_close_enough(double p1, double p2)
{
return (p1 <= p2 || (p1-p2) < (1.0 / media.interpolate_fps) );
}
static void decode_thread(void *data)
@@ -1643,15 +1657,17 @@ static void decode_thread(void *data)
/*
* Decode audio packet if:
* 1. there is a vido packet for in the buffer
* 2. it's the start of file
* 3. it's audio only media
* 4. EOF
* 1. it's the start of file or it's audio only media
* 2. there is a video packet for in the buffer
* 3. EOF
**/
if (!packet_buffer_empty(audio_packet_buffer) &&
((!eof && earlier_or_close_enough(next_audio_start, next_video_end)) ||
next_video_end == 0.0 ||
eof))
(
next_video_end == 0.0 ||
(!eof && earlier_or_close_enough(next_audio_start, next_video_end)) ||
eof
)
)
{
packet_buffer_get_packet(audio_packet_buffer, pkt);
last_audio_end = audio_timebase * (pkt->pts + pkt->duration);
@@ -1668,7 +1684,12 @@ static void decode_thread(void *data)
* 3. EOF
**/
if (!packet_buffer_empty(video_packet_buffer) &&
((!eof && earlier_or_close_enough(next_video_end, last_audio_end)) || !actx_active || eof ))
(
(!eof && earlier_or_close_enough(next_video_end, last_audio_end)) ||
!actx_active ||
eof
)
)
{
packet_buffer_get_packet(video_packet_buffer, pkt);
@@ -1733,8 +1754,10 @@ static void decode_thread(void *data)
for (i = 0; (int)i < audio_streams_num; i++)
swr_free(&swr[i]);
#if ENABLE_HW_ACCEL
if (vctx && vctx->hw_device_ctx)
av_buffer_unref(&vctx->hw_device_ctx);
#endif
packet_buffer_destroy(audio_packet_buffer);
packet_buffer_destroy(video_packet_buffer);
+3
View File
@@ -1,7 +1,10 @@
#include "internal.h"
#include <stddef.h>
#if !defined( __CELLOS_LV2__) && !defined(__MWERKS__)
#include <memory.h>
#endif
#include <string.h>
void rc_parse_trigger_internal(rc_trigger_t* self, const char** memaddr, rc_parse_state_t* parse) {
rc_condset_t** next;
+3
View File
@@ -1,6 +1,9 @@
#include "internal.h"
#if !defined( __CELLOS_LV2__) && !defined(__MWERKS__)
#include <memory.h>
#endif
#include <string.h>
static void rc_parse_cond_value(rc_value_t* self, const char** memaddr, rc_parse_state_t* parse) {
rc_condition_t** next;
+1 -1
View File
@@ -691,7 +691,7 @@ static void frontend_switch_init(void *data)
uint32_t width = 0;
uint32_t height = 0;
nifmInitialize();
nifmInitialize(NifmServiceType_User);
if(hosversionBefore(8, 0, 0))
pcvInitialize();
+1
View File
@@ -69,6 +69,7 @@ static frontend_ctx_driver_t frontend_ctx_null = {
NULL, /* get_cpu_model_name */
NULL, /* get_user_language */
"null",
NULL, /* get_video_driver */
};
static frontend_ctx_driver_t *frontend_ctx_drivers[] = {
+2
View File
@@ -1687,9 +1687,11 @@ static bool gfx_ctx_wl_set_video_mode(void *data,
return true;
#if defined(HAVE_EGL) || defined(HAVE_VULKAN)
error:
gfx_ctx_wl_destroy(data);
return false;
#endif
}
bool input_wl_init(void *data, const char *joypad_name);
+12 -14
View File
@@ -7,20 +7,18 @@ PREFIX := /usr
INSTALLDIR := $(PREFIX)/lib/retroarch/filters/video
ifeq ($(platform),)
platform = unix
ifeq ($(shell uname -a),)
platform = win
else ifneq ($(findstring MINGW,$(shell uname -a)),)
platform = win
else ifneq ($(findstring Darwin,$(shell uname -a)),)
platform = osx
arch = intel
ifeq ($(shell uname -p),powerpc)
arch = ppc
endif
else ifneq ($(findstring win,$(shell uname -a)),)
platform = win
endif
platform = unix
ifeq ($(shell uname -s),)
platform = win
else ifneq ($(findstring Darwin,$(shell uname -s)),)
platform = osx
arch = intel
ifeq ($(shell uname -p),powerpc)
arch = ppc
endif
else ifneq ($(findstring MINGW,$(shell uname -s)),)
platform = win
endif
endif
ifeq ($(platform),gcc)
-8
View File
@@ -618,10 +618,6 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_DIRECTORY_NOT_FOUND,
"没有找到文件夹。")
MSG_HASH(MENU_ENUM_LABEL_VALUE_DIRECTORY_SETTINGS,
"文件夹")
MSG_HASH(MENU_ENUM_LABEL_VALUE_DISK_CYCLE_TRAY_STATUS,
"Disk Cycle Tray Status")
MSG_HASH(MENU_ENUM_LABEL_VALUE_DISK_IMAGE_APPEND,
"追加光盘镜像")
MSG_HASH(MENU_ENUM_LABEL_VALUE_DISK_INDEX,
"光盘索引")
MSG_HASH(MENU_ENUM_LABEL_VALUE_DISK_OPTIONS,
@@ -3097,12 +3093,8 @@ MSG_HASH(MENU_ENUM_SUBLABEL_NETPLAY_INPUT_LATENCY_FRAMES_RANGE,
"设置按键延迟范围以掩盖网络的延迟。\n"
"用一定的按键延迟换取在线游戏时\n"
"降低 CPU 负载并减少顿卡。")
MSG_HASH(MENU_ENUM_SUBLABEL_DISK_INDEX,
"更改磁盘索引。")
MSG_HASH(MENU_ENUM_SUBLABEL_DISK_OPTIONS,
"管理磁盘映像。")
MSG_HASH(MENU_ENUM_SUBLABEL_DISK_IMAGE_APPEND,
"选择要插入的磁盘映像。")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_ENUM_THROTTLE_FRAMERATE,
"确保菜单内的帧率上限。")
MSG_HASH(MENU_ENUM_SUBLABEL_VRR_RUNLOOP_ENABLE,
-4
View File
@@ -564,10 +564,6 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_DIRECTORY_NOT_FOUND,
"沒有找到文件夾。")
MSG_HASH(MENU_ENUM_LABEL_VALUE_DIRECTORY_SETTINGS,
"目錄")
MSG_HASH(MENU_ENUM_LABEL_VALUE_DISK_CYCLE_TRAY_STATUS,
"Disk Cycle Tray Status")
MSG_HASH(MENU_ENUM_LABEL_VALUE_DISK_IMAGE_APPEND,
"追加光碟鏡像")
MSG_HASH(MENU_ENUM_LABEL_VALUE_DISK_INDEX,
"光碟索引")
MSG_HASH(MENU_ENUM_LABEL_VALUE_DISK_OPTIONS,
-10
View File
@@ -597,10 +597,6 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_DIRECTORY_NOT_FOUND,
"Verzeichnis nicht gefunden.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_DIRECTORY_SETTINGS,
"Verzeichnisse")
MSG_HASH(MENU_ENUM_LABEL_VALUE_DISK_CYCLE_TRAY_STATUS,
"Datentägerstatus")
MSG_HASH(MENU_ENUM_LABEL_VALUE_DISK_IMAGE_APPEND,
"Füge Datenträgerabbild hinzu")
MSG_HASH(MENU_ENUM_LABEL_VALUE_DISK_INDEX,
"Datenträger-Nummer")
MSG_HASH(MENU_ENUM_LABEL_VALUE_DISK_OPTIONS,
@@ -3026,14 +3022,8 @@ MSG_HASH(MENU_ENUM_SUBLABEL_NETPLAY_INPUT_LATENCY_FRAMES_MIN,
"Eingabeverzögerung in Einzelbildern, die im Netplay verwendet wird, um die Netzwerklatenz zu verbergen. Reduziert Bildruckeln und CPU-Last, verursacht jedoch erkennbare Eingabeverzögerung.")
MSG_HASH(MENU_ENUM_SUBLABEL_NETPLAY_INPUT_LATENCY_FRAMES_RANGE,
"Der Bereich der Eingabeverzögerung in Einzelbildern, die im Netplay verwendet werden kann, um die Netzwerklatenz zu verbergen. Reduziert Bildruckeln und CPU-Last, verursacht jedoch unvorhersehbare Eingabeverzögerungen.")
MSG_HASH(MENU_ENUM_SUBLABEL_DISK_CYCLE_TRAY_STATUS,
"Datenträger auswerfen/einlegen. Wenn der Datenträger eingelegt ist, wird er ausgeworfen. Wenn er noch nicht eingelegt wurde, wird er jetzt eingelegt. ")
MSG_HASH(MENU_ENUM_SUBLABEL_DISK_INDEX,
"Ändere den Datenträger-Index.")
MSG_HASH(MENU_ENUM_SUBLABEL_DISK_OPTIONS,
"Verwaltung von Datenträger-Abbildern.")
MSG_HASH(MENU_ENUM_SUBLABEL_DISK_IMAGE_APPEND,
"Wähle ein Datenträger-Abbild, das eingelegt werden soll.")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_ENUM_THROTTLE_FRAMERATE,
"Stelle sicher, dass die Bildwiederholrate im Menü begrenzt wird.")
MSG_HASH(MENU_ENUM_SUBLABEL_XMB_LAYOUT,
+4
View File
@@ -1348,6 +1348,8 @@ int menu_hash_get_help_es_enum(enum msg_hash_enums msg, char *s, size_t len)
"o similar a 60 Hz, desactiva la sincronía\n"
"vertical y deja esta opción en su valor\n"
"predeterminado.");
strlcpy(s, t, len);
strlcat(s, u, len);
}
break;
case MENU_ENUM_LABEL_VIDEO_REFRESH_RATE_POLLED:
@@ -1860,6 +1862,8 @@ int menu_hash_get_help_es_enum(enum msg_hash_enums msg, char *s, size_t len)
"Selecciona cero para no hacer comprobaciones.\n"
"Este valor es usado únicamente por el servidor\n"
"de juego en red.");
strlcpy(s, t, len);
strlcat(s, u, len);
}
break;
case MENU_ENUM_LABEL_NETPLAY_INPUT_LATENCY_FRAMES_MIN:
-20
View File
@@ -808,14 +808,6 @@ MSG_HASH(
MENU_ENUM_LABEL_VALUE_DIRECTORY_SETTINGS,
"Carpeta"
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_DISK_CYCLE_TRAY_STATUS,
"Abrir/Cerrar la bandeja de disco"
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_DISK_IMAGE_APPEND,
"Asignar imagen de disco"
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_DISK_INDEX,
"Índice de disco"
@@ -6667,22 +6659,10 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_NETPLAY_INPUT_LATENCY_FRAMES_RANGE,
"Indica el rango de fotogramas de entrada a usar para ocultar la latencia durante el juego en red. Reduce los tirones y el uso de la CPU a costa de incrementar la latencia de entrada."
)
MSG_HASH(
MENU_ENUM_SUBLABEL_DISK_CYCLE_TRAY_STATUS,
"Cambia de disco. Si hay un disco introducido, será expulsado. De lo contrario, se introducirá."
)
MSG_HASH(
MENU_ENUM_SUBLABEL_DISK_INDEX,
"Cambia el índice del disco."
)
MSG_HASH(
MENU_ENUM_SUBLABEL_DISK_OPTIONS,
"Administra las imágenes de disco."
)
MSG_HASH(
MENU_ENUM_SUBLABEL_DISK_IMAGE_APPEND,
"Selecciona una imagen de disco a insertar."
)
MSG_HASH(
MENU_ENUM_SUBLABEL_MENU_ENUM_THROTTLE_FRAMERATE,
"Limita los FPS del menú."
-20
View File
@@ -808,14 +808,6 @@ MSG_HASH(
MENU_ENUM_LABEL_VALUE_DIRECTORY_SETTINGS,
"Dossiers"
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_DISK_CYCLE_TRAY_STATUS,
"État du plateau du lecteur de disque"
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_DISK_IMAGE_APPEND,
"Ajouter une image disque"
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_DISK_INDEX,
"Numéro du disque"
@@ -6648,22 +6640,10 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_NETPLAY_INPUT_LATENCY_FRAMES_RANGE,
"Plage d'images de latence des entrées pouvant être utilisée pour masquer la latence du réseau. Réduit les variations de la latence et rend le jeu en réseau moins gourmand en ressources processeur, aux dépens d'une latence des entrées imprévisible."
)
MSG_HASH(
MENU_ENUM_SUBLABEL_DISK_CYCLE_TRAY_STATUS,
"Faire défiler l'état du disque actuel. Si le disque est inséré, il sera éjecté. Si le disque n'a pas été inséré, il sera inséré. "
)
MSG_HASH(
MENU_ENUM_SUBLABEL_DISK_INDEX,
"Changer le numéro du disque."
)
MSG_HASH(
MENU_ENUM_SUBLABEL_DISK_OPTIONS,
"Gestionnaire d'images disque."
)
MSG_HASH(
MENU_ENUM_SUBLABEL_DISK_IMAGE_APPEND,
"Sélectionner une image disque à insérer."
)
MSG_HASH(
MENU_ENUM_SUBLABEL_MENU_ENUM_THROTTLE_FRAMERATE,
"S'assure que le nombre d'images par seconde est plafonné dans le menu."
-10
View File
@@ -601,10 +601,6 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_DIRECTORY_NOT_FOUND,
"Cartella non trovata.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_DIRECTORY_SETTINGS,
"Cartella")
MSG_HASH(MENU_ENUM_LABEL_VALUE_DISK_CYCLE_TRAY_STATUS,
"Stato del ciclo nel vassoio del disco")
MSG_HASH(MENU_ENUM_LABEL_VALUE_DISK_IMAGE_APPEND,
"Aggiungere Immagine disco")
MSG_HASH(MENU_ENUM_LABEL_VALUE_DISK_INDEX,
"Indice del Disco ")
MSG_HASH(MENU_ENUM_LABEL_VALUE_DISK_OPTIONS,
@@ -3062,14 +3058,8 @@ MSG_HASH(MENU_ENUM_SUBLABEL_NETPLAY_INPUT_LATENCY_FRAMES_MIN,
"Il numero della latenza nei fotogrammi di input per il netplay da utilizzare per nascondere la latenza di rete. Riduce il jitter e rende il netplay meno intenso di CPU, a scapito di un ritardo di input notevole.")
MSG_HASH(MENU_ENUM_SUBLABEL_NETPLAY_INPUT_LATENCY_FRAMES_RANGE,
"L'intervallo della latenza nei fotogrammi di input che può essere utilizzato per nascondere la latenza di rete. Riduce il jitter e rende il netplay meno intenso di CPU, a scapito di un imprevisto ritardo di input.")
MSG_HASH(MENU_ENUM_SUBLABEL_DISK_CYCLE_TRAY_STATUS,
"Cicli del disco corrente. Se il disco è inserito, espellerà il disco. Se il disco non è stato inserito, verrà inserito. ")
MSG_HASH(MENU_ENUM_SUBLABEL_DISK_INDEX,
"Cambia l'indice del disco.")
MSG_HASH(MENU_ENUM_SUBLABEL_DISK_OPTIONS,
"Gestione delle immagini disco.")
MSG_HASH(MENU_ENUM_SUBLABEL_DISK_IMAGE_APPEND,
"Seleziona un'immagine disco da inserire")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_ENUM_THROTTLE_FRAMERATE,
"Assicura che i fotogrammi siano attivi all'interno del menu.")
MSG_HASH(MENU_ENUM_SUBLABEL_XMB_LAYOUT,
-21
View File
@@ -808,14 +808,6 @@ MSG_HASH(
MENU_ENUM_LABEL_VALUE_DIRECTORY_SETTINGS,
"ディレクトリ"
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_DISK_CYCLE_TRAY_STATUS,
"ディスクトレイを開閉"
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_DISK_IMAGE_APPEND,
"ディスクイメージを挿入"
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_DISK_INDEX,
"ディスクインデックス"
@@ -6416,23 +6408,10 @@ MSG_HASH(
"ネットワーク遅延を隠すために使用される可能性がある入力遅延フレームの範囲です。 "
"予期しない入力遅延を犠牲にして, ジッタを減らし, ネットプレイのCPU使用率を減らします。"
)
MSG_HASH(
MENU_ENUM_SUBLABEL_DISK_CYCLE_TRAY_STATUS,
"ディスクトレイの状態を変更します。 "
"ディスクが挿入されていればそのディスクを排出し, 未挿入であればディスクを挿入します。"
)
MSG_HASH(
MENU_ENUM_SUBLABEL_DISK_INDEX,
"ディスクのインデックスを変更します。"
)
MSG_HASH(
MENU_ENUM_SUBLABEL_DISK_OPTIONS,
"ディスクのイメージ管理"
)
MSG_HASH(
MENU_ENUM_SUBLABEL_DISK_IMAGE_APPEND,
"ディスクイメージを追加します。"
)
MSG_HASH(
MENU_ENUM_SUBLABEL_MENU_ENUM_THROTTLE_FRAMERATE,
"メニュー内でフレームレートが制限されていることを確認します。"
-20
View File
@@ -799,14 +799,6 @@ MSG_HASH(
MENU_ENUM_LABEL_VALUE_DIRECTORY_SETTINGS,
"디렉토리"
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_DISK_CYCLE_TRAY_STATUS,
"디스크 사이클 트레이 상태"
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_DISK_IMAGE_APPEND,
"디스크 이미지 추가"
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_DISK_INDEX,
"디스크 인덱스"
@@ -6385,22 +6377,10 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_NETPLAY_INPUT_LATENCY_FRAMES_RANGE,
"네트워크 지연을 숨기기 위해 사용하는 입력 대기 프레임 범위입니다. 예측 불가능한 입력 지연으로 지터를 줄이고 넷플레이의 CPU 사용을 줄입니다."
)
MSG_HASH(
MENU_ENUM_SUBLABEL_DISK_CYCLE_TRAY_STATUS,
"현재 디스크를 전환합니다. 삽입된 디스크가 있으면 꺼내지고 디스크가 없으면 디스크를 삽입합니다. "
)
MSG_HASH(
MENU_ENUM_SUBLABEL_DISK_INDEX,
"디스크 인덱스를 변경합니다."
)
MSG_HASH(
MENU_ENUM_SUBLABEL_DISK_OPTIONS,
"디스크 이미지를 관리합니다."
)
MSG_HASH(
MENU_ENUM_SUBLABEL_DISK_IMAGE_APPEND,
"삽입할 디스크 이미지를 선택하십시오."
)
MSG_HASH(
MENU_ENUM_SUBLABEL_MENU_ENUM_THROTTLE_FRAMERATE,
"메뉴상에 있을 시의 프레임 제한을 설정합니다."
+21 -4
View File
@@ -189,8 +189,7 @@ MSG_HASH(MENU_ENUM_LABEL_COLLECTION,
MSG_HASH(MENU_ENUM_LABEL_CONFIGURATIONS,
"configurations")
MSG_HASH(MENU_ENUM_LABEL_CONFIGURATION_SETTINGS,
"Determines how configuration files \n"
"are loaded and prioritized.")
"configuration_settings")
MSG_HASH(MENU_ENUM_LABEL_CONFIG_SAVE_ON_EXIT,
"config_save_on_exit")
MSG_HASH(MENU_ENUM_LABEL_CONNECT_WIFI,
@@ -299,6 +298,8 @@ MSG_HASH(MENU_ENUM_LABEL_DEFERRED_DROPDOWN_BOX_LIST_PLAYLIST_RIGHT_THUMBNAIL_MOD
"deferred_dropdown_box_list_playlist_right_thumbnail_mode")
MSG_HASH(MENU_ENUM_LABEL_DEFERRED_DROPDOWN_BOX_LIST_PLAYLIST_LEFT_THUMBNAIL_MODE,
"deferred_dropdown_box_list_playlist_left_thumbnail_mode")
MSG_HASH(MENU_ENUM_LABEL_DEFERRED_DROPDOWN_BOX_LIST_DISK_INDEX,
"deferred_dropdown_box_list_disk_index")
MSG_HASH(MENU_ENUM_LABEL_DEFERRED_CONFIGURATIONS_LIST,
"deferred_configurations_list")
MSG_HASH(MENU_ENUM_LABEL_DEFERRED_PLAYLIST_LIST,
@@ -477,8 +478,10 @@ MSG_HASH(MENU_ENUM_LABEL_FAVORITES,
"favorites")
MSG_HASH(MENU_ENUM_LABEL_DIRECTORY_SETTINGS,
"directory_settings")
MSG_HASH(MENU_ENUM_LABEL_DISK_CYCLE_TRAY_STATUS,
"disk_cycle_tray_status")
MSG_HASH(MENU_ENUM_LABEL_DISK_TRAY_EJECT,
"disk_tray_eject")
MSG_HASH(MENU_ENUM_LABEL_DISK_TRAY_INSERT,
"disk_tray_insert")
MSG_HASH(MENU_ENUM_LABEL_DISK_IMAGE_APPEND,
"disk_image_append")
MSG_HASH(MENU_ENUM_LABEL_SUBSYSTEM_ADD,
@@ -939,6 +942,8 @@ MSG_HASH(MENU_ENUM_LABEL_PAUSE_LIBRETRO,
"menu_pause_libretro")
MSG_HASH(MENU_ENUM_LABEL_MENU_SAVESTATE_RESUME,
"menu_savestate_resume")
MSG_HASH(MENU_ENUM_LABEL_MENU_INSERT_DISK_RESUME,
"menu_insert_disk_resume")
MSG_HASH(MENU_ENUM_LABEL_PAUSE_NONACTIVE,
"pause_nonactive")
MSG_HASH(MENU_ENUM_LABEL_PERFCNT_ENABLE,
@@ -969,6 +974,8 @@ MSG_HASH(MENU_ENUM_LABEL_PLAYLIST_MANAGER_RIGHT_THUMBNAIL_MODE,
"playlist_manager_right_thumbnail_mode")
MSG_HASH(MENU_ENUM_LABEL_PLAYLIST_MANAGER_LEFT_THUMBNAIL_MODE,
"playlist_manager_left_thumbnail_mode")
MSG_HASH(MENU_ENUM_LABEL_PLAYLIST_MANAGER_CLEAN_PLAYLIST,
"playlist_manager_clean_playlist")
MSG_HASH(MENU_ENUM_LABEL_PLAYLIST_SETTINGS_BEGIN,
"playlist_settings_begin")
MSG_HASH(MENU_ENUM_LABEL_POINTER_ENABLE,
@@ -1307,6 +1314,8 @@ MSG_HASH(MENU_ENUM_LABEL_THUMBNAILS_UPDATER_LIST,
"thumbnails_updater_list")
MSG_HASH(MENU_ENUM_LABEL_PL_THUMBNAILS_UPDATER_LIST,
"pl_thumbnails_updater_list")
MSG_HASH(MENU_ENUM_LABEL_PL_THUMBNAILS_UPDATER_ENTRY,
"pl_thumbnails_updater_entry")
MSG_HASH(MENU_ENUM_LABEL_TIMEDATE_ENABLE,
"menu_timedate_enable")
MSG_HASH(MENU_ENUM_LABEL_TIMEDATE_STYLE,
@@ -2095,6 +2104,8 @@ MSG_HASH(MENU_ENUM_LABEL_SETTINGS_SHOW_INPUT,
"settings_show_input")
MSG_HASH(MENU_ENUM_LABEL_ACCESSIBILITY_SETTINGS,
"accessibility_settings")
MSG_HASH(MENU_ENUM_LABEL_POWER_MANAGEMENT_SETTINGS,
"power_management_settings")
MSG_HASH(MENU_ENUM_LABEL_AI_SERVICE_SETTINGS,
"ai_service_settings")
MSG_HASH(MENU_ENUM_LABEL_AI_SERVICE_MODE,
@@ -2203,3 +2214,9 @@ MSG_HASH(MENU_ENUM_LABEL_INPUT_TURBO_MODE,
"input_turbo_mode")
MSG_HASH(MENU_ENUM_LABEL_INPUT_TURBO_DEFAULT_BUTTON,
"input_turbo_default_button")
MSG_HASH(MENU_ENUM_LABEL_MENU_VIEWS_SETTINGS,
"menu_views_settings")
MSG_HASH(MENU_ENUM_LABEL_QUICK_MENU_VIEWS_SETTINGS,
"quick_menu_views_settings")
MSG_HASH(MENU_ENUM_LABEL_SETTINGS_VIEWS_SETTINGS,
"settings_views_settings")
-4
View File
@@ -456,10 +456,6 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_DIRECTORY_NOT_FOUND,
"Map niet gevonden.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_DIRECTORY_SETTINGS,
"Map")
MSG_HASH(MENU_ENUM_LABEL_VALUE_DISK_CYCLE_TRAY_STATUS,
"Disk Cycle Tray Status")
MSG_HASH(MENU_ENUM_LABEL_VALUE_DISK_IMAGE_APPEND,
"Disk Image Toevoegen")
MSG_HASH(MENU_ENUM_LABEL_VALUE_DISK_INDEX,
"Disk Index")
MSG_HASH(MENU_ENUM_LABEL_VALUE_DISK_OPTIONS,
-10
View File
@@ -629,10 +629,6 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_DIRECTORY_NOT_FOUND,
"Nie znaleziono katalogu.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_DIRECTORY_SETTINGS,
"Szczegóły")
MSG_HASH(MENU_ENUM_LABEL_VALUE_DISK_CYCLE_TRAY_STATUS,
"Status podajnika cyklu dysku")
MSG_HASH(MENU_ENUM_LABEL_VALUE_DISK_IMAGE_APPEND,
"Dołącz obraz dysku")
MSG_HASH(MENU_ENUM_LABEL_VALUE_DISK_INDEX,
"Indeks dysku")
MSG_HASH(MENU_ENUM_LABEL_VALUE_DISK_OPTIONS,
@@ -3165,14 +3161,8 @@ MSG_HASH(MENU_ENUM_SUBLABEL_NETPLAY_INPUT_LATENCY_FRAMES_MIN,
"Liczba klatek opóźnienia wejściowego dla netplay do wykorzystania do ukrycia opóźnień sieci. Zmniejsza drgania i sprawia, że gra jest mniej intensywna, kosztem zauważalnego opóźnienia wejścia.")
MSG_HASH(MENU_ENUM_SUBLABEL_NETPLAY_INPUT_LATENCY_FRAMES_RANGE,
"Zakres klatek opóźnień wejściowych, które można wykorzystać do ukrycia opóźnień sieci. Zmniejsza fluktuacje i sprawia, że netplay jest mniej obciążający procesor, kosztem nieprzewidywalnego opóźnienia wejściowego.")
MSG_HASH(MENU_ENUM_SUBLABEL_DISK_CYCLE_TRAY_STATUS,
"Cykluj bieżący dysk. Jeśli dysk zostanie włożony, wyskoczy. Jeśli dysk nie został włożony, zostanie włożony. ")
MSG_HASH(MENU_ENUM_SUBLABEL_DISK_INDEX,
"Zmień indeks dysku.")
MSG_HASH(MENU_ENUM_SUBLABEL_DISK_OPTIONS,
"Zarządzanie obrazem dysku.")
MSG_HASH(MENU_ENUM_SUBLABEL_DISK_IMAGE_APPEND,
"Wybierz obraz dysku, który chcesz wstawić.")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_ENUM_THROTTLE_FRAMERATE,
"Upewnia się, że liczba klatek na sekundę jest ograniczona w menu.")
MSG_HASH(MENU_ENUM_SUBLABEL_XMB_LAYOUT,
-20
View File
@@ -800,14 +800,6 @@ MSG_HASH(
MENU_ENUM_LABEL_VALUE_DIRECTORY_SETTINGS,
"Diretório"
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_DISK_CYCLE_TRAY_STATUS,
"Condição da Bandeja do Ciclo de Disco"
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_DISK_IMAGE_APPEND,
"Anexar Imagem de Disco"
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_DISK_INDEX,
"Índice de Disco"
@@ -6572,22 +6564,10 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_NETPLAY_INPUT_LATENCY_FRAMES_RANGE,
"O intervalo de quadros de latência de entrada que pode ser utilizado para mascarar a latência da rede. Reduz a oscilação e torna o jogo em rede menos intensivo para a CPU, ao custo de atraso imprevisível na entrada."
)
MSG_HASH(
MENU_ENUM_SUBLABEL_DISK_CYCLE_TRAY_STATUS,
"Alterna o disco atual. Se o disco estiver inserido, o mesmo será ejetado. Se o disco não estiver inserido, o mesmo será inserido."
)
MSG_HASH(
MENU_ENUM_SUBLABEL_DISK_INDEX,
"Mude o índice do disco."
)
MSG_HASH(
MENU_ENUM_SUBLABEL_DISK_OPTIONS,
"Gerenciamento de imagem de disco."
)
MSG_HASH(
MENU_ENUM_SUBLABEL_DISK_IMAGE_APPEND,
"Selecione uma imagem de disco para inserir."
)
MSG_HASH(
MENU_ENUM_SUBLABEL_MENU_ENUM_THROTTLE_FRAMERATE,
"Certifica-se de que a taxa de quadros é controlada enquanto estiver dentro do menu."
-10
View File
@@ -557,10 +557,6 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_DIRECTORY_NOT_FOUND,
"Pasta não encontrada.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_DIRECTORY_SETTINGS,
"Pasta")
MSG_HASH(MENU_ENUM_LABEL_VALUE_DISK_CYCLE_TRAY_STATUS,
"Estado do ciclo do disco na área de notificação")
MSG_HASH(MENU_ENUM_LABEL_VALUE_DISK_IMAGE_APPEND,
"Adicionar imagem de disco")
MSG_HASH(MENU_ENUM_LABEL_VALUE_DISK_INDEX,
"Índice do disco")
MSG_HASH(MENU_ENUM_LABEL_VALUE_DISK_OPTIONS,
@@ -2903,14 +2899,8 @@ MSG_HASH(MENU_ENUM_SUBLABEL_NETPLAY_INPUT_LATENCY_FRAMES_MIN,
"O número de fotogramas de latência de entrada para o Netplay utilizar para ocultar a latência da rede. Reduz a instabilidade e faz com que a funcionalidade de Netplay seja menos exigente para o processador, com um custo perceptível de tempo de atraso.")
MSG_HASH(MENU_ENUM_SUBLABEL_NETPLAY_INPUT_LATENCY_FRAMES_RANGE,
"O intervalo de latência entre fotogramas pode ser usado para ocultar a latência da rede. Reduz a instabilidade e faz com que a funcionalidade de Netplay seja menos exigente para o processador, com um custo de latência imprevisível.")
MSG_HASH(MENU_ENUM_SUBLABEL_DISK_CYCLE_TRAY_STATUS,
"Ciclo do disco atual. Se o disco estiver inserido, o mesmo será ejetado. Caso contrário, ele será inserido. ")
MSG_HASH(MENU_ENUM_SUBLABEL_DISK_INDEX,
"Alterar o índice do disco.")
MSG_HASH(MENU_ENUM_SUBLABEL_DISK_OPTIONS,
"Gestão de imagens de disco.")
MSG_HASH(MENU_ENUM_SUBLABEL_DISK_IMAGE_APPEND,
"Selecione uma imagem de disco para inserir.")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_ENUM_THROTTLE_FRAMERATE,
"Certifique-se de que a taxa de fotogramas atingida enquanto estiver dentro do menu.")
MSG_HASH(MENU_ENUM_SUBLABEL_XMB_LAYOUT,
-10
View File
@@ -569,10 +569,6 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_DIRECTORY_NOT_FOUND,
"Каталог не найден.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_DIRECTORY_SETTINGS,
"Директории")
MSG_HASH(MENU_ENUM_LABEL_VALUE_DISK_CYCLE_TRAY_STATUS,
"Статус диска в приводе")
MSG_HASH(MENU_ENUM_LABEL_VALUE_DISK_IMAGE_APPEND,
"Добавить образ диска")
MSG_HASH(MENU_ENUM_LABEL_VALUE_DISK_INDEX,
"Индекс диска")
MSG_HASH(MENU_ENUM_LABEL_VALUE_DISK_OPTIONS,
@@ -2886,14 +2882,8 @@ MSG_HASH(MENU_ENUM_SUBLABEL_NETPLAY_INPUT_LATENCY_FRAMES_MIN,
"Количество кадров задержки ввода для netplay для сокрытия задержки сети. Уменьшает лаги и делает netplay менее требовательным к CPU, ценой значительной задержки ввода.")
MSG_HASH(MENU_ENUM_SUBLABEL_NETPLAY_INPUT_LATENCY_FRAMES_RANGE,
"Диапазон кадров задержки ввода для netplay для сокрытия задержки сети. Уменьшает лаги и делает netplay менее требовательным к CPU, ценой непредсказуемой задержки ввода.")
MSG_HASH(MENU_ENUM_SUBLABEL_DISK_CYCLE_TRAY_STATUS,
"Зацикливать текущий диск. Если вставлен диск, он будет извлечен. Если диск не вставлен, он будет вставлен.")
MSG_HASH(MENU_ENUM_SUBLABEL_DISK_INDEX,
"Изменить индекс диска.")
MSG_HASH(MENU_ENUM_SUBLABEL_DISK_OPTIONS,
"Управление образа диска.")
MSG_HASH(MENU_ENUM_SUBLABEL_DISK_IMAGE_APPEND,
"Выберите образ диска для загрузки.")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_ENUM_THROTTLE_FRAMERATE,
"Убедитесь, что частота кадров ограничена внутри меню.")
MSG_HASH(MENU_ENUM_SUBLABEL_XMB_LAYOUT,
-20
View File
@@ -795,14 +795,6 @@ MSG_HASH(
MENU_ENUM_LABEL_VALUE_DIRECTORY_SETTINGS,
"Dizin"
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_DISK_CYCLE_TRAY_STATUS,
"Disk Döngüsü Tepsisi Durumu"
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_DISK_IMAGE_APPEND,
"Disk Görüntüsü Ekleme"
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_DISK_INDEX,
"Disk Dizini"
@@ -6248,22 +6240,10 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_NETPLAY_INPUT_LATENCY_FRAMES_RANGE,
"Ağ gecikmesini gizlemek için kullanılabilecek giriş gecikmesi çerçevelerinin aralığı. Jitteri azaltır ve tahmin edilemeyen girdi gecikmesi pahasına netçeyi daha az CPU yoğun yapar."
)
MSG_HASH(
MENU_ENUM_SUBLABEL_DISK_CYCLE_TRAY_STATUS,
"Geçerli diski değiştirin. Disk yerleştirilmişse, diski çıkaracaktır. Eğer disk yerleştirilmemişse, yerleştirilecektir. "
)
MSG_HASH(
MENU_ENUM_SUBLABEL_DISK_INDEX,
"Disk indeksini değiştir."
)
MSG_HASH(
MENU_ENUM_SUBLABEL_DISK_OPTIONS,
"Disk image management."
)
MSG_HASH(
MENU_ENUM_SUBLABEL_DISK_IMAGE_APPEND,
"Eklenecek bir disk görüntüsü seçin."
)
MSG_HASH(
MENU_ENUM_SUBLABEL_MENU_ENUM_THROTTLE_FRAMERATE,
"Menünün içindeyken kare hızının kapatıldığından emin olun."
+51 -16
View File
@@ -801,17 +801,37 @@ MSG_HASH(
"Directory"
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_DISK_CYCLE_TRAY_STATUS,
"Cycle Disk Tray"
MENU_ENUM_LABEL_VALUE_DISK_TRAY_EJECT,
"Eject Disk"
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_DISK_IMAGE_APPEND,
MENU_ENUM_SUBLABEL_DISK_TRAY_EJECT,
"Opens virtual disk try and removes currently loaded disk. NOTE: If RetroArch is configured to pause while menu is active, some cores may not register changes unless content is resumed for a few seconds after each disk control action."
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_DISK_TRAY_INSERT,
"Insert Disk"
)
MSG_HASH(
MENU_ENUM_SUBLABEL_DISK_TRAY_INSERT,
"Inserts disk corresponding to 'Current Disk Index' and closes virtual disk tray. NOTE: If RetroArch is configured to pause while menu is active, some cores may not register changes unless content is resumed for a few seconds after each disk control action."
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_DISK_INDEX,
"Current Disk Index"
)
MSG_HASH(
MENU_ENUM_SUBLABEL_DISK_INDEX,
"Choose current disk from list of available images. Disk will be loaded when 'Insert Disk' is selected."
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_DISK_IMAGE_APPEND,
"Load New Disk"
)
MSG_HASH(
MENU_ENUM_SUBLABEL_DISK_IMAGE_APPEND,
"Eject current disk, select a new disk from the filesystem then insert it and close the virtual disk tray. NOTE: This is a legacy feature. It is instead recommended to load multi-disk titles via M3U playlists, which allow disk selection using the 'Eject/Insert Disk' and 'Current Disk Index' options."
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_DISK_OPTIONS,
"Disk Control"
@@ -2387,6 +2407,14 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_MENU_SAVESTATE_RESUME,
"Automatically close menu and resume current content after selecting 'Save State' or 'Load State' from the Quick Menu. Disabling this can improve save state performance on very slow devices."
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_MENU_INSERT_DISK_RESUME,
"Resume content after changing disks"
)
MSG_HASH(
MENU_ENUM_SUBLABEL_MENU_INSERT_DISK_RESUME,
"Automatically close menu and resume current content after selecting 'Insert Disk' or 'Load New Disk' from the Disk Control menu."
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_PAUSE_NONACTIVE,
"Don't run in background"
@@ -2479,6 +2507,22 @@ MSG_HASH(
MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_THUMBNAIL_MODE_DEFAULT,
"System Default"
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_CLEAN_PLAYLIST,
"Clean Playlist"
)
MSG_HASH(
MENU_ENUM_SUBLABEL_PLAYLIST_MANAGER_CLEAN_PLAYLIST,
"Remove invalid/duplicate entries and validate core associations."
)
MSG_HASH(
MSG_PLAYLIST_MANAGER_CLEANING_PLAYLIST,
"Cleaning playlist: "
)
MSG_HASH(
MSG_PLAYLIST_MANAGER_PLAYLIST_CLEANED,
"Playlist cleaned: "
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_POINTER_ENABLE,
"Touch Support"
@@ -6672,23 +6716,10 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_NETPLAY_INPUT_LATENCY_FRAMES_RANGE,
"The range of frames of input latency that may be used to hide network latency. Reduces jitter and makes netplay less CPU-intensive, at the expense of unpredictable input lag."
)
MSG_HASH(
MENU_ENUM_SUBLABEL_DISK_CYCLE_TRAY_STATUS,
"Cycle the current disk. If the disk is inserted, it will eject the disk. If the disk has not been inserted, it will be inserted. "
)
MSG_HASH(
MENU_ENUM_SUBLABEL_DISK_INDEX,
"Change the current disk if more than one is inserted. Open the tray before attempting to change disks.\n"
"If RetroArch is configured to pause on menu toggle the tray open/close action may not register in the core. If that's the case remember to go back to the game for a few frames after every disk control action."
)
MSG_HASH(
MENU_ENUM_SUBLABEL_DISK_OPTIONS,
"Disk image management."
)
MSG_HASH(
MENU_ENUM_SUBLABEL_DISK_IMAGE_APPEND,
"Select a disk image to insert."
)
MSG_HASH(
MENU_ENUM_SUBLABEL_MENU_ENUM_THROTTLE_FRAMERATE,
"Makes sure the framerate is capped while inside the menu."
@@ -10079,6 +10110,10 @@ MSG_HASH(
MENU_ENUM_LABEL_VALUE_DELETE_PLAYLIST,
"Delete Playlist"
)
MSG_HASH(
MENU_ENUM_SUBLABEL_DELETE_PLAYLIST,
"Remove playlist from filesystem."
)
#ifdef HAVE_LAKKA
MSG_HASH(
MENU_ENUM_LABEL_VALUE_LOCALAP_ENABLE,
-4
View File
@@ -421,10 +421,6 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_DIRECTORY_NOT_FOUND,
"Không tìm thấy thư mục.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_DIRECTORY_SETTINGS,
"Thư mục")
MSG_HASH(MENU_ENUM_LABEL_VALUE_DISK_CYCLE_TRAY_STATUS,
"Tình trạng khay đĩa")
MSG_HASH(MENU_ENUM_LABEL_VALUE_DISK_IMAGE_APPEND,
"Thêm đĩa")
MSG_HASH(MENU_ENUM_LABEL_VALUE_DISK_INDEX,
"Chỉ số đĩa")
MSG_HASH(MENU_ENUM_LABEL_VALUE_DISK_OPTIONS,
+4 -6
View File
@@ -8,17 +8,15 @@ INSTALLDIR := $(PREFIX)/lib/retroarch/filters/audio
ifeq ($(platform),)
platform = unix
ifeq ($(shell uname -a),)
ifeq ($(shell uname -s),)
platform = win
else ifneq ($(findstring MINGW,$(shell uname -a)),)
platform = win
else ifneq ($(findstring Darwin,$(shell uname -a)),)
else ifneq ($(findstring Darwin,$(shell uname -s)),)
platform = osx
arch = intel
arch = intel
ifeq ($(shell uname -p),powerpc)
arch = ppc
endif
else ifneq ($(findstring win,$(shell uname -a)),)
else ifneq ($(findstring MINGW,$(shell uname -s)),)
platform = win
endif
endif
+21 -13
View File
@@ -334,9 +334,11 @@ bool media_detect_cd_info(const char *path, uint64_t pregap_bytes, media_detect_
if (!memcmp(buf + offset, "SEGADISCSYSTEM", strlen("SEGADISCSYSTEM")))
{
const char *title_pos;
const char *serial_pos;
bool title_found = false;
const char *title_pos = NULL;
const char *serial_pos = NULL;
#if 0
bool title_found = false;
#endif
/* All discs currently in Redump for MCD start with SEGADISCSYSTEM. There are other strings mentioned elsewhere online,
* but I have not seen any real examples of them. */
@@ -366,11 +368,13 @@ bool media_detect_cd_info(const char *path, uint64_t pregap_bytes, media_detect_
}
else if (!memcmp(buf + offset, "SEGA SEGASATURN", strlen("SEGA SEGASATURN")))
{
const char *title_pos;
const char *serial_pos;
const char *version_pos;
const char *release_date_pos;
bool title_found = false;
const char *title_pos = NULL;
const char *serial_pos = NULL;
const char *version_pos = NULL;
const char *release_date_pos = NULL;
#if 0
bool title_found = false;
#endif
info->system_id = MEDIA_CD_SYSTEM_SATURN;
@@ -418,11 +422,13 @@ bool media_detect_cd_info(const char *path, uint64_t pregap_bytes, media_detect_
}
else if (!memcmp(buf + offset, "SEGA SEGAKATANA", strlen("SEGA SEGAKATANA")))
{
const char *title_pos;
const char *serial_pos;
const char *version_pos;
const char *release_date_pos;
bool title_found = false;
const char *title_pos = NULL;
const char *serial_pos = NULL;
const char *version_pos = NULL;
const char *release_date_pos = NULL;
#if 0
bool title_found = false;
#endif
info->system_id = MEDIA_CD_SYSTEM_DREAMCAST;
@@ -472,7 +478,9 @@ bool media_detect_cd_info(const char *path, uint64_t pregap_bytes, media_detect_
else if (!memcmp(buf + offset + (16 * sector_size), "\1CD001\1\0PLAYSTATION", 19))
{
const char *title_pos = NULL;
#if 0
bool title_found = false;
#endif
info->system_id = MEDIA_CD_SYSTEM_PSX;
+2
View File
@@ -664,6 +664,7 @@ generic_deferred_push_clear_general(deferred_push_dropdown_box_list_playlist_rig
generic_deferred_push_clear_general(deferred_push_dropdown_box_list_playlist_left_thumbnail_mode, PUSH_DEFAULT, DISPLAYLIST_DROPDOWN_LIST_PLAYLIST_LEFT_THUMBNAIL_MODE)
generic_deferred_push_clear_general(deferred_push_dropdown_box_list_manual_content_scan_system_name, PUSH_DEFAULT, DISPLAYLIST_DROPDOWN_LIST_MANUAL_CONTENT_SCAN_SYSTEM_NAME)
generic_deferred_push_clear_general(deferred_push_dropdown_box_list_manual_content_scan_core_name, PUSH_DEFAULT, DISPLAYLIST_DROPDOWN_LIST_MANUAL_CONTENT_SCAN_CORE_NAME)
generic_deferred_push_clear_general(deferred_push_dropdown_box_list_disk_index, PUSH_DEFAULT, DISPLAYLIST_DROPDOWN_LIST_DISK_INDEX)
static int menu_cbs_init_bind_deferred_push_compare_label(
menu_file_list_cbs_t *cbs,
@@ -690,6 +691,7 @@ static int menu_cbs_init_bind_deferred_push_compare_label(
{MENU_ENUM_LABEL_DEFERRED_DROPDOWN_BOX_LIST_PLAYLIST_LABEL_DISPLAY_MODE, deferred_push_dropdown_box_list_playlist_label_display_mode},
{MENU_ENUM_LABEL_DEFERRED_DROPDOWN_BOX_LIST_PLAYLIST_RIGHT_THUMBNAIL_MODE, deferred_push_dropdown_box_list_playlist_right_thumbnail_mode},
{MENU_ENUM_LABEL_DEFERRED_DROPDOWN_BOX_LIST_PLAYLIST_LEFT_THUMBNAIL_MODE, deferred_push_dropdown_box_list_playlist_left_thumbnail_mode},
{MENU_ENUM_LABEL_DEFERRED_DROPDOWN_BOX_LIST_DISK_INDEX, deferred_push_dropdown_box_list_disk_index},
{MENU_ENUM_LABEL_DEFERRED_BROWSE_URL_LIST, deferred_push_browse_url_list},
{MENU_ENUM_LABEL_DEFERRED_BROWSE_URL_START, deferred_push_browse_url_start},
{MENU_ENUM_LABEL_DEFERRED_CORE_SETTINGS_LIST, deferred_push_core_settings_list},
+6 -1
View File
@@ -650,7 +650,12 @@ static int core_setting_left(unsigned type, const char *label,
static int disk_options_disk_idx_left(unsigned type, const char *label,
bool wraparound)
{
command_event(CMD_EVENT_DISK_PREV, NULL);
/* Note: Menu itself provides visual feedback - no
* need to print info message to screen */
bool print_log = false;
command_event(CMD_EVENT_DISK_PREV, &print_log);
return 0;
}
+133 -23
View File
@@ -195,6 +195,8 @@ static enum msg_hash_enums action_ok_dl_to_enum(unsigned lbl)
return MENU_ENUM_LABEL_DEFERRED_DROPDOWN_BOX_LIST_MANUAL_CONTENT_SCAN_SYSTEM_NAME;
case ACTION_OK_DL_DROPDOWN_BOX_LIST_MANUAL_CONTENT_SCAN_CORE_NAME:
return MENU_ENUM_LABEL_DEFERRED_DROPDOWN_BOX_LIST_MANUAL_CONTENT_SCAN_CORE_NAME;
case ACTION_OK_DL_DROPDOWN_BOX_LIST_DISK_INDEX:
return MENU_ENUM_LABEL_DEFERRED_DROPDOWN_BOX_LIST_DISK_INDEX;
case ACTION_OK_DL_MIXER_STREAM_SETTINGS_LIST:
return MENU_ENUM_LABEL_DEFERRED_MIXER_STREAM_SETTINGS_LIST;
case ACTION_OK_DL_ACCOUNTS_LIST:
@@ -538,6 +540,15 @@ int generic_action_ok_displaylist_push(const char *path,
info.enum_idx = MENU_ENUM_LABEL_DEFERRED_DROPDOWN_BOX_LIST_MANUAL_CONTENT_SCAN_CORE_NAME;
dl_type = DISPLAYLIST_GENERIC;
break;
case ACTION_OK_DL_DROPDOWN_BOX_LIST_DISK_INDEX:
info.type = type;
info.directory_ptr = idx;
info_path = path;
info_label = msg_hash_to_str(
MENU_ENUM_LABEL_DEFERRED_DROPDOWN_BOX_LIST_DISK_INDEX);
info.enum_idx = MENU_ENUM_LABEL_DEFERRED_DROPDOWN_BOX_LIST_DISK_INDEX;
dl_type = DISPLAYLIST_GENERIC;
break;
case ACTION_OK_DL_USER_BINDS_LIST:
info.type = type;
info.directory_ptr = idx;
@@ -1763,9 +1774,16 @@ static int generic_action_ok(const char *path,
}
break;
case ACTION_OK_APPEND_DISK_IMAGE:
flush_type = MENU_SETTINGS;
command_event(CMD_EVENT_DISK_APPEND_IMAGE, action_path);
generic_action_ok_command(CMD_EVENT_RESUME);
{
settings_t *settings = config_get_ptr();
flush_char = msg_hash_to_str(MENU_ENUM_LABEL_DISK_OPTIONS);
command_event(CMD_EVENT_DISK_APPEND_IMAGE, action_path);
if (settings)
if (settings->bools.menu_insert_disk_resume)
generic_action_ok_command(CMD_EVENT_RESUME);
}
break;
case ACTION_OK_SUBSYSTEM_ADD:
flush_type = MENU_SETTINGS;
@@ -3200,8 +3218,8 @@ static int action_ok_core_deferred_set(const char *new_core_path,
settings->bools.show_hidden_files,
true);
strlcpy(resolved_core_path, new_core_path, sizeof(resolved_core_path));
playlist_resolve_path(PLAYLIST_SAVE, resolved_core_path, sizeof(resolved_core_path));
strlcpy(resolved_core_path, new_core_path, sizeof(resolved_core_path));
playlist_resolve_path(PLAYLIST_SAVE, resolved_core_path, sizeof(resolved_core_path));
/* the update function reads our entry
* as const, so these casts are safe */
@@ -3222,7 +3240,7 @@ static int action_ok_core_deferred_set(const char *new_core_path,
menu_entries_pop_stack(&selection, 0, 1);
menu_navigation_set_selection(selection);
return menu_cbs_exit();
return 0;
}
static int action_ok_deferred_list_stub(const char *path,
@@ -4094,8 +4112,6 @@ void cb_generic_download(retro_task_t *task,
dir_path = buf;
break;
}
case MENU_ENUM_LABEL_CB_SINGLE_THUMBNAIL:
break;
default:
RARCH_WARN("Unknown transfer type '%s' bailing out.\n",
msg_hash_to_str(transf->enum_idx));
@@ -4105,12 +4121,6 @@ void cb_generic_download(retro_task_t *task,
if (!string_is_empty(dir_path))
fill_pathname_join(output_path, dir_path,
transf->path, sizeof(output_path));
else if (transf->enum_idx == MENU_ENUM_LABEL_CB_SINGLE_THUMBNAIL)
{
/* In this particular case we have the whole path
* already built from the task */
strlcpy(output_path, transf->path, sizeof(output_path));
}
/* Make sure the directory exists
* This function is horrible. It mutates the original path
@@ -4128,12 +4138,6 @@ void cb_generic_download(retro_task_t *task,
if (!string_is_empty(dir_path))
fill_pathname_join(output_path, dir_path,
transf->path, sizeof(output_path));
else if (transf->enum_idx == MENU_ENUM_LABEL_CB_SINGLE_THUMBNAIL)
{
/* In this particular case we have the whole path
* already built from the task */
strlcpy(output_path, transf->path, sizeof(output_path));
}
#ifdef HAVE_COMPRESSION
if (path_is_compressed_file(output_path))
@@ -4324,19 +4328,19 @@ static int action_ok_core_updater_download(const char *path,
return 0;
}
#ifdef HAVE_NETWORKING
static int action_ok_update_installed_cores(const char *path,
const char *label, unsigned type, size_t idx, size_t entry_idx)
{
#ifdef HAVE_NETWORKING
/* Ensure networking is initialised */
generic_action_ok_command(CMD_EVENT_NETWORK_INIT);
/* Push update task */
task_push_update_installed_cores();
#endif
return 0;
}
#endif
static int action_ok_sideload_core(const char *path,
const char *label, unsigned type, size_t idx, size_t entry_idx)
@@ -4502,7 +4506,6 @@ default_action_ok_cmd_func(action_ok_save_new_config, CMD_EVENT_MENU_SA
default_action_ok_cmd_func(action_ok_resume_content, CMD_EVENT_RESUME)
default_action_ok_cmd_func(action_ok_restart_content, CMD_EVENT_RESET)
default_action_ok_cmd_func(action_ok_screenshot, CMD_EVENT_TAKE_SCREENSHOT)
default_action_ok_cmd_func(action_ok_disk_cycle_tray_status, CMD_EVENT_DISK_EJECT_TOGGLE)
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
default_action_ok_cmd_func(action_ok_shader_apply_changes, CMD_EVENT_SHADERS_APPLY_CHANGES)
#endif
@@ -5812,6 +5815,22 @@ static int action_ok_push_dropdown_item_manual_content_scan_core_name(const char
return action_cancel_pop_default(NULL, NULL, 0, 0);
}
static int action_ok_push_dropdown_item_disk_index(const char *path,
const char *label, unsigned type, size_t idx, size_t entry_idx)
{
unsigned disk_index = (unsigned)idx;
command_event(CMD_EVENT_DISK_INDEX, &disk_index);
/* When choosing a disk, menu selection should
* automatically be reset to the 'insert disk'
* option */
menu_entries_pop_stack(NULL, 0, 1);
menu_navigation_set_selection(0);
return 0;
}
static int action_ok_push_default(const char *path,
const char *label, unsigned type, size_t idx, size_t entry_idx)
{
@@ -6070,6 +6089,69 @@ static int action_ok_video_shader_num_passes_dropdown_box_list(const char *path,
ACTION_OK_DL_DROPDOWN_BOX_LIST_VIDEO_SHADER_NUM_PASSES);
}
static int action_ok_disk_index_dropdown_box_list(const char *path,
const char *label, unsigned type, size_t idx, size_t entry_idx)
{
return generic_dropdown_box_list(idx,
ACTION_OK_DL_DROPDOWN_BOX_LIST_DISK_INDEX);
}
static int action_ok_disk_cycle_tray_status(const char *path,
const char *label, unsigned type, size_t idx, size_t entry_idx)
{
bool disk_ejected = false;
bool print_log = false;
rarch_system_info_t *sys_info = runloop_get_system_info();
settings_t *settings = config_get_ptr();
if (!settings)
return menu_cbs_exit();
#ifdef HAVE_AUDIOMIXER
if (settings->bools.audio_enable_menu && settings->bools.audio_enable_menu_ok)
audio_driver_mixer_play_menu_sound(AUDIO_MIXER_SYSTEM_SLOT_OK);
#endif
/* Get disk eject state *before* toggling drive status */
if (sys_info)
{
const struct retro_disk_control_callback *control =
(const struct retro_disk_control_callback*)
&sys_info->disk_control_cb;
if (control)
if (control->get_eject_state)
disk_ejected = control->get_eject_state();
}
/* Only want to display a notification if we are
* going to resume content immediately after
* inserting a disk (i.e. if quick menu remains
* open, there is sufficient visual feedback
* without a notification) */
print_log = settings->bools.menu_insert_disk_resume && disk_ejected;
if (!command_event(CMD_EVENT_DISK_EJECT_TOGGLE, &print_log))
return menu_cbs_exit();
/* If we reach this point, then tray toggle
* was successful */
disk_ejected = !disk_ejected;
/* If disk is now ejected, menu selection should
* automatically increment to the 'current disk
* index' option */
if (disk_ejected)
menu_navigation_set_selection(1);
/* If disk is now inserted and user has enabled
* 'menu_insert_disk_resume', resume running content */
if (!disk_ejected && settings->bools.menu_insert_disk_resume)
generic_action_ok_command(CMD_EVENT_RESUME);
return 0;
}
static int action_ok_manual_content_scan_start(const char *path,
const char *label, unsigned type, size_t idx, size_t entry_idx)
{
@@ -6288,6 +6370,25 @@ static int action_ok_playlist_reset_cores(const char *path,
return 0;
}
static int action_ok_playlist_clean(const char *path,
const char *label, unsigned type, size_t idx, size_t entry_idx)
{
playlist_t *playlist = playlist_get_cached();
const char *playlist_path = NULL;
if (!playlist)
return -1;
playlist_path = playlist_get_conf_path(playlist);
if (string_is_empty(playlist_path))
return -1;
task_push_pl_manager_clean_playlist(playlist_path);
return 0;
}
static int is_rdb_entry(enum msg_hash_enums enum_idx)
{
switch (enum_idx)
@@ -6703,6 +6804,9 @@ static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs,
case MENU_ENUM_LABEL_PLAYLIST_MANAGER_RESET_CORES:
BIND_ACTION_OK(cbs, action_ok_playlist_reset_cores);
break;
case MENU_ENUM_LABEL_PLAYLIST_MANAGER_CLEAN_PLAYLIST:
BIND_ACTION_OK(cbs, action_ok_playlist_clean);
break;
case MENU_ENUM_LABEL_RECORDING_SETTINGS:
BIND_ACTION_OK(cbs, action_ok_push_recording_settings_list);
break;
@@ -7371,6 +7475,9 @@ static int menu_cbs_init_bind_ok_compare_type(menu_file_list_cbs_t *cbs,
case MENU_SETTING_DROPDOWN_ITEM_MANUAL_CONTENT_SCAN_CORE_NAME:
BIND_ACTION_OK(cbs, action_ok_push_dropdown_item_manual_content_scan_core_name);
break;
case MENU_SETTING_DROPDOWN_ITEM_DISK_INDEX:
BIND_ACTION_OK(cbs, action_ok_push_dropdown_item_disk_index);
break;
case MENU_SETTING_ACTION_CORE_DISK_OPTIONS:
BIND_ACTION_OK(cbs, action_ok_push_default);
break;
@@ -7695,6 +7802,9 @@ static int menu_cbs_init_bind_ok_compare_type(menu_file_list_cbs_t *cbs,
case MENU_SETTINGS_CORE_DISK_OPTIONS_DISK_CYCLE_TRAY_STATUS:
BIND_ACTION_OK(cbs, action_ok_disk_cycle_tray_status);
break;
case MENU_SETTINGS_CORE_DISK_OPTIONS_DISK_INDEX:
BIND_ACTION_OK(cbs, action_ok_disk_index_dropdown_box_list);
break;
case MENU_SETTINGS_CORE_OPTION_CREATE:
BIND_ACTION_OK(cbs, action_ok_option_create);
break;
+5 -1
View File
@@ -755,7 +755,11 @@ int core_setting_right(unsigned type, const char *label,
static int disk_options_disk_idx_right(unsigned type, const char *label,
bool wraparound)
{
command_event(CMD_EVENT_DISK_NEXT, NULL);
/* Note: Menu itself provides visual feedback - no
* need to print info message to screen */
bool print_log = false;
command_event(CMD_EVENT_DISK_NEXT, &print_log);
return 0;
}
+19 -3
View File
@@ -148,6 +148,8 @@ default_sublabel_macro(action_bind_sublabel_playlist_manager_list, MENU_
default_sublabel_macro(action_bind_sublabel_playlist_manager_default_core, MENU_ENUM_SUBLABEL_PLAYLIST_MANAGER_DEFAULT_CORE)
default_sublabel_macro(action_bind_sublabel_playlist_manager_reset_cores, MENU_ENUM_SUBLABEL_PLAYLIST_MANAGER_RESET_CORES)
default_sublabel_macro(action_bind_sublabel_playlist_manager_label_display_mode, MENU_ENUM_SUBLABEL_PLAYLIST_MANAGER_LABEL_DISPLAY_MODE)
default_sublabel_macro(action_bind_sublabel_playlist_manager_clean_playlist, MENU_ENUM_SUBLABEL_PLAYLIST_MANAGER_CLEAN_PLAYLIST)
default_sublabel_macro(action_bind_sublabel_delete_playlist, MENU_ENUM_SUBLABEL_DELETE_PLAYLIST)
default_sublabel_macro(action_bind_sublabel_network_settings_list, MENU_ENUM_SUBLABEL_NETWORK_SETTINGS)
default_sublabel_macro(action_bind_sublabel_network_on_demand_thumbnails, MENU_ENUM_SUBLABEL_NETWORK_ON_DEMAND_THUMBNAILS)
default_sublabel_macro(action_bind_sublabel_user_settings_list, MENU_ENUM_SUBLABEL_USER_SETTINGS)
@@ -376,6 +378,7 @@ default_sublabel_macro(action_bind_sublabel_input_autodetect_enable, MENU_
default_sublabel_macro(action_bind_sublabel_input_swap_ok_cancel, MENU_ENUM_SUBLABEL_MENU_INPUT_SWAP_OK_CANCEL)
default_sublabel_macro(action_bind_sublabel_pause_libretro, MENU_ENUM_SUBLABEL_PAUSE_LIBRETRO)
default_sublabel_macro(action_bind_sublabel_menu_savestate_resume, MENU_ENUM_SUBLABEL_MENU_SAVESTATE_RESUME)
default_sublabel_macro(action_bind_sublabel_menu_insert_disk_resume, MENU_ENUM_SUBLABEL_MENU_INSERT_DISK_RESUME)
default_sublabel_macro(action_bind_sublabel_video_driver, MENU_ENUM_SUBLABEL_VIDEO_DRIVER)
default_sublabel_macro(action_bind_sublabel_audio_driver, MENU_ENUM_SUBLABEL_AUDIO_DRIVER)
default_sublabel_macro(action_bind_sublabel_input_driver, MENU_ENUM_SUBLABEL_INPUT_DRIVER)
@@ -500,7 +503,8 @@ default_sublabel_macro(action_bind_thumbnails_directory,
default_sublabel_macro(action_bind_rgui_config_directory, MENU_ENUM_SUBLABEL_RGUI_CONFIG_DIRECTORY)
default_sublabel_macro(action_bind_sublabel_input_latency_frames, MENU_ENUM_SUBLABEL_NETPLAY_INPUT_LATENCY_FRAMES_MIN)
default_sublabel_macro(action_bind_sublabel_input_latency_frames_range, MENU_ENUM_SUBLABEL_NETPLAY_INPUT_LATENCY_FRAMES_RANGE)
default_sublabel_macro(action_bind_sublabel_disk_cycle_tray_status, MENU_ENUM_SUBLABEL_DISK_CYCLE_TRAY_STATUS)
default_sublabel_macro(action_bind_sublabel_disk_tray_eject, MENU_ENUM_SUBLABEL_DISK_TRAY_EJECT)
default_sublabel_macro(action_bind_sublabel_disk_tray_insert, MENU_ENUM_SUBLABEL_DISK_TRAY_INSERT)
default_sublabel_macro(action_bind_sublabel_disk_image_append, MENU_ENUM_SUBLABEL_DISK_IMAGE_APPEND)
default_sublabel_macro(action_bind_sublabel_disk_index, MENU_ENUM_SUBLABEL_DISK_INDEX)
default_sublabel_macro(action_bind_sublabel_disk_options, MENU_ENUM_SUBLABEL_DISK_OPTIONS)
@@ -1799,8 +1803,11 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
case MENU_ENUM_LABEL_SUBSYSTEM_LOAD:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_subsystem_load);
break;
case MENU_ENUM_LABEL_DISK_CYCLE_TRAY_STATUS:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_disk_cycle_tray_status);
case MENU_ENUM_LABEL_DISK_TRAY_EJECT:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_disk_tray_eject);
break;
case MENU_ENUM_LABEL_DISK_TRAY_INSERT:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_disk_tray_insert);
break;
case MENU_ENUM_LABEL_DISK_INDEX:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_disk_index);
@@ -2177,6 +2184,9 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
case MENU_ENUM_LABEL_MENU_SAVESTATE_RESUME:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_menu_savestate_resume);
break;
case MENU_ENUM_LABEL_MENU_INSERT_DISK_RESUME:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_menu_insert_disk_resume);
break;
case MENU_ENUM_LABEL_MENU_INPUT_SWAP_OK_CANCEL:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_input_swap_ok_cancel);
break;
@@ -2788,6 +2798,9 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
case MENU_ENUM_LABEL_PLAYLIST_MANAGER_LABEL_DISPLAY_MODE:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_playlist_manager_label_display_mode);
break;
case MENU_ENUM_LABEL_PLAYLIST_MANAGER_CLEAN_PLAYLIST:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_playlist_manager_clean_playlist);
break;
case MENU_ENUM_LABEL_PLAYLIST_MANAGER_RIGHT_THUMBNAIL_MODE:
settings = config_get_ptr();
/* Uses same sublabels as MENU_ENUM_LABEL_THUMBNAILS */
@@ -2824,6 +2837,9 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_left_thumbnails);
}
break;
case MENU_ENUM_LABEL_DELETE_PLAYLIST:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_delete_playlist);
break;
case MENU_ENUM_LABEL_AI_SERVICE_URL:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_ai_service_url);
break;
+3 -1
View File
@@ -422,6 +422,7 @@ default_title_macro(action_get_title_dropdown_playlist_label_display_mode_item,
default_title_macro(action_get_title_manual_content_scan_list, MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_LIST)
default_title_macro(action_get_title_dropdown_manual_content_scan_system_name_item, MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_SYSTEM_NAME)
default_title_macro(action_get_title_dropdown_manual_content_scan_core_name_item, MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_CORE_NAME)
default_title_macro(action_get_title_dropdown_disk_index, MENU_ENUM_LABEL_VALUE_DISK_INDEX)
default_fill_title_macro(action_get_title_disk_image_append, MENU_ENUM_LABEL_VALUE_DISK_IMAGE_APPEND)
default_fill_title_macro(action_get_title_cheat_file_load, MENU_ENUM_LABEL_VALUE_CHEAT_FILE)
@@ -1438,7 +1439,7 @@ static int menu_cbs_init_bind_title_compare_type(menu_file_list_cbs_t *cbs,
BIND_ACTION_GET_TITLE(cbs, action_get_title_input_settings);
break;
case MENU_SETTING_ACTION_CORE_DISK_OPTIONS:
BIND_ACTION_GET_TITLE(cbs, action_get_title_action_generic);
BIND_ACTION_GET_TITLE(cbs, action_get_disk_options_list);
break;
default:
return -1;
@@ -1477,6 +1478,7 @@ int menu_cbs_init_bind_title(menu_file_list_cbs_t *cbs,
{MENU_ENUM_LABEL_DEFERRED_DROPDOWN_BOX_LIST_PLAYLIST_LEFT_THUMBNAIL_MODE, action_get_title_dropdown_playlist_left_thumbnail_mode_item},
{MENU_ENUM_LABEL_DEFERRED_DROPDOWN_BOX_LIST_MANUAL_CONTENT_SCAN_SYSTEM_NAME, action_get_title_dropdown_manual_content_scan_system_name_item},
{MENU_ENUM_LABEL_DEFERRED_DROPDOWN_BOX_LIST_MANUAL_CONTENT_SCAN_CORE_NAME, action_get_title_dropdown_manual_content_scan_core_name_item},
{MENU_ENUM_LABEL_DEFERRED_DROPDOWN_BOX_LIST_DISK_INDEX, action_get_title_dropdown_disk_index},
{MENU_ENUM_LABEL_DEFERRED_RPL_ENTRY_ACTIONS, action_get_quick_menu_views_settings_list},
{MENU_ENUM_LABEL_DEFERRED_PLAYLIST_LIST, action_get_title_deferred_playlist_list},
{MENU_ENUM_LABEL_DEFERRED_PLAYLIST_MANAGER_SETTINGS, action_get_title_deferred_playlist_list},
+12 -8
View File
@@ -7511,7 +7511,8 @@ static void materialui_list_insert(
}
else if (string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_RENAME_ENTRY)) ||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_RESET_CORE_ASSOCIATION)) ||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_PLAYLIST_MANAGER_RESET_CORES)))
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_PLAYLIST_MANAGER_RESET_CORES)) ||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_PLAYLIST_MANAGER_CLEAN_PLAYLIST)))
{
node->icon_texture_index = MUI_TEXTURE_RENAME;
node->has_icon = true;
@@ -7544,7 +7545,8 @@ static void materialui_list_insert(
node->has_icon = true;
}
else if (
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DISK_CYCLE_TRAY_STATUS))
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DISK_TRAY_EJECT)) ||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DISK_TRAY_INSERT))
)
{
node->icon_texture_index = MUI_TEXTURE_EJECT;
@@ -7555,7 +7557,8 @@ static void materialui_list_insert(
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_LOAD_DISC)) ||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DUMP_DISC)) ||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DISC_INFORMATION)) ||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DISK_OPTIONS))
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DISK_OPTIONS)) ||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DISK_INDEX))
)
{
node->icon_texture_index = MUI_TEXTURE_DISK;
@@ -7616,7 +7619,8 @@ static void materialui_list_insert(
node->icon_texture_index = MUI_TEXTURE_LOAD_CONTENT;
node->has_icon = true;
}
else if (string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DELETE_ENTRY)))
else if (string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DELETE_ENTRY)) ||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DELETE_PLAYLIST)))
{
node->icon_texture_index = MUI_TEXTURE_REMOVE;
node->has_icon = true;
@@ -7700,6 +7704,7 @@ static void materialui_list_insert(
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_USER_INTERFACE_SETTINGS)) ||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_AI_SERVICE_SETTINGS)) ||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_ACCESSIBILITY_SETTINGS)) ||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_POWER_MANAGEMENT_SETTINGS)) ||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_RETRO_ACHIEVEMENTS_SETTINGS)) ||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_ACCOUNTS_YOUTUBE)) ||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_ACCOUNTS_TWITCH)) ||
@@ -7714,6 +7719,7 @@ static void materialui_list_insert(
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_MIDI_SETTINGS)) ||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_MENU_VIEWS_SETTINGS)) ||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_QUICK_MENU_VIEWS_SETTINGS)) ||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_SETTINGS_VIEWS_SETTINGS)) ||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_MENU_SETTINGS)) ||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_ONSCREEN_OVERLAY_SETTINGS)) ||
#ifdef HAVE_VIDEO_LAYOUT
@@ -7747,11 +7753,8 @@ static void materialui_list_insert(
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_CHEAT_SEARCH_SETTINGS)) ||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_CHEAT_START_OR_CONT)) ||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_INPUT_META_CHEAT_SEARCH)) ||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_PLAYLIST_MANAGER_DEFAULT_CORE)) ||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_PLAYLIST_MANAGER_LABEL_DISPLAY_MODE)) ||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_THUMBNAILS_MATERIALUI)) ||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_LEFT_THUMBNAILS_MATERIALUI)) ||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DELETE_PLAYLIST)) ||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_VIDEO_SHADER_NUM_PASSES)) ||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_CHEAT_FILE_LOAD)) ||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_CHEAT_FILE_LOAD_APPEND)) ||
@@ -7765,7 +7768,8 @@ static void materialui_list_insert(
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_CHEAT_COPY_AFTER)) ||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_CHEAT_COPY_BEFORE)) ||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_CHEAT_DELETE)) ||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_VIDEO_SHADER_PARAMETERS))
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_VIDEO_SHADER_PARAMETERS)) ||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_PLAYLIST_MANAGER_LIST))
)
{
node->icon_texture_index = MUI_TEXTURE_SETTINGS;
+24 -11
View File
@@ -27,6 +27,9 @@
#include "../../verbosity.h"
#include "../../content.h"
#ifdef HAVE_ACCESSIBILITY
#include "../../accessibility.h"
#endif
#include "../../retroarch.h"
static enum action_iterate_type action_iterate_type(const char *label)
@@ -77,6 +80,8 @@ int generic_menu_iterate(void *data, void *userdata, enum menu_action action)
const char *label = NULL;
menu_handle_t *menu = (menu_handle_t*)data;
(void)last_iterate_type;
if (!menu)
return 0;
@@ -100,10 +105,10 @@ int generic_menu_iterate(void *data, void *userdata, enum menu_action action)
ret = menu_dialog_iterate(
menu->menu_state_msg, sizeof(menu->menu_state_msg), label);
#ifdef HAVE_ACCESSIBILITY
if (iterate_type != last_iterate_type && is_accessibility_enabled())
{
accessibility_speak(menu->menu_state_msg);
}
accessibility_speak_priority(menu->menu_state_msg, 10);
#endif
BIT64_SET(menu->state, MENU_STATE_RENDER_MESSAGEBOX);
BIT64_SET(menu->state, MENU_STATE_POST_ITERATE);
@@ -149,6 +154,8 @@ int generic_menu_iterate(void *data, void *userdata, enum menu_action action)
{
ret = menu_hash_get_help_enum(cbs->enum_idx,
menu->menu_state_msg, sizeof(menu->menu_state_msg));
#ifdef HAVE_ACCESSIBILITY
if (iterate_type != last_iterate_type && is_accessibility_enabled())
{
if (string_is_equal(menu->menu_state_msg, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NO_INFORMATION_AVAILABLE)))
@@ -156,13 +163,14 @@ int generic_menu_iterate(void *data, void *userdata, enum menu_action action)
char current_sublabel[255];
get_current_menu_sublabel(current_sublabel, sizeof(current_sublabel));
if (string_is_equal(current_sublabel, ""))
accessibility_speak(menu->menu_state_msg);
accessibility_speak_priority(menu->menu_state_msg, 10);
else
accessibility_speak(current_sublabel);
accessibility_speak_priority(current_sublabel, 10);
}
else
accessibility_speak(menu->menu_state_msg);
accessibility_speak_priority(menu->menu_state_msg, 10);
}
#endif
}
else
{
@@ -278,10 +286,10 @@ int generic_menu_iterate(void *data, void *userdata, enum menu_action action)
break;
}
#ifdef HAVE_ACCESSIBILITY
if ((last_iterate_type == ITERATE_TYPE_HELP || last_iterate_type == ITERATE_TYPE_INFO) && last_iterate_type != iterate_type && is_accessibility_enabled())
{
accessibility_speak("Closed dialog.");
}
accessibility_speak_priority("Closed dialog.", 10);
#endif
last_iterate_type = iterate_type;
BIT64_SET(menu->state, MENU_STATE_BLIT);
@@ -414,7 +422,10 @@ int generic_menu_entry_action(
}
}
if (action != 0 && is_accessibility_enabled() && !is_input_keyboard_display_on())
#ifdef HAVE_ACCESSIBILITY
if ( action != 0
&& is_accessibility_enabled()
&& !is_input_keyboard_display_on())
{
char current_label[255];
char current_value[255];
@@ -463,7 +474,9 @@ int generic_menu_entry_action(
}
if (!string_is_equal(speak_string, ""))
accessibility_speak(speak_string);
accessibility_speak_priority(speak_string, 10);
}
#endif
return ret;
}
+3 -1
View File
@@ -51,7 +51,8 @@ menu_texture_item ozone_entries_icon_get_texture(ozone_handle_t *ozone,
case MENU_ENUM_LABEL_CORE_CHEAT_OPTIONS:
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_CHEAT_OPTIONS];
case MENU_ENUM_LABEL_DISK_OPTIONS:
case MENU_ENUM_LABEL_DISK_CYCLE_TRAY_STATUS:
case MENU_ENUM_LABEL_DISK_TRAY_EJECT:
case MENU_ENUM_LABEL_DISK_TRAY_INSERT:
case MENU_ENUM_LABEL_DISK_IMAGE_APPEND:
case MENU_ENUM_LABEL_DISK_INDEX:
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_DISK_OPTIONS];
@@ -284,6 +285,7 @@ menu_texture_item ozone_entries_icon_get_texture(ozone_handle_t *ozone,
case MENU_ENUM_LABEL_VRR_RUNLOOP_ENABLE:
case MENU_ENUM_LABEL_AUTOSAVE_INTERVAL:
case MENU_ENUM_LABEL_FRAME_TIME_COUNTER_SETTINGS:
case MENU_ENUM_LABEL_PLAYLIST_MANAGER_CLEAN_PLAYLIST:
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_RELOAD];
case MENU_ENUM_LABEL_SHUTDOWN:
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_SHUTDOWN];
+15 -8
View File
@@ -496,6 +496,7 @@ static const rgui_theme_t rgui_theme_anti_zenburn = {
0xE0B090B0 /* particle_color */
};
#if 0
static const rgui_theme_t rgui_theme_flux = {
0xFF6FCB9F, /* hover_color */
0xFF666547, /* normal_color */
@@ -507,6 +508,7 @@ static const rgui_theme_t rgui_theme_flux = {
0xE0FFE28A, /* shadow_color */
0xE0FB2E01 /* particle_color */
};
#endif
typedef struct
{
@@ -2171,15 +2173,20 @@ static const rgui_theme_t *get_theme(rgui_t *rgui)
static void load_custom_theme(rgui_t *rgui, rgui_theme_t *theme_colors, const char *theme_path)
{
unsigned normal_color, hover_color, title_color,
bg_dark_color, bg_light_color,
border_dark_color, border_light_color,
shadow_color, particle_color;
char wallpaper_file[PATH_MAX_LENGTH];
config_file_t *conf = NULL;
char *wallpaper_key = NULL;
settings_t *settings = config_get_ptr();
bool success = false;
unsigned normal_color = 0;
unsigned hover_color = 0;
unsigned title_color = 0;
unsigned bg_dark_color = 0;
unsigned bg_light_color = 0;
unsigned border_dark_color = 0;
unsigned border_light_color = 0;
unsigned shadow_color = 0;
unsigned particle_color = 0;
config_file_t *conf = NULL;
char *wallpaper_key = NULL;
settings_t *settings = config_get_ptr();
bool success = false;
/* Determine which type of wallpaper to load */
switch (settings->uints.menu_rgui_aspect_ratio)
+3 -1
View File
@@ -2317,7 +2317,8 @@ static uintptr_t xmb_icon_get_id(xmb_handle_t *xmb,
case MENU_ENUM_LABEL_CORE_CHEAT_OPTIONS:
return xmb->textures.list[XMB_TEXTURE_CHEAT_OPTIONS];
case MENU_ENUM_LABEL_DISK_OPTIONS:
case MENU_ENUM_LABEL_DISK_CYCLE_TRAY_STATUS:
case MENU_ENUM_LABEL_DISK_TRAY_EJECT:
case MENU_ENUM_LABEL_DISK_TRAY_INSERT:
case MENU_ENUM_LABEL_DISK_IMAGE_APPEND:
case MENU_ENUM_LABEL_DISK_INDEX:
return xmb->textures.list[XMB_TEXTURE_DISK_OPTIONS];
@@ -2352,6 +2353,7 @@ static uintptr_t xmb_icon_get_id(xmb_handle_t *xmb,
case MENU_ENUM_LABEL_VRR_RUNLOOP_ENABLE:
case MENU_ENUM_LABEL_AUTOSAVE_INTERVAL:
case MENU_ENUM_LABEL_FRAME_TIME_COUNTER_SETTINGS:
case MENU_ENUM_LABEL_PLAYLIST_MANAGER_CLEAN_PLAYLIST:
return xmb->textures.list[XMB_TEXTURE_RELOAD];
case MENU_ENUM_LABEL_RENAME_ENTRY:
return xmb->textures.list[XMB_TEXTURE_RENAME];
+1
View File
@@ -57,6 +57,7 @@ enum
ACTION_OK_DL_DROPDOWN_BOX_LIST_PLAYLIST_LEFT_THUMBNAIL_MODE,
ACTION_OK_DL_DROPDOWN_BOX_LIST_MANUAL_CONTENT_SCAN_SYSTEM_NAME,
ACTION_OK_DL_DROPDOWN_BOX_LIST_MANUAL_CONTENT_SCAN_CORE_NAME,
ACTION_OK_DL_DROPDOWN_BOX_LIST_DISK_INDEX,
ACTION_OK_DL_OPEN_ARCHIVE,
ACTION_OK_DL_OPEN_ARCHIVE_DETECT_CORE,
ACTION_OK_DL_MUSIC,
+142 -26
View File
@@ -601,12 +601,10 @@ static unsigned menu_displaylist_parse_system_info(file_list_t *list)
{
char tmp[PATH_MAX_LENGTH];
char tmp2[PATH_MAX_LENGTH];
char tmp3[PATH_MAX_LENGTH];
uint64_t memory_free = frontend_driver_get_free_memory();
uint64_t memory_total = frontend_driver_get_total_memory();
tmp[0] = tmp2[0] = tmp3[0] = '\0';
tmp[0] = '\0';
if (memory_free != 0 && memory_total != 0)
{
@@ -628,6 +626,7 @@ static unsigned menu_displaylist_parse_system_info(file_list_t *list)
if (frontend->get_powerstate)
{
int seconds = 0, percent = 0;
char tmp2[PATH_MAX_LENGTH];
enum frontend_powerstate state =
frontend->get_powerstate(&seconds, &percent);
@@ -2870,7 +2869,7 @@ static bool menu_displaylist_parse_playlist_manager_settings(
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_RESET_CORES),
msg_hash_to_str(MENU_ENUM_LABEL_PLAYLIST_MANAGER_RESET_CORES),
MENU_ENUM_LABEL_PLAYLIST_MANAGER_RESET_CORES,
FILE_TYPE_PLAYLIST_ENTRY, 0, 0);
MENU_SETTING_ACTION_PLAYLIST_MANAGER_RESET_CORES, 0, 0);
/* Label display mode */
menu_entries_append_enum(info->list,
@@ -2917,9 +2916,14 @@ static bool menu_displaylist_parse_playlist_manager_settings(
MENU_ENUM_LABEL_PLAYLIST_MANAGER_LEFT_THUMBNAIL_MODE,
MENU_SETTING_PLAYLIST_MANAGER_LEFT_THUMBNAIL_MODE, 0, 0);
/* TODO - Add:
* - Remove invalid entries */
/* Clean playlist */
menu_entries_append_enum(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_CLEAN_PLAYLIST),
msg_hash_to_str(MENU_ENUM_LABEL_PLAYLIST_MANAGER_CLEAN_PLAYLIST),
MENU_ENUM_LABEL_PLAYLIST_MANAGER_CLEAN_PLAYLIST,
MENU_SETTING_ACTION_PLAYLIST_MANAGER_CLEAN_PLAYLIST, 0, 0);
/* Delete playlist */
menu_entries_append_enum(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_DELETE_PLAYLIST),
msg_hash_to_str(MENU_ENUM_LABEL_DELETE_PLAYLIST),
@@ -2974,7 +2978,7 @@ static unsigned menu_displaylist_parse_pl_thumbnail_download_list(
menu_entries_append_enum(info->list,
path_base,
path,
MENU_ENUM_LABEL_PLAYLIST_ENTRY,
MENU_ENUM_LABEL_PL_THUMBNAILS_UPDATER_ENTRY,
FILE_TYPE_DOWNLOAD_PL_THUMBNAIL_CONTENT,
0, 0);
count++;
@@ -3235,6 +3239,82 @@ static unsigned menu_displaylist_parse_content_information(
return count;
}
static unsigned menu_displaylist_parse_disk_options(
file_list_t *list)
{
unsigned count = 0;
rarch_system_info_t *sys_info =
runloop_get_system_info();
const struct retro_disk_control_callback *control = NULL;
bool disk_ejected;
/* Sanity Check */
if (!sys_info)
return count;
control = (const struct retro_disk_control_callback*)
&sys_info->disk_control_cb;
if (!control ||
!control->get_num_images ||
!control->get_image_index ||
!control->get_eject_state ||
!control->set_eject_state)
return count;
/* Check whether disk is currently ejected */
disk_ejected = control->get_eject_state();
/* Always show a 'DISK_CYCLE_TRAY_STATUS' entry
* > These perform the same function, but just have
* different labels/sublabels */
if (disk_ejected)
{
if (menu_entries_append_enum(list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_DISK_TRAY_INSERT),
msg_hash_to_str(MENU_ENUM_LABEL_DISK_TRAY_INSERT),
MENU_ENUM_LABEL_DISK_TRAY_INSERT,
MENU_SETTINGS_CORE_DISK_OPTIONS_DISK_CYCLE_TRAY_STATUS, 0, 0))
count++;
}
else
if (menu_entries_append_enum(list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_DISK_TRAY_EJECT),
msg_hash_to_str(MENU_ENUM_LABEL_DISK_TRAY_EJECT),
MENU_ENUM_LABEL_DISK_TRAY_EJECT,
MENU_SETTINGS_CORE_DISK_OPTIONS_DISK_CYCLE_TRAY_STATUS, 0, 0))
count++;
/* Only show disk index if disk is currently ejected */
if (disk_ejected)
if (menu_entries_append_enum(list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_DISK_INDEX),
msg_hash_to_str(MENU_ENUM_LABEL_DISK_INDEX),
MENU_ENUM_LABEL_DISK_INDEX,
MENU_SETTINGS_CORE_DISK_OPTIONS_DISK_INDEX, 0, 0))
count++;
/* If replace_image_index() is undefined, can stop here */
if (!control->replace_image_index)
return count;
/* Append image does the following:
* > Open tray
* > Append disk image
* > Close tray
* It therefore only makes sense to show this option
* if a disk is currently inserted */
if (!disk_ejected)
if (menu_entries_append_enum(list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_DISK_IMAGE_APPEND),
msg_hash_to_str(MENU_ENUM_LABEL_DISK_IMAGE_APPEND),
MENU_ENUM_LABEL_DISK_IMAGE_APPEND,
MENU_SETTINGS_CORE_DISK_OPTIONS_DISK_IMAGE_APPEND, 0, 0))
count++;
return count;
}
static bool menu_displaylist_push_internal(
const char *label,
menu_displaylist_ctx_entry_t *entry,
@@ -4034,7 +4114,6 @@ static unsigned menu_displaylist_populate_subsystem(
return count;
}
unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ctl_state type,
bool include_everything)
{
@@ -5271,6 +5350,57 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
}
}
break;
case DISPLAYLIST_DROPDOWN_LIST_DISK_INDEX:
{
rarch_system_info_t *sys_info = runloop_get_system_info();
if (sys_info)
{
const struct retro_disk_control_callback *control =
(const struct retro_disk_control_callback*)
&sys_info->disk_control_cb;
/* Check that the required disk control interface
* functions are defined */
if (control &&
control->get_num_images &&
control->get_image_index)
{
unsigned num_images = control->get_num_images();
unsigned current_image = control->get_image_index();
unsigned i;
/* Loop through disk images */
for (i = 0; i < num_images; i++)
{
char current_image_str[256];
current_image_str[0] = '\0';
/* Get string representation of disk index
* > Note that displayed index starts at '1',
* not '0' */
snprintf(
current_image_str, sizeof(current_image_str),
"%u", i + 1);
/* Add menu entry */
if (menu_entries_append_enum(list,
current_image_str,
"",
MENU_ENUM_LABEL_NO_ITEMS,
MENU_SETTING_DROPDOWN_ITEM_DISK_INDEX,
i, 0))
count++;
/* Check whether current disk is selected */
if (i == current_image)
menu_entries_set_checked(list, i, true);
}
}
}
}
break;
case DISPLAYLIST_PERFCOUNTERS_CORE:
case DISPLAYLIST_PERFCOUNTERS_FRONTEND:
{
@@ -5715,6 +5845,7 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
{MENU_ENUM_LABEL_NAVIGATION_WRAPAROUND, PARSE_ONLY_BOOL, true},
{MENU_ENUM_LABEL_PAUSE_LIBRETRO, PARSE_ONLY_BOOL, true},
{MENU_ENUM_LABEL_MENU_SAVESTATE_RESUME, PARSE_ONLY_BOOL, true},
{MENU_ENUM_LABEL_MENU_INSERT_DISK_RESUME, PARSE_ONLY_BOOL, true},
{MENU_ENUM_LABEL_MOUSE_ENABLE, PARSE_ONLY_BOOL, true},
{MENU_ENUM_LABEL_POINTER_ENABLE, PARSE_ONLY_BOOL, true},
{MENU_ENUM_LABEL_THREADED_DATA_RUNLOOP_ENABLE, PARSE_ONLY_BOOL, true},
@@ -5759,24 +5890,7 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
}
break;
case DISPLAYLIST_OPTIONS_DISK:
if (menu_entries_append_enum(list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_DISK_INDEX),
msg_hash_to_str(MENU_ENUM_LABEL_DISK_INDEX),
MENU_ENUM_LABEL_DISK_INDEX,
MENU_SETTINGS_CORE_DISK_OPTIONS_DISK_INDEX, 0, 0))
count++;
if (menu_entries_append_enum(list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_DISK_CYCLE_TRAY_STATUS),
msg_hash_to_str(MENU_ENUM_LABEL_DISK_CYCLE_TRAY_STATUS),
MENU_ENUM_LABEL_DISK_CYCLE_TRAY_STATUS,
MENU_SETTINGS_CORE_DISK_OPTIONS_DISK_CYCLE_TRAY_STATUS, 0, 0))
count++;
if (menu_entries_append_enum(list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_DISK_IMAGE_APPEND),
msg_hash_to_str(MENU_ENUM_LABEL_DISK_IMAGE_APPEND),
MENU_ENUM_LABEL_DISK_IMAGE_APPEND,
MENU_SETTINGS_CORE_DISK_OPTIONS_DISK_IMAGE_APPEND, 0, 0))
count++;
count = menu_displaylist_parse_disk_options(list);
break;
case DISPLAYLIST_MIDI_SETTINGS_LIST:
{
@@ -9098,6 +9212,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
case DISPLAYLIST_DROPDOWN_LIST_PLAYLIST_LEFT_THUMBNAIL_MODE:
case DISPLAYLIST_DROPDOWN_LIST_MANUAL_CONTENT_SCAN_SYSTEM_NAME:
case DISPLAYLIST_DROPDOWN_LIST_MANUAL_CONTENT_SCAN_CORE_NAME:
case DISPLAYLIST_DROPDOWN_LIST_DISK_INDEX:
case DISPLAYLIST_PERFCOUNTERS_CORE:
case DISPLAYLIST_PERFCOUNTERS_FRONTEND:
case DISPLAYLIST_MENU_SETTINGS_LIST:
@@ -9156,6 +9271,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
case DISPLAYLIST_DROPDOWN_LIST_PLAYLIST_LEFT_THUMBNAIL_MODE:
case DISPLAYLIST_DROPDOWN_LIST_MANUAL_CONTENT_SCAN_SYSTEM_NAME:
case DISPLAYLIST_DROPDOWN_LIST_MANUAL_CONTENT_SCAN_CORE_NAME:
case DISPLAYLIST_DROPDOWN_LIST_DISK_INDEX:
case DISPLAYLIST_INFORMATION_LIST:
case DISPLAYLIST_SCAN_DIRECTORY_LIST:
menu_entries_append_enum(info->list,
+1
View File
@@ -65,6 +65,7 @@ enum menu_displaylist_ctl_state
DISPLAYLIST_DROPDOWN_LIST_PLAYLIST_LEFT_THUMBNAIL_MODE,
DISPLAYLIST_DROPDOWN_LIST_MANUAL_CONTENT_SCAN_SYSTEM_NAME,
DISPLAYLIST_DROPDOWN_LIST_MANUAL_CONTENT_SCAN_CORE_NAME,
DISPLAYLIST_DROPDOWN_LIST_DISK_INDEX,
DISPLAYLIST_CDROM_DETAIL_INFO,
DISPLAYLIST_INFO,
DISPLAYLIST_HELP,
+3
View File
@@ -96,6 +96,7 @@ enum menu_settings_type
MENU_SETTING_DROPDOWN_ITEM_PLAYLIST_LEFT_THUMBNAIL_MODE,
MENU_SETTING_DROPDOWN_ITEM_MANUAL_CONTENT_SCAN_SYSTEM_NAME,
MENU_SETTING_DROPDOWN_ITEM_MANUAL_CONTENT_SCAN_CORE_NAME,
MENU_SETTING_DROPDOWN_ITEM_DISK_INDEX,
MENU_SETTING_DROPDOWN_SETTING_CORE_OPTIONS_ITEM,
MENU_SETTING_DROPDOWN_SETTING_STRING_OPTIONS_ITEM,
MENU_SETTING_DROPDOWN_SETTING_FLOAT_ITEM,
@@ -212,6 +213,8 @@ enum menu_settings_type
MENU_SET_LOAD_CDROM_LIST,
MENU_SET_CDROM_INFO,
MENU_SETTING_ACTION_DELETE_PLAYLIST,
MENU_SETTING_ACTION_PLAYLIST_MANAGER_RESET_CORES,
MENU_SETTING_ACTION_PLAYLIST_MANAGER_CLEAN_PLAYLIST,
MENU_SETTING_MANUAL_CONTENT_SCAN_DIR,
MENU_SETTING_MANUAL_CONTENT_SCAN_SYSTEM_NAME,
+18
View File
@@ -8000,6 +8000,7 @@ static bool setting_append_list(
&subgroup_info,
parent_group);
#ifdef HAVE_ACCESSIBILITY
CONFIG_ACTION(
list, list_info,
MENU_ENUM_LABEL_ACCESSIBILITY_SETTINGS,
@@ -8007,6 +8008,7 @@ static bool setting_append_list(
&group_info,
&subgroup_info,
parent_group);
#endif
CONFIG_ACTION(
list, list_info,
@@ -12333,6 +12335,22 @@ static bool setting_append_list(
SD_FLAG_ADVANCED
);
CONFIG_BOOL(
list, list_info,
&settings->bools.menu_insert_disk_resume,
MENU_ENUM_LABEL_MENU_INSERT_DISK_RESUME,
MENU_ENUM_LABEL_VALUE_MENU_INSERT_DISK_RESUME,
DEFAULT_MENU_INSERT_DISK_RESUME,
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_ADVANCED
);
CONFIG_BOOL(
list, list_info,
&settings->bools.menu_mouse_enable,
+3
View File
@@ -470,6 +470,9 @@ bool menu_thumbnail_set_content_playlist(menu_thumbnail_path_data_t *path_data,
/* Read playlist values */
playlist_get_index(playlist, idx, &entry);
if (!entry)
return false;
content_path = entry->path;
content_label = entry->label;
core_name = entry->core_name;
+75 -69
View File
@@ -15,8 +15,20 @@
* If not, see <http://www.gnu.org/licenses/>.
*/
#include <retro_miscellaneous.h>
#include <lists/file_list.h>
#include <queues/fifo_queue.h>
#include <file/file_path.h>
#include <streams/file_stream.h>
#include <string/stdstring.h>
#include "menu_widgets.h"
#ifdef HAVE_ACCESSIBILITY
#include "../../accessibility.h"
#endif
#include "../../verbosity.h"
#include "../../retroarch.h"
#include "../../configuration.h"
@@ -30,14 +42,6 @@
#include "../../gfx/font_driver.h"
#include <lists/file_list.h>
#include <queues/fifo_queue.h>
#include <file/file_path.h>
#include <streams/file_stream.h>
#include <formats/image.h>
#include <string/stdstring.h>
#include <retro_miscellaneous.h>
#ifndef PI
#define PI 3.14159265359f
#endif
@@ -332,10 +336,10 @@ void menu_widgets_msg_queue_push(
{
menu_widget_msg_t* msg_widget = NULL;
#ifdef HAVE_ACCESSIBILITY
if (is_accessibility_enabled())
{
accessibility_speak_priority((char*)msg, 0);
}
#endif
if (fifo_write_avail(msg_queue) > 0)
{
/* Get current msg if it exists */
@@ -857,7 +861,6 @@ static void menu_widgets_hourglass_tick(void *userdata)
void menu_widgets_iterate(unsigned width, unsigned height)
{
size_t i;
settings_t *settings = config_get_ptr();
/* Messages queue */
@@ -936,13 +939,16 @@ void menu_widgets_iterate(unsigned width, unsigned height)
if (screenshot_filename[0] != '\0')
{
menu_timer_ctx_entry_t timer;
settings_t *settings = config_get_ptr();
float video_font_size = settings->floats.video_font_size;
video_driver_texture_unload(&screenshot_texture);
menu_display_reset_textures_list(screenshot_filename,
"", &screenshot_texture, TEXTURE_FILTER_MIPMAP_LINEAR,
&screenshot_texture_width, &screenshot_texture_height);
screenshot_height = settings->floats.video_font_size * 4;
screenshot_height = video_font_size * 4;
screenshot_width = width;
screenshot_scale_factor = menu_widgets_get_thumbnail_scale_factor(
@@ -973,7 +979,6 @@ static int menu_widgets_draw_indicator(video_frame_info_t *video_info,
enum msg_hash_enums msg)
{
unsigned width;
settings_t *settings = config_get_ptr();
menu_display_set_alpha(menu_widgets_backdrop_orig, DEFAULT_BACKDROP);
@@ -1001,8 +1006,11 @@ static int menu_widgets_draw_indicator(video_frame_info_t *video_info,
}
else
{
unsigned height = simple_widget_height;
const char *txt = msg_hash_to_str(msg);
unsigned height = simple_widget_height;
const char *txt = msg_hash_to_str(msg);
settings_t *settings = config_get_ptr();
float video_font_size = settings->floats.video_font_size;
width = font_driver_get_message_width(font_regular, txt, (unsigned)strlen(txt), 1) + simple_widget_padding*2;
menu_display_draw_quad(video_info,
@@ -1014,7 +1022,7 @@ static int menu_widgets_draw_indicator(video_frame_info_t *video_info,
menu_display_draw_text(font_regular,
txt,
top_right_x_advance - width + simple_widget_padding, settings->floats.video_font_size + simple_widget_padding/4,
top_right_x_advance - width + simple_widget_padding, video_font_size + simple_widget_padding/4,
video_info->width, video_info->height,
0xFFFFFFFF, TEXT_ALIGN_LEFT,
1.0f,
@@ -1042,6 +1050,7 @@ static void menu_widgets_draw_task_msg(menu_widget_msg_t *msg, video_frame_info_
unsigned task_percentage_offset = 0;
char task_percentage[256] = {0};
settings_t *settings = config_get_ptr();
float video_font_size = settings->floats.video_font_size;
if (msg->msg_new)
draw_msg_new = !string_is_equal(msg->msg_new, msg->msg);
@@ -1129,7 +1138,7 @@ static void menu_widgets_draw_task_msg(menu_widget_msg_t *msg, video_frame_info_
menu_display_draw_text(font_regular,
msg->msg_new,
msg_queue_task_text_start_x,
video_info->height - msg->offset_y + msg_queue_text_scale_factor * settings->floats.video_font_size + msg_queue_height/4 - settings->floats.video_font_size/2.25f - msg_queue_height/2 + msg->msg_transition_animation,
video_info->height - msg->offset_y + msg_queue_text_scale_factor * video_font_size + msg_queue_height/4 - video_font_size/2.25f - msg_queue_height/2 + msg->msg_transition_animation,
video_info->width, video_info->height,
text_color,
TEXT_ALIGN_LEFT,
@@ -1143,7 +1152,7 @@ static void menu_widgets_draw_task_msg(menu_widget_msg_t *msg, video_frame_info_
menu_display_draw_text(font_regular,
msg->msg,
msg_queue_task_text_start_x,
video_info->height - msg->offset_y + msg_queue_text_scale_factor * settings->floats.video_font_size + msg_queue_height/4 - settings->floats.video_font_size/2.25f + msg->msg_transition_animation,
video_info->height - msg->offset_y + msg_queue_text_scale_factor * video_font_size + msg_queue_height/4 - video_font_size/2.25f + msg->msg_transition_animation,
video_info->width, video_info->height,
text_color,
TEXT_ALIGN_LEFT,
@@ -1166,7 +1175,7 @@ static void menu_widgets_draw_task_msg(menu_widget_msg_t *msg, video_frame_info_
menu_display_draw_text(font_regular,
task_percentage,
msg_queue_rect_start_x - msg_queue_icon_size_x + rect_width - msg_queue_glyph_width,
video_info->height - msg->offset_y + msg_queue_text_scale_factor * settings->floats.video_font_size + msg_queue_height/4 - settings->floats.video_font_size/2.25f,
video_info->height - msg->offset_y + msg_queue_text_scale_factor * video_font_size + msg_queue_height/4 - video_font_size/2.25f,
video_info->width, video_info->height,
text_color,
TEXT_ALIGN_RIGHT,
@@ -1336,14 +1345,14 @@ static void menu_widgets_draw_load_content_animation(video_frame_info_t *video_i
menu_widgets_draw_backdrop(video_info, load_content_animation_final_fade_alpha);
}
void menu_widgets_frame(video_frame_info_t *video_info)
void menu_widgets_frame(void *data)
{
size_t i;
int top_right_x_advance = video_info->width;
int scissor_me_timbers = 0;
settings_t *settings = config_get_ptr();
video_frame_info_t *video_info = (video_frame_info_t*)data;
int top_right_x_advance = video_info->width;
int scissor_me_timbers = 0;
settings_t *settings = config_get_ptr();
float video_font_size = settings->floats.video_font_size;
menu_widgets_frame_count++;
@@ -1474,7 +1483,7 @@ void menu_widgets_frame(video_frame_info_t *video_info)
menu_display_draw_text(font_regular,
msg_hash_to_str(MSG_SCREENSHOT_SAVED),
screenshot_thumbnail_width + simple_widget_padding, settings->floats.video_font_size * 1.9f + screenshot_y,
screenshot_thumbnail_width + simple_widget_padding, video_font_size * 1.9f + screenshot_y,
video_info->width, video_info->height,
text_color_faint,
TEXT_ALIGN_LEFT,
@@ -1491,7 +1500,7 @@ void menu_widgets_frame(video_frame_info_t *video_info)
menu_display_draw_text(font_regular,
shotname,
screenshot_thumbnail_width + simple_widget_padding, settings->floats.video_font_size * 2.9f + screenshot_y,
screenshot_thumbnail_width + simple_widget_padding, video_font_size * 2.9f + screenshot_y,
video_info->width, video_info->height,
text_color_info,
TEXT_ALIGN_LEFT,
@@ -1555,7 +1564,7 @@ void menu_widgets_frame(video_frame_info_t *video_info)
/* Title */
menu_display_draw_text(font_regular,
msg_hash_to_str(MSG_ACHIEVEMENT_UNLOCKED),
cheevo_height + simple_widget_padding - unfold_offet, settings->floats.video_font_size * 1.9f + cheevo_y,
cheevo_height + simple_widget_padding - unfold_offet, video_font_size * 1.9f + cheevo_y,
video_info->width, video_info->height,
text_color_faint,
TEXT_ALIGN_LEFT,
@@ -1568,7 +1577,7 @@ void menu_widgets_frame(video_frame_info_t *video_info)
menu_display_draw_text(font_regular,
cheevo_title,
cheevo_height + simple_widget_padding - unfold_offet, settings->floats.video_font_size * 2.9f + cheevo_y,
cheevo_height + simple_widget_padding - unfold_offet, video_font_size * 2.9f + cheevo_y,
video_info->width, video_info->height,
text_color_info,
TEXT_ALIGN_LEFT,
@@ -1592,24 +1601,22 @@ void menu_widgets_frame(video_frame_info_t *video_info)
menu_texture_item volume_icon = 0;
unsigned volume_width = video_info->width / 3;
unsigned volume_height = settings->floats.video_font_size * 4;
unsigned volume_height = video_font_size * 4;
unsigned icon_size = menu_widgets_icons_textures[MENU_WIDGETS_ICON_VOLUME_MED] ? volume_height : simple_widget_padding;
unsigned text_color = COLOR_TEXT_ALPHA(0xffffffff, (unsigned)(volume_text_alpha*255.0f));
unsigned text_color_db = COLOR_TEXT_ALPHA(text_color_faint, (unsigned)(volume_text_alpha*255.0f));
unsigned bar_x = icon_size;
unsigned bar_height = settings->floats.video_font_size/2;
unsigned bar_width = volume_width - bar_x - simple_widget_padding;
unsigned bar_y = volume_height / 2 + bar_height/2;
unsigned bar_x = icon_size;
unsigned bar_height = video_font_size / 2;
unsigned bar_width = volume_width - bar_x - simple_widget_padding;
unsigned bar_y = volume_height / 2 + bar_height/2;
float *bar_background = NULL;
float *bar_foreground = NULL;
float bar_percentage = 0.0f;
float *bar_background = NULL;
float *bar_foreground = NULL;
float bar_percentage = 0.0f;
if (volume_mute)
{
volume_icon = menu_widgets_icons_textures[MENU_WIDGETS_ICON_VOLUME_MUTE];
}
else if (volume_percent <= 1.0f)
{
if (volume_percent <= 0.5f)
@@ -1676,7 +1683,7 @@ void menu_widgets_frame(video_frame_info_t *video_info)
const char *text = msg_hash_to_str(MSG_AUDIO_MUTED);
menu_display_draw_text(font_regular,
text,
volume_width/2, volume_height/2 + settings->floats.video_font_size/3,
volume_width/2, volume_height/2 + video_font_size / 3,
video_info->width, video_info->height,
text_color, TEXT_ALIGN_CENTER,
1, false, 0, false
@@ -1712,7 +1719,7 @@ void menu_widgets_frame(video_frame_info_t *video_info)
menu_display_draw_text(font_regular,
msg,
volume_width - simple_widget_padding, settings->floats.video_font_size * 2,
volume_width - simple_widget_padding, video_font_size * 2,
video_info->width, video_info->height,
text_color_db,
TEXT_ALIGN_RIGHT,
@@ -1721,7 +1728,7 @@ void menu_widgets_frame(video_frame_info_t *video_info)
menu_display_draw_text(font_regular,
percentage_msg,
icon_size, settings->floats.video_font_size * 2,
icon_size, video_font_size * 2,
video_info->width, video_info->height,
text_color,
TEXT_ALIGN_LEFT,
@@ -1767,7 +1774,7 @@ void menu_widgets_frame(video_frame_info_t *video_info)
menu_display_draw_text(font_regular,
text,
top_right_x_advance - simple_widget_padding - text_width, settings->floats.video_font_size + simple_widget_padding/4,
top_right_x_advance - simple_widget_padding - text_width, video_font_size + simple_widget_padding/4,
video_info->width, video_info->height,
0xFFFFFFFF,
TEXT_ALIGN_LEFT,
@@ -1861,7 +1868,8 @@ void menu_widgets_context_reset(bool is_threaded,
char theme_path[PATH_MAX_LENGTH];
char ozone_path[PATH_MAX_LENGTH];
char font_path[PATH_MAX_LENGTH];
settings_t *settings = config_get_ptr();
settings_t *settings = config_get_ptr();
float video_font_size = settings->floats.video_font_size;
/* Textures paths */
fill_pathname_join(
@@ -1919,24 +1927,24 @@ void menu_widgets_context_reset(bool is_threaded,
if (settings->paths.path_font[0] == '\0')
{
fill_pathname_join(font_path, ozone_path, "regular.ttf", sizeof(font_path));
font_regular = menu_display_font_file(font_path, settings->floats.video_font_size, is_threaded);
font_regular = menu_display_font_file(font_path, video_font_size, is_threaded);
fill_pathname_join(font_path, ozone_path, "bold.ttf", sizeof(font_path));
font_bold = menu_display_font_file(font_path, settings->floats.video_font_size, is_threaded);
font_bold = menu_display_font_file(font_path, video_font_size, is_threaded);
}
else
{
font_regular = menu_display_font_file(settings->paths.path_font, settings->floats.video_font_size, is_threaded);
font_bold = menu_display_font_file(settings->paths.path_font, settings->floats.video_font_size, is_threaded);
font_regular = menu_display_font_file(settings->paths.path_font, video_font_size, is_threaded);
font_bold = menu_display_font_file(settings->paths.path_font, video_font_size, is_threaded);
}
/* Metrics */
simple_widget_padding = settings->floats.video_font_size * 2/3;
simple_widget_height = settings->floats.video_font_size + simple_widget_padding;
glyph_width = font_driver_get_message_width(font_regular, "a", 1, 1);
line_height = font_driver_get_line_height(font_regular, 1);
simple_widget_padding = video_font_size * 2/3;
simple_widget_height = video_font_size + simple_widget_padding;
glyph_width = font_driver_get_message_width(font_regular, "a", 1, 1);
line_height = font_driver_get_line_height(font_regular, 1);
msg_queue_height = settings->floats.video_font_size * 2.5f;
msg_queue_height = video_font_size * 2.5f;
if (msg_queue_has_icons)
{
@@ -1973,11 +1981,11 @@ void menu_widgets_context_reset(bool is_threaded,
msg_queue_task_text_start_x -= msg_queue_glyph_width*2;
msg_queue_regular_text_start = msg_queue_rect_start_x + msg_queue_regular_padding_x;
msg_queue_regular_text_base_y = settings->floats.video_font_size * msg_queue_text_scale_factor + msg_queue_height/2;
msg_queue_regular_text_base_y = video_font_size * msg_queue_text_scale_factor + msg_queue_height/2;
msg_queue_task_hourglass_x = msg_queue_rect_start_x - msg_queue_icon_size_x;
generic_message_height = settings->floats.video_font_size * 2;
generic_message_height = video_font_size * 2;
}
void menu_widgets_context_destroy(void)
@@ -1988,9 +1996,7 @@ void menu_widgets_context_destroy(void)
/* Textures */
for (i = 0; i < MENU_WIDGETS_ICON_LAST; i++)
{
video_driver_texture_unload(&menu_widgets_icons_textures[i]);
}
video_driver_texture_unload(&msg_queue_icon);
video_driver_texture_unload(&msg_queue_icon_outline);
@@ -2112,10 +2118,10 @@ static void menu_widgets_volume_timer_end(void *userdata)
void menu_widgets_volume_update_and_show(void)
{
menu_timer_ctx_entry_t entry;
settings_t *settings = config_get_ptr();
bool mute = *(audio_get_bool_ptr(AUDIO_ACTION_MUTE_ENABLE));
float new_volume = settings->floats.audio_volume;
menu_timer_ctx_entry_t entry;
menu_animation_kill_by_tag(&volume_tag);
@@ -2389,18 +2395,18 @@ static void menu_widgets_achievement_unfold(void *userdata)
menu_timer_start(&cheevo_timer, &timer);
}
static void menu_widgets_start_achievement_notification()
static void menu_widgets_start_achievement_notification(void)
{
settings_t *settings = config_get_ptr();
menu_animation_ctx_entry_t entry;
cheevo_height = settings->floats.video_font_size * 4;
cheevo_width = MAX(
settings_t *settings = config_get_ptr();
cheevo_height = settings->floats.video_font_size * 4;
cheevo_width = MAX(
font_driver_get_message_width(font_regular, msg_hash_to_str(MSG_ACHIEVEMENT_UNLOCKED), 0, 1),
font_driver_get_message_width(font_regular, cheevo_title, 0, 1)
);
cheevo_width += simple_widget_padding * 2;
cheevo_y = (float)(-(int)cheevo_height);
cheevo_unfold = 0.0f;
cheevo_width += simple_widget_padding * 2;
cheevo_y = (float)(-(int)cheevo_height);
cheevo_unfold = 0.0f;
/* Slide down animation */
entry.cb = menu_widgets_achievement_unfold;
@@ -2449,8 +2455,8 @@ void menu_widgets_push_achievement(const char *title, const char *badge)
static void menu_widgets_generic_message_fadeout(void *userdata)
{
menu_animation_ctx_tag tag = (uintptr_t) &generic_message_timer;
menu_animation_ctx_entry_t entry;
menu_animation_ctx_tag tag = (uintptr_t) &generic_message_timer;
/* Start fade out animation */
entry.cb = NULL;
@@ -2466,8 +2472,8 @@ static void menu_widgets_generic_message_fadeout(void *userdata)
void menu_widgets_set_message(char *msg)
{
menu_animation_ctx_tag tag = (uintptr_t) &generic_message_timer;
menu_timer_ctx_entry_t timer;
menu_animation_ctx_tag tag = (uintptr_t) &generic_message_timer;
strlcpy(generic_message, msg, GENERIC_MESSAGE_SIZE);
@@ -2486,8 +2492,8 @@ void menu_widgets_set_message(char *msg)
static void menu_widgets_libretro_message_fadeout(void *userdata)
{
menu_animation_ctx_tag tag = (uintptr_t) &libretro_message_timer;
menu_animation_ctx_entry_t entry;
menu_animation_ctx_tag tag = (uintptr_t) &libretro_message_timer;
/* Start fade out animation */
entry.cb = NULL;
@@ -2503,8 +2509,8 @@ static void menu_widgets_libretro_message_fadeout(void *userdata)
void menu_widgets_set_libretro_message(const char *msg, unsigned duration)
{
menu_animation_ctx_tag tag = (uintptr_t) &libretro_message_timer;
menu_timer_ctx_entry_t timer;
menu_animation_ctx_tag tag = (uintptr_t) &libretro_message_timer;
strlcpy(libretro_message, msg, LIBRETRO_MESSAGE_SIZE);
+7 -6
View File
@@ -16,11 +16,10 @@
#ifndef _MENU_WIDGETS_H
#define _MENU_WIDGETS_H
#include <formats/image.h>
#include <queues/task_queue.h>
#include <queues/message_queue.h>
#include "../../retroarch.h"
#define DEFAULT_BACKDROP 0.75f
#define MSG_QUEUE_PENDING_MAX 32
@@ -60,11 +59,13 @@ int menu_widgets_ai_service_overlay_get_state(void);
bool menu_widgets_ai_service_overlay_set_state(int state);
bool menu_widgets_ai_service_overlay_load(
char* buffer, unsigned buffer_len, enum image_type_enum image_type);
char* buffer, unsigned buffer_len,
enum image_type_enum image_type);
void menu_widgets_ai_service_overlay_unload(void);
void menu_widgets_start_load_content_animation(const char *content_name, bool remove_extension);
void menu_widgets_start_load_content_animation(
const char *content_name, bool remove_extension);
void menu_widgets_cleanup_load_content_animation(void);
@@ -84,7 +85,7 @@ void menu_widgets_set_libretro_message(const char *message, unsigned duration);
/* All the functions below should be called in
* the video driver - once they are all added, set
* enable_menu_widgets to true for that driver */
void menu_widgets_frame(video_frame_info_t *video_info);
void menu_widgets_frame(void *data);
bool menu_widgets_set_fps_text(const char *new_fps_text);
+10
View File
@@ -1177,6 +1177,7 @@ enum msg_hash_enums
MENU_LABEL(MENU_SETTINGS),
MENU_LABEL(THUMBNAILS_UPDATER_LIST),
MENU_LABEL(PL_THUMBNAILS_UPDATER_LIST),
MENU_LABEL(PL_THUMBNAILS_UPDATER_ENTRY),
MENU_LABEL(USER_INTERFACE_SETTINGS),
MENU_LABEL(POWER_MANAGEMENT_SETTINGS),
MENU_LABEL(RETRO_ACHIEVEMENTS_SETTINGS),
@@ -1261,6 +1262,7 @@ enum msg_hash_enums
MENU_ENUM_LABEL_DEFERRED_DROPDOWN_BOX_LIST_PLAYLIST_LEFT_THUMBNAIL_MODE,
MENU_ENUM_LABEL_DEFERRED_DROPDOWN_BOX_LIST_MANUAL_CONTENT_SCAN_SYSTEM_NAME,
MENU_ENUM_LABEL_DEFERRED_DROPDOWN_BOX_LIST_MANUAL_CONTENT_SCAN_CORE_NAME,
MENU_ENUM_LABEL_DEFERRED_DROPDOWN_BOX_LIST_DISK_INDEX,
MENU_ENUM_LABEL_DEFERRED_MIXER_STREAM_SETTINGS_LIST,
MENU_ENUM_LABEL_DEFERRED_CONFIGURATIONS_LIST,
MENU_ENUM_LABEL_DEFERRED_FAVORITES_LIST,
@@ -1449,6 +1451,7 @@ enum msg_hash_enums
MENU_LABEL(PAUSE_LIBRETRO),
MENU_LABEL(MENU_SAVESTATE_RESUME),
MENU_LABEL(MENU_INSERT_DISK_RESUME),
MENU_LABEL(DIRECTORY_NOT_FOUND),
MENU_LABEL(NO_ITEMS),
MENU_LABEL(NO_PLAYLISTS),
@@ -1909,6 +1912,8 @@ enum msg_hash_enums
MENU_LABEL(VIDEO_SHADER_PRESET_PARAMETERS),
MENU_LABEL(DISK_OPTIONS),
MENU_LABEL(DISK_CYCLE_TRAY_STATUS),
MENU_LABEL(DISK_TRAY_EJECT),
MENU_LABEL(DISK_TRAY_INSERT),
MENU_LABEL(NO_CORE_OPTIONS_AVAILABLE),
MENU_LABEL(DISK_INDEX),
MENU_LABEL(CORE_CHEAT_OPTIONS),
@@ -2022,6 +2027,11 @@ enum msg_hash_enums
MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_THUMBNAIL_MODE_DEFAULT,
MENU_LABEL(PLAYLIST_MANAGER_CLEAN_PLAYLIST),
MSG_PLAYLIST_MANAGER_CLEANING_PLAYLIST,
MSG_PLAYLIST_MANAGER_PLAYLIST_CLEANED,
MENU_LABEL(CORE_UPDATER_SETTINGS),
MENU_LABEL(LAKKA_SERVICES),
MENU_LABEL(SHADER_APPLY_CHANGES),
@@ -1,8 +1,8 @@
<!-- <!DOCTYPE manifest [ <!ENTITY % versionDTD SYSTEM "../../../version.dtd"> %versionDTD; ]> !-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.retroarch.legacy"
android:versionCode="1556806347"
android:versionName="1.8.3"
android:versionCode="1556806348"
android:versionName="1.8.4"
android:installLocation="internalOnly">
<uses-feature android:glEsVersion="0x00020000" />
<uses-feature android:name="android.hardware.touchscreen" android:required="false"/>
+2 -2
View File
@@ -2,8 +2,8 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.retroarch"
android:versionCode="1556806350"
android:versionName="1.8.3"
android:versionCode="1556806352"
android:versionName="1.8.4"
android:installLocation="internalOnly">
<uses-feature android:glEsVersion="0x00020000" />
<uses-feature android:name="android.hardware.touchscreen" android:required="false"/>
-6
View File
@@ -56,12 +56,6 @@ android {
abiFilters 'armeabi-v7a', 'x86'
}
}
gold {
applicationIdSuffix '.gold'
resValue "string", "app_name", "RetroArch Gold"
dimension "variant"
}
}
sourceSets {
+3 -3
View File
@@ -30,17 +30,17 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.8.3</string>
<string>1.8.4</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.8.3</string>
<string>1.8.4</string>
<key>LSMinimumSystemVersion</key>
<string>${MACOSX_DEPLOYMENT_TARGET}</string>
<key>NSHighResolutionCapable</key>
<true/>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2019 RetroArch. All rights reserved.</string>
<string>Copyright © 2020 RetroArch. All rights reserved.</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>
+3 -3
View File
@@ -30,17 +30,17 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.8.3</string>
<string>1.8.4</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.8.3</string>
<string>1.8.4</string>
<key>LSMinimumSystemVersion</key>
<string>${MACOSX_DEPLOYMENT_TARGET}</string>
<key>NSHighResolutionCapable</key>
<true/>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2019 RetroArch. All rights reserved.</string>
<string>Copyright © 2020 RetroArch. All rights reserved.</string>
<key>NSMainNibFile</key>
<string>MainMenu_Metal</string>
<key>NSPrincipalClass</key>
@@ -507,6 +507,7 @@
OTHER_CFLAGS = (
"-DHAVE_RUNAHEAD",
"-DHAVE_TRANSLATE",
"-DHAVE_ACCESSIBILITY",
"-DHAVE_SSL",
"-DHAVE_BUILTINMBEDTLS",
"-DHAVE_GRIFFIN",
@@ -580,6 +581,7 @@
OTHER_CFLAGS = (
"-DHAVE_RUNAHEAD",
"-DHAVE_TRANSLATE",
"-DHAVE_ACCESSIBILITY",
"-DHAVE_SSL",
"-DHAVE_BUILTINMBEDTLS",
"-DHAVE_GRIFFIN",
@@ -555,6 +555,7 @@
OTHER_CFLAGS = (
"-DHAVE_RUNAHEAD",
"-DHAVE_TRANSLATE",
"-DHAVE_ACCESSIBILITY",
"-DHAVE_SSL",
"-DHAVE_BUILTINMBEDTLS",
"-DHAVE_GRIFFIN",
@@ -632,6 +633,7 @@
OTHER_CFLAGS = (
"-DHAVE_RUNAHEAD",
"-DHAVE_TRANSLATE",
"-DHAVE_ACCESSIBILITY",
"-DHAVE_SSL",
"-DHAVE_BUILTINMBEDTLS",
"-DHAVE_GRIFFIN",
@@ -292,6 +292,7 @@
"-DMSB_FIRST",
"-DHAVE_RUNAHEAD",
"-DHAVE_TRANSLATE",
"-DHAVE_ACCESSIBILITY",
"-DHAVE_GRIFFIN",
"-DHAVE_MINIUPNPC",
"-DHAVE_BUILTINMINIUPNPC",
@@ -374,6 +375,7 @@
"-DMSB_FIRST",
"-DHAVE_RUNAHEAD",
"-DHAVE_TRANSLATE",
"-DHAVE_ACCESSIBILITY",
"-DHAVE_GRIFFIN",
"-DHAVE_MINIUPNPC",
"-DHAVE_BUILTINMINIUPNPC",
+2 -2
View File
@@ -33,11 +33,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.8.3</string>
<string>1.8.4</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.8.3</string>
<string>1.8.4</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIApplicationExitsOnSuspend</key>
+1 -1
View File
@@ -2,7 +2,7 @@
<qnx xmlns="http://www.qnx.com/schemas/application/1.0">
<id>com.RetroArch</id>
<versionNumber>1.8.2</versionNumber>
<versionNumber>1.8.4</versionNumber>
<buildId>3</buildId>
<description>Cross-platform entertainment system</description>
<author>Team Libretro</author>
+2 -2
View File
@@ -1,6 +1,6 @@
Name: retroarch
Version: 1.8.2
Release: v1.2
Version: 1.8.4
Release: v1.8.4
Summary: Official reference frontend for libretro
Group: Applications/Emulators
+43
View File
@@ -2498,6 +2498,49 @@ bool playlist_index_is_valid(playlist_t *playlist, size_t idx,
string_is_equal(path_basename(playlist->entries[idx].core_path), path_basename(core_path));
}
bool playlist_entries_are_equal(
const struct playlist_entry *entry_a,
const struct playlist_entry *entry_b,
bool fuzzy_archive_match)
{
char real_path_a[PATH_MAX_LENGTH];
char real_core_path_a[PATH_MAX_LENGTH];
real_path_a[0] = '\0';
real_core_path_a[0] = '\0';
/* Sanity check */
if (!entry_a || !entry_b)
return false;
if (string_is_empty(entry_a->path) &&
string_is_empty(entry_a->core_path) &&
string_is_empty(entry_b->path) &&
string_is_empty(entry_b->core_path))
return true;
/* Check content paths */
if (!string_is_empty(entry_a->path))
{
strlcpy(real_path_a, entry_a->path, sizeof(real_path_a));
path_resolve_realpath(real_path_a, sizeof(real_path_a), true);
}
if (!playlist_path_equal(
real_path_a, entry_b->path, fuzzy_archive_match))
return false;
/* Check core paths */
if (!string_is_empty(entry_a->core_path))
{
strlcpy(real_core_path_a, entry_a->core_path, sizeof(real_core_path_a));
if (!string_is_equal(real_core_path_a, "DETECT"))
path_resolve_realpath(real_core_path_a, sizeof(real_core_path_a), true);
}
return playlist_core_path_equal(real_core_path_a, entry_b->core_path);
}
void playlist_get_crc32(playlist_t *playlist, size_t idx,
const char **crc32)
{
+7
View File
@@ -252,6 +252,13 @@ void command_playlist_update_write(
bool playlist_index_is_valid(playlist_t *playlist, size_t idx,
const char *path, const char *core_path);
/* Returns true if specified playlist entries have
* identical content and core paths */
bool playlist_entries_are_equal(
const struct playlist_entry *entry_a,
const struct playlist_entry *entry_b,
bool fuzzy_archive_match);
void playlist_get_crc32(playlist_t *playlist, size_t idx,
const char **crc32);
+21 -15
View File
@@ -4,10 +4,17 @@
# Only needed when check_enabled ($2), check_platform, check_lib, check_pkgconf,
# check_header, check_macro and check_switch are not used.
check_switch '' C99 -std=gnu99 "Cannot find C99 compatible compiler."
check_switch '' NOUNUSED -Wno-unused-result
check_switch '' C99 -std=gnu99 ''
if [ "$HAVE_C99" = 'no' ]; then
HAVE_C99='auto'
check_switch '' C99 -std=c99 'Cannot find a C99 compatible compiler.'
fi
check_switch cxx CXX11 -std=c++11 ''
check_switch '' NOUNUSED -Wno-unused-result ''
add_define MAKEFILE NOUNUSED "$HAVE_NOUNUSED"
check_switch '' NOUNUSED_VARIABLE -Wno-unused-variable
check_switch '' NOUNUSED_VARIABLE -Wno-unused-variable ''
add_define MAKEFILE NOUNUSED_VARIABLE "$HAVE_NOUNUSED_VARIABLE"
# There are still broken 64-bit Linux distros out there. :)
@@ -112,22 +119,19 @@ if [ "$HAVE_ANGLE" = 'yes' ]; then
add_opt OPENGLES yes
add_define MAKEFILE OPENGLES_LIBS "-lGLESv2"
case "$(uname -s)" in
MINGW32*)
add_dirs LIBRARY ./pkg/windows/x86
case "$PLATFORM_NAME" in
MINGW32* )
add_dirs LIBRARY ./pkg/windows/x86
;;
MINGW64*)
add_dirs LIBRARY ./pkg/windows/x86_64
MINGW64* )
add_dirs LIBRARY ./pkg/windows/x86_64
;;
*)
;;
esac
esac
else
check_header EGL EGL/egl.h EGL/eglext.h
# some systems have EGL libs, but no pkgconfig
# https://github.com/linux-sunxi/sunxi-mali/pull/8
check_val '' EGL "-l${VC_PREFIX}EGL $EXTRA_GL_LIBS" '' "${VC_PREFIX}egl" '' '' true
# some systems have EGL libs, but no pkgconfig
# https://github.com/linux-sunxi/sunxi-mali/pull/8
check_val '' EGL "-l${VC_PREFIX}EGL $EXTRA_GL_LIBS" '' "${VC_PREFIX}egl" '' '' true
fi
if [ "$HAVE_EGL" = 'yes' ]; then
@@ -264,6 +268,8 @@ if [ "$HAVE_SDL2" = 'yes' ] && [ "$HAVE_SDL" = 'yes' ]; then
HAVE_SDL=no
fi
check_enabled CXX11 CXX C++ 'C++11 support is' false
check_platform Haiku DISCORD 'Discord is' false
check_enabled CXX DISCORD discord 'The C++ compiler is' false
check_enabled CXX QT 'Qt companion' 'The C++ compiler is' false
+1 -1
View File
@@ -1,4 +1,4 @@
QT_VERSION=qt5
QT_FLAGS="$QT5CORE_CFLAGS $QT5CORE_LIBS"
QT_FLAGS="$CXX11_CFLAGS $QT5CORE_CFLAGS $QT5CORE_LIBS"
add_define MAKEFILE QT_VERSION "$QT_VERSION"
+1
View File
@@ -135,6 +135,7 @@ HAVE_CHEEVOS=yes # Retro Achievements
HAVE_LUA=no # Lua support (for Retro Achievements)
HAVE_DISCORD=yes # Discord Integration
C89_DISCORD=no
HAVE_ACCESSIBILITY=yes # Accessibility Integration
HAVE_TRANSLATE=yes # OCR and Translation Server Integration
HAVE_SHADERPIPELINE=yes # Additional shader-based pipelines
C89_SHADERPIPELINE=no
+37 -12
View File
@@ -15,19 +15,42 @@ cat << EOF > "$TEMP_C"
int main(void) { puts("Hai world!"); return 0; }
EOF
# test_compiler:
# Check that the compiler exists in the $PATH and works
# $1 = compiler
# $2 = temporary build file
test_compiler ()
{
compiler=
for comp in $(printf %s "$1"); do
if ! next "$comp"; then
compiler="${compiler} $(exists "${comp}")" ||
return 1
fi
done
$(printf %s "$1") -o "$TEMP_EXE" "$2" >/dev/null 2>&1 || return 1
compiler="${compiler# }"
return 0
}
printf %s 'Checking for suitable working C compiler ... '
cc_works=0
add_opt CC no
if [ "$CC" ]; then
$CC -o "$TEMP_EXE" "$TEMP_C" >/dev/null 2>&1 && cc_works=1
if test_compiler "$CC" "$TEMP_C"; then
cc_works=1
fi
else
for cc in gcc cc clang; do
CC="$(exists "${CROSS_COMPILE}${cc}")" || CC=""
if [ "$CC" ]; then
$CC -o "$TEMP_EXE" "$TEMP_C" >/dev/null 2>&1 && {
cc_works=1; break
}
if test_compiler "${CROSS_COMPILE}${cc}" "$TEMP_C"; then
CC="$compiler"
cc_works=1
break
fi
done
fi
@@ -58,15 +81,17 @@ printf %s 'Checking for suitable working C++ compiler ... '
cxx_works=0
add_opt CXX no
if [ "$CXX" ]; then
$CXX -o "$TEMP_EXE" "$TEMP_CXX" >/dev/null 2>&1 && cxx_works=1
if test_compiler "$CXX" "$TEMP_CXX"; then
cxx_works=1
fi
else
for cxx in g++ c++ clang++; do
CXX="$(exists "${CROSS_COMPILE}${cxx}")" || CXX=""
if [ "$CXX" ]; then
$CXX -o "$TEMP_EXE" "$TEMP_CXX" >/dev/null 2>&1 && {
cxx_works=1; break
}
if test_compiler "${CROSS_COMPILE}${cxx}" "$TEMP_CXX"; then
CXX="$compiler"
cxx_works=1
break
fi
done
fi
+28 -16
View File
@@ -23,22 +23,29 @@ exists()
while [ $# -gt 0 ]; do
arg="$1"
shift 1
case "$arg" in ''|*/) continue ;; esac
x="${arg##*/}"
z="${arg%/*}"
[ ! -f "$z/$x" ] || [ ! -x "$z/$x" ] && [ "$z/$x" = "$arg" ] &&
continue
[ "$x" = "$z" ] && [ -x "$z/$x" ] && [ ! -f "$arg" ] && z=
p=":$z:$PATH"
while [ "$p" != "${p#*:}" ]; do
p="${p#*:}"
d="${p%%:*}"
if [ -f "$d/$x" ] && [ -x "$d/$x" ]; then
printf %s\\n "$d/$x"
v=0
break
fi
done
case "$arg" in
''|*/ )
:
;;
*/* )
if [ -f "$arg" ] && [ -x "$arg" ]; then
printf %s\\n "$arg"
v=0
fi
;;
* )
p=":$PATH"
while [ "$p" != "${p#*:}" ]; do
p="${p#*:}"
d="${p%%:*}/$arg"
if [ -f "$d" ] && [ -x "$d" ]; then
printf %s\\n "$d"
v=0
break
fi
done
;;
esac
done
return $v
}
@@ -58,3 +65,8 @@ match()
done
return 1
}
# next:
# Check if the next argument starts with a dash
# $1 = arg
next () { case "$1" in -*) return 0 ;; *) return 1 ;; esac; }
+37 -31
View File
@@ -28,6 +28,7 @@ add_dirs()
shift
done
eval "${ADD}_DIRS=\"\${${ADD}_DIRS# }\""
BUILD_DIRS="$INCLUDE_DIRS $LIBRARY_DIRS"
}
# check_compiler:
@@ -157,42 +158,44 @@ check_lib()
printf %s\\n 'int main(void) { return 0; }' > "$TEMP_CODE"
fi
val="$2"
lib="${3% }"
include="${7:-}"
error="${8:-}"
answer='no'
printf %s "$MSG $lib ... "
eval "set -- $INCLUDE_DIRS $LIBRARY_DIRS $5 $FLAGS $LDFLAGS $lib"
$COMPILER -o "$TEMP_EXE" "$TEMP_CODE" "$@" >>config.log 2>&1 && answer='yes'
$(printf %s "$COMPILER") -o "$TEMP_EXE" "$TEMP_CODE" \
$(printf %s "$BUILD_DIRS $5 $FLAGS $LDFLAGS $lib") \
>>config.log 2>&1 && answer='yes'
printf %s\\n "$answer"
if [ "$answer" = 'yes' ] && [ "$include" ]; then
answer='no'
eval "set -- $INCLUDES"
for dir do
for dir in $(printf %s "$INCLUDES"); do
[ "$answer" = 'yes' ] && break
printf %s "Checking existence of /$dir/$include ... "
if [ -d "/$dir/$include" ]; then
eval "${val}_CFLAGS=\"-I/$dir/$include\""
eval "${2}_CFLAGS=\"-I/$dir/$include\""
answer='yes'
fi
printf %s\\n "$answer"
done
fi
eval "HAVE_$val=\"$answer\""
eval "HAVE_$2=\"$answer\""
rm -f -- "$TEMP_CODE" "$TEMP_EXE"
if [ "$answer" = 'no' ]; then
[ "$error" ] && die 1 "$error"
setval="$(eval "printf %s \"\$USER_$val\"")"
setval="$(eval "printf %s \"\$USER_$2\"")"
if [ "$setval" = 'yes' ]; then
die 1 "Forced to build with library $lib, but cannot locate. Exiting ..."
fi
else
eval "${val}_LIBS=\"$lib\""
PKG_CONF_USED="$PKG_CONF_USED $val"
eval "${2}_LIBS=\"$lib\""
PKG_CONF_USED="$PKG_CONF_USED $2"
fi
return 0
@@ -224,42 +227,39 @@ check_pkgconf()
return 0
}
val="$1"
ver="${3:-0.0}"
err="${4:-}"
lib="${5:-}"
answer='no'
version='no'
eval "set -- ${2#* }"
for pkgnam do
for pkgnam in $(printf %s "${2#* }"); do
[ "$answer" = 'yes' ] && break
printf %s "$MSG $pkgnam$ECHOBUF ... "
eval "set -- $ver"
for pkgver do
for pkgver in $(printf %s "$ver"); do
if "$PKG_CONF_PATH" --atleast-version="$pkgver" "$pkgnam"; then
answer='yes'
version="$("$PKG_CONF_PATH" --modversion "$pkgnam")"
eval "${val}_CFLAGS=\"$("$PKG_CONF_PATH" --cflags "$pkgnam")\""
eval "${val}_LIBS=\"$("$PKG_CONF_PATH" --libs "$pkgnam")\""
eval "${val}_VERSION=\"$pkgver\""
eval "${1}_CFLAGS=\"$("$PKG_CONF_PATH" --cflags "$pkgnam")\""
eval "${1}_LIBS=\"$("$PKG_CONF_PATH" --libs "$pkgnam")\""
eval "${1}_VERSION=\"$pkgver\""
break
fi
done
printf %s\\n "$version"
done
eval "HAVE_$val=\"$answer\""
eval "HAVE_$1=\"$answer\""
if [ "$answer" = 'no' ]; then
[ "$lib" != 'true' ] || return 0
[ "$err" ] && die 1 "$err"
setval="$(eval "printf %s \"\$USER_$val\"")"
setval="$(eval "printf %s \"\$USER_$1\"")"
if [ "$setval" = 'yes' ]; then
die 1 "Forced to build with package $pkg, but cannot locate. Exiting ..."
fi
else
PKG_CONF_USED="$PKG_CONF_USED $val"
PKG_CONF_USED="$PKG_CONF_USED $1"
fi
}
@@ -281,8 +281,9 @@ check_header()
printf %s\\n "int main(void) { return 0; }" >> "$TEMP_C"
answer='no'
printf %s "Checking presence of header file $CHECKHEADER ... "
eval "set -- $CFLAGS $INCLUDE_DIRS"
$CC -o "$TEMP_EXE" "$TEMP_C" "$@" >>config.log 2>&1 && answer='yes'
$(printf %s "$CC") -o "$TEMP_EXE" "$TEMP_C" \
$(printf %s "$BUILD_DIRS $CFLAGS $LDFLAGS") >>config.log 2>&1 &&
answer='yes'
eval "HAVE_$val=\"$answer\""
printf %s\\n "$answer"
rm -f -- "$TEMP_C" "$TEMP_EXE"
@@ -317,8 +318,9 @@ EOF
val="$1"
macro="$2"
printf %s "Checking presence of predefined macro $macro$ECHOBUF ... "
eval "set -- $CFLAGS $INCLUDE_DIRS"
$CC -o "$TEMP_EXE" "$TEMP_C" "$@" >>config.log 2>&1 && answer='yes'
$(printf %s "$CC") -o "$TEMP_EXE" "$TEMP_C" \
$(printf %s "$BUILD_DIRS $CFLAGS $LDFLAGS") >>config.log 2>&1 &&
answer='yes'
eval "HAVE_$val=\"$answer\""
printf %s\\n "$answer"
rm -f -- "$TEMP_C" "$TEMP_EXE"
@@ -340,11 +342,16 @@ check_switch()
printf %s\\n 'int main(void) { return 0; }' > "$TEMP_CODE"
answer='no'
printf %s "Checking for availability of switch $3 in $COMPILER ... "
$COMPILER -o "$TEMP_EXE" "$TEMP_CODE" "$3" >>config.log 2>&1 && answer='yes'
$(printf %s "$COMPILER") -o "$TEMP_EXE" "$TEMP_CODE" \
$(printf %s "$BUILD_DIRS $CFLAGS $3 -Werror $LDFLAGS") \
>>config.log 2>&1 && answer='yes'
eval "HAVE_$2=\"$answer\""
printf %s\\n "$answer"
rm -f -- "$TEMP_CODE" "$TEMP_EXE"
if [ "$answer" = 'no' ] && [ "${4:-}" ]; then
if [ "$answer" = 'yes' ]; then
eval "${2}_CFLAGS=\"$3\""
PKG_CONF_USED="$PKG_CONF_USED $2"
elif [ "${4:-}" ]; then
die 1 "$4"
fi
}
@@ -408,8 +415,7 @@ create_config_header()
shift
done
eval "set -- $CONFIG_DEFINES"
for VAR do
for VAR in $(printf %s "$CONFIG_DEFINES"); do
printf %s\\n "#define ${VAR%%=*} ${VAR#*=}"
done
@@ -482,8 +488,8 @@ create_config_make()
esac
shift
done
eval "set -- $MAKEFILE_DEFINES"
for VAR do
for VAR in $(printf %s "$MAKEFILE_DEFINES"); do
printf %s\\n "${VAR%%=*} = ${VAR#*=}"
done
+9 -7
View File
@@ -23,22 +23,24 @@ if [ "$HAVE_QT" = "yes" ]; then
moc_works=0
if [ "$MOC" ]; then
QT_SELECT="$QT_VERSION" \
$MOC -o "$TEMP_CPP" "$TEMP_MOC" >/dev/null 2>&1 &&
$CXX -o "$TEMP_EXE" $(printf %s "$QT_FLAGS") \
-fPIC -c "$TEMP_CPP" >/dev/null 2>&1 &&
"$MOC" -o "$TEMP_CPP" "$TEMP_MOC" >/dev/null 2>&1 &&
$(printf %s "$CXX") -o "$TEMP_EXE" \
$(printf %s "$QT_FLAGS") -fPIC -c "$TEMP_CPP" \
>/dev/null 2>&1 &&
moc_works=1
else
for moc in "moc-$QT_VERSION" moc; do
MOC="$(exists "$moc")" || MOC=""
if [ "$MOC" ]; then
QT_SELECT="$QT_VERSION" \
$MOC -o "$TEMP_CPP" "$TEMP_MOC" >/dev/null 2>&1 ||
"$MOC" -o "$TEMP_CPP" "$TEMP_MOC" >/dev/null 2>&1 ||
continue
$CXX -o "$TEMP_EXE" $(printf %s "$QT_FLAGS") \
-fPIC -c "$TEMP_CPP" >/dev/null 2>&1 && {
if $(printf %s "$CXX") -o "$TEMP_EXE" \
$(printf %s "$QT_FLAGS") -fPIC -c \
"$TEMP_CPP" >/dev/null 2>&1; then
moc_works=1
break
}
fi
fi
done
fi
+3 -1
View File
@@ -1,3 +1,5 @@
PLATFORM_NAME="$(uname -s)"
if [ -n "${CROSS_COMPILE:=}" ]; then
case "$CROSS_COMPILE" in
*'-mingw32'*) OS='Win32';;
@@ -7,7 +9,7 @@ if [ -n "${CROSS_COMPILE:=}" ]; then
fi
if [ -z "$CROSS_COMPILE" ] || [ -z "$OS" ]; then
case "$(uname)" in
case "$PLATFORM_NAME" in
'Linux') OS='Linux';;
*'BSD') OS='BSD';;
'Darwin') OS='Darwin';;
+236 -120
View File
@@ -31,10 +31,13 @@
#if defined(DINGUX)
#include <sys/types.h>
#include <signal.h>
#include <unistd.h>
#endif
#if (defined(__linux__) || defined(__unix__) || defined(DINGUX)) && !defined(EMSCRIPTEN)
#include <signal.h>
#endif
#if defined(_WIN32_WINNT) && _WIN32_WINNT < 0x0500 || defined(_XBOX)
#ifndef LEGACY_WIN32
#define LEGACY_WIN32
@@ -225,6 +228,10 @@
#include "runahead/mem_util.h"
#endif
#ifdef HAVE_ACCESSIBILITY
#include "accessibility.h"
#endif
#ifdef HAVE_THREADS
#include "audio/audio_thread_wrapper.h"
#endif
@@ -915,12 +922,21 @@ static midi_driver_t *midi_drivers[] = {
&midi_null
};
static void *nullcamera_init(const char *device, uint64_t caps,
unsigned width, unsigned height) { return (void*)-1; }
static void nullcamera_free(void *data) { }
static bool nullcamera_start(void *data) { return true; }
static void nullcamera_stop(void *data) { }
static bool nullcamera_poll(void *a,
retro_camera_frame_raw_framebuffer_t b,
retro_camera_frame_opengl_texture_t c) { return true; }
static camera_driver_t camera_null = {
NULL,
NULL,
NULL,
NULL,
NULL,
nullcamera_init,
nullcamera_free,
nullcamera_start,
nullcamera_stop,
nullcamera_poll,
"null",
};
@@ -1120,7 +1136,7 @@ static char runtime_content_path[PATH_MAX_LENGTH] = {0};
static char runtime_core_path[PATH_MAX_LENGTH] = {0};
static char timestamped_log_file_name[64] = {0};
static char log_file_override_path[PATH_MAX_LENGTH] = {0};
static char launch_arguments[4096];
static char launch_arguments[4096] = {0};
static char current_library_name[1024] = {0};
static char current_library_version[1024] = {0};
static char current_valid_extensions[1024] = {0};
@@ -1128,9 +1144,6 @@ static char error_string[255] = {0};
static char cached_video_driver[32] = {0};
/* PATHS */
#define MENU_VALUE_NO_CORE 0x7d5472cbU
struct rarch_dir_list
{
struct string_list *list;
@@ -1165,7 +1178,13 @@ static const void *wifi_driver_find_handle(int idx);
static const void *camera_driver_find_handle(int idx);
static const void *input_driver_find_handle(int idx);
static const void *joypad_driver_find_handle(int idx);
#ifdef HAVE_HID
static const void *hid_driver_find_handle(int idx);
#endif
#ifdef HAVE_ACCESSIBILITY
static bool is_narrator_running(void);
static bool accessibility_startup_message(void);
#endif
static bool midi_driver_read(uint8_t *byte);
static bool midi_driver_write(uint8_t byte, uint32_t delta_time);
@@ -2474,9 +2493,22 @@ void dir_check_defaults(void)
}
}
#ifdef HAVE_ACCESSIBILITY
/* Is text-to-speech accessibility turned on? */
static bool accessibility_enabled = false;
/* Accessibility */
static int speak_pid = 0;
bool is_accessibility_enabled(void)
{
settings_t *settings = configuration_settings;
if (accessibility_enabled || settings->bools.accessibility_enable)
return true;
return false;
}
#endif
#ifdef HAVE_MENU
/* MENU INPUT GLOBAL VARIABLES */
static const char **menu_input_dialog_keyboard_buffer = {NULL};
@@ -2598,10 +2630,11 @@ bool menu_input_dialog_start_search(void)
input_keyboard_ctl(RARCH_INPUT_KEYBOARD_CTL_LINE_FREE, NULL);
#ifdef HAVE_ACCESSIBILITY
if (is_accessibility_enabled())
{
accessibility_speak((char*) msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SEARCH));
}
accessibility_speak_priority((char*)
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SEARCH), 10);
#endif
menu_input_dialog_keyboard_buffer =
input_keyboard_start_line(menu, menu_input_search_cb);
@@ -2631,7 +2664,9 @@ bool menu_input_dialog_start(menu_input_ctx_line_t *line)
input_keyboard_ctl(RARCH_INPUT_KEYBOARD_CTL_LINE_FREE, NULL);
accessibility_speak("Keyboard input:");
#ifdef HAVE_ACCESSIBILITY
accessibility_speak_priority("Keyboard input:", 10);
#endif
menu_input_dialog_keyboard_buffer =
input_keyboard_start_line(menu, line->cb);
@@ -3167,13 +3202,13 @@ typedef struct input_list_element_t
unsigned int state_size;
} input_list_element;
#ifdef HAVE_RUNAHEAD
static size_t runahead_save_state_size = 0;
static bool runahead_save_state_size_known = false;
static bool request_fast_savestate = false;
static bool hard_disable_audio = false;
#ifdef HAVE_RUNAHEAD
/* Save State List for Run Ahead */
static MyList *runahead_save_state_list = NULL;
static MyList *input_state_list = NULL;
@@ -3529,7 +3564,9 @@ static bool bsv_movie_check(void);
static void driver_uninit(int flags);
static void drivers_init(int flags);
#if defined(HAVE_RUNAHEAD)
static void core_free_retro_game_info(struct retro_game_info *dest);
#endif
static bool core_load(unsigned poll_type_behavior);
static bool core_unload_game(void);
@@ -4617,8 +4654,10 @@ static void handle_translation_cb(
}
#endif
#ifdef HAVE_ACCESSIBILITY
if (text_string && is_accessibility_enabled())
accessibility_speak(text_string);
accessibility_speak_priority(text_string, 10);
#endif
finish:
if (error)
@@ -5069,7 +5108,7 @@ static bool run_translation_service(void)
settings->arrays.ai_service_url, sizeof(new_ai_service_url));
/* if query already exists in url, then use &'s instead */
if (strrchr(new_ai_service_url, '?') != NULL)
if (strrchr(new_ai_service_url, '?'))
separator = '&';
/* source lang */
@@ -5226,19 +5265,23 @@ static void command_event_disk_control_set_eject(bool new_state, bool print_log)
else
RARCH_LOG("%s\n", msg);
/* Only noise in menu. */
if (print_log)
runloop_msg_queue_push(msg, 1, 180, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
/* Errors should always be displayed */
if (print_log || error)
runloop_msg_queue_push(
msg, 1, error ? 180 : 60,
true, NULL,
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
}
}
/**
* command_event_disk_control_set_index:
* @idx : Index of disk to set as current.
* @print_log : Show message onscreen.
*
* Sets current disk to @index.
**/
static void command_event_disk_control_set_index(unsigned idx)
static void command_event_disk_control_set_index(unsigned idx, bool print_log)
{
unsigned num_disks;
char msg[128];
@@ -5286,7 +5329,13 @@ static void command_event_disk_control_set_index(unsigned idx)
RARCH_ERR("%s\n", msg);
else
RARCH_LOG("%s\n", msg);
runloop_msg_queue_push(msg, 1, 180, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
/* Errors should always be displayed */
if (print_log || error)
runloop_msg_queue_push(
msg, 1, error ? 180 : 60,
true, NULL,
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
}
}
@@ -5303,9 +5352,18 @@ static bool command_event_disk_control_append_image(const char *path)
struct retro_game_info info = {0};
const struct retro_disk_control_callback *control = NULL;
rarch_system_info_t *sysinfo = &runloop_system;
const char *disk_filename = NULL;
msg[0] = '\0';
if (string_is_empty(path))
return false;
disk_filename = path_basename(path);
if (string_is_empty(disk_filename))
return false;
if (sysinfo)
control = (const struct retro_disk_control_callback*)
&sysinfo->disk_control_cb;
@@ -5324,9 +5382,12 @@ static bool command_event_disk_control_append_image(const char *path)
info.path = path;
control->replace_image_index(new_idx, &info);
snprintf(msg, sizeof(msg), "%s: %s", msg_hash_to_str(MSG_APPENDED_DISK), path);
snprintf(msg, sizeof(msg), "%s: %s", msg_hash_to_str(MSG_APPENDED_DISK), disk_filename);
RARCH_LOG("%s\n", msg);
runloop_msg_queue_push(msg, 0, 180, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
/* This message should always be displayed, since
* the menu itself does not provide sufficient
* visual feedback */
runloop_msg_queue_push(msg, 0, 120, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
#ifdef HAVE_THREADS
retroarch_autosave_deinit();
@@ -5344,7 +5405,7 @@ static bool command_event_disk_control_append_image(const char *path)
}
command_event(CMD_EVENT_AUTOSAVE_INIT, NULL);
command_event_disk_control_set_index(new_idx);
command_event_disk_control_set_index(new_idx, false);
command_event_disk_control_set_eject(false, false);
return true;
@@ -5353,11 +5414,12 @@ static bool command_event_disk_control_append_image(const char *path)
/**
* command_event_check_disk_prev:
* @control : Handle to disk control handle.
* @print_log : Show message onscreen.
*
* Perform disk cycle to previous index action (Core Disk Options).
**/
static void command_event_check_disk_prev(
const struct retro_disk_control_callback *control)
const struct retro_disk_control_callback *control, bool print_log)
{
unsigned num_disks = 0;
unsigned current = 0;
@@ -5380,17 +5442,18 @@ static void command_event_check_disk_prev(
if (current > 0)
current--;
command_event_disk_control_set_index(current);
command_event_disk_control_set_index(current, print_log);
}
/**
* command_event_check_disk_next:
* @control : Handle to disk control handle.
* @print_log : Show message onscreen.
*
* Perform disk cycle to next index action (Core Disk Options).
**/
static void command_event_check_disk_next(
const struct retro_disk_control_callback *control)
const struct retro_disk_control_callback *control, bool print_log)
{
unsigned num_disks = 0;
unsigned current = 0;
@@ -5413,7 +5476,7 @@ static void command_event_check_disk_next(
if (current < num_disks - 1)
current++;
command_event_disk_control_set_index(current);
command_event_disk_control_set_index(current, print_log);
}
/**
@@ -6547,8 +6610,10 @@ bool command_event(enum event_command cmd, void *data)
}
else
{
#ifdef HAVE_ACCESSIBILITY
if (is_accessibility_enabled())
accessibility_speak((char*) msg_hash_to_str(MSG_UNPAUSED));
accessibility_speak_priority((char*) msg_hash_to_str(MSG_UNPAUSED), 10);
#endif
command_event(CMD_EVENT_UNPAUSE, NULL);
}
}
@@ -7250,13 +7315,16 @@ TODO: Add a setting for these tweaks */
case CMD_EVENT_PAUSE_TOGGLE:
boolean = runloop_paused;
boolean = !boolean;
#ifdef HAVE_ACCESSIBILITY
if (is_accessibility_enabled())
{
if (boolean)
accessibility_speak((char*) msg_hash_to_str(MSG_PAUSED));
accessibility_speak_priority((char*) msg_hash_to_str(MSG_PAUSED), 10);
else
accessibility_speak((char*) msg_hash_to_str(MSG_UNPAUSED));
accessibility_speak_priority((char*) msg_hash_to_str(MSG_UNPAUSED), 10);
}
#endif
runloop_paused = boolean;
retroarch_pause_checks();
@@ -7515,6 +7583,7 @@ TODO: Add a setting for these tweaks */
case CMD_EVENT_DISK_EJECT_TOGGLE:
{
rarch_system_info_t *info = &runloop_system;
bool *show_msg = (bool*)data;
if (info && info->disk_control_cb.get_num_images)
{
@@ -7525,7 +7594,20 @@ TODO: Add a setting for these tweaks */
if (control)
{
bool new_state = !control->get_eject_state();
command_event_disk_control_set_eject(new_state, true);
bool print_log = true;
bool refresh = false;
if (show_msg)
print_log = *show_msg;
command_event_disk_control_set_eject(new_state, print_log);
#if defined(HAVE_MENU)
/* It is necessary to refresh the disk options
* menu when toggling the tray state */
menu_entries_ctl(MENU_ENTRIES_CTL_SET_REFRESH, &refresh);
menu_driver_ctl(RARCH_MENU_CTL_SET_PREVENT_POPULATE, NULL);
#endif
}
}
else
@@ -7538,12 +7620,14 @@ TODO: Add a setting for these tweaks */
case CMD_EVENT_DISK_NEXT:
{
rarch_system_info_t *info = &runloop_system;
bool *show_msg = (bool*)data;
if (info && info->disk_control_cb.get_num_images)
{
const struct retro_disk_control_callback *control =
(const struct retro_disk_control_callback*)
&info->disk_control_cb;
bool print_log = true;
if (!control)
return false;
@@ -7551,7 +7635,10 @@ TODO: Add a setting for these tweaks */
if (!control->get_eject_state())
return false;
command_event_check_disk_next(control);
if (show_msg)
print_log = *show_msg;
command_event_check_disk_next(control, print_log);
}
else
runloop_msg_queue_push(
@@ -7563,6 +7650,40 @@ TODO: Add a setting for these tweaks */
case CMD_EVENT_DISK_PREV:
{
rarch_system_info_t *info = &runloop_system;
bool *show_msg = (bool*)data;
if (info && info->disk_control_cb.get_num_images)
{
const struct retro_disk_control_callback *control =
(const struct retro_disk_control_callback*)
&info->disk_control_cb;
bool print_log = true;
if (!control)
return false;
if (!control->get_eject_state())
return false;
if (show_msg)
print_log = *show_msg;
command_event_check_disk_prev(control, print_log);
}
else
runloop_msg_queue_push(
msg_hash_to_str(MSG_CORE_DOES_NOT_SUPPORT_DISK_OPTIONS),
1, 120, true,
NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
}
break;
case CMD_EVENT_DISK_INDEX:
{
rarch_system_info_t *info = &runloop_system;
unsigned *index = (unsigned*)data;
if (!index)
return false;
if (info && info->disk_control_cb.get_num_images)
{
@@ -7573,10 +7694,9 @@ TODO: Add a setting for these tweaks */
if (!control)
return false;
if (!control->get_eject_state())
return false;
command_event_check_disk_prev(control);
/* Note: Menu itself provides visual feedback - no
* need to print info message to screen */
command_event_disk_control_set_index(*index, false);
}
else
runloop_msg_queue_push(
@@ -7718,12 +7838,16 @@ TODO: Add a setting for these tweaks */
if (settings->uints.ai_service_mode == 1 && is_ai_service_speech_running())
{
ai_service_speech_stop();
#ifdef HAVE_ACCESSIBILITY
if (is_accessibility_enabled())
accessibility_speak("stopped.");
accessibility_speak_priority("stopped.", 10);
#endif
}
#ifdef HAVE_ACCESSIBILITY
else if (is_accessibility_enabled() && settings->uints.ai_service_mode == 2 &&
is_narrator_running())
accessibility_speak("stopped.");
accessibility_speak_priority("stopped.", 10);
#endif
else
{
RARCH_LOG("AI Service Called...\n");
@@ -16500,13 +16624,6 @@ void input_pad_connect(unsigned port, input_device_driver_t *driver)
}
#ifdef HAVE_HID
/**
* hid_driver_find_handle:
* @idx : index of driver to get handle to.
*
* Returns: handle to HID driver at index. Can be NULL
* if nothing found.
**/
static const void *hid_driver_find_handle(int idx)
{
const void *drv = hid_drivers[idx];
@@ -16761,6 +16878,7 @@ void input_keyboard_event(bool down, unsigned code,
uint32_t character, uint16_t mod, unsigned device)
{
static bool deferred_wait_keys;
#ifdef HAVE_ACCESSIBILITY
#ifdef HAVE_MENU
if (menu_input_dialog_get_display_kb()
&& down && is_accessibility_enabled())
@@ -16768,85 +16886,86 @@ void input_keyboard_event(bool down, unsigned code,
if (code != 303 && code != 0)
{
char* say_char = (char*) malloc(sizeof(char)+1);
if (say_char != NULL)
if (say_char)
{
char c = (char) character;
*say_char = c;
if (character == 127)
accessibility_speak("backspace");
accessibility_speak_priority("backspace", 10);
else if (c == '`')
accessibility_speak("left quote");
accessibility_speak_priority("left quote", 10);
else if (c == '`')
accessibility_speak("tilde");
accessibility_speak_priority("tilde", 10);
else if (c == '!')
accessibility_speak("exclamation point");
accessibility_speak_priority("exclamation point", 10);
else if (c == '@')
accessibility_speak("at sign");
accessibility_speak_priority("at sign", 10);
else if (c == '#')
accessibility_speak("hash sign");
accessibility_speak_priority("hash sign", 10);
else if (c == '$')
accessibility_speak("dollar sign");
accessibility_speak_priority("dollar sign", 10);
else if (c == '%')
accessibility_speak("percent sign");
accessibility_speak_priority("percent sign", 10);
else if (c == '^')
accessibility_speak("carrot");
accessibility_speak_priority("carrot", 10);
else if (c == '&')
accessibility_speak("ampersand");
accessibility_speak_priority("ampersand", 10);
else if (c == '*')
accessibility_speak("asterisk");
accessibility_speak_priority("asterisk", 10);
else if (c == '(')
accessibility_speak("left bracket");
accessibility_speak_priority("left bracket", 10);
else if (c == ')')
accessibility_speak("right bracket");
accessibility_speak_priority("right bracket", 10);
else if (c == '-')
accessibility_speak("minus");
accessibility_speak_priority("minus", 10);
else if (c == '_')
accessibility_speak("underscore");
accessibility_speak_priority("underscore", 10);
else if (c == '=')
accessibility_speak("equals");
accessibility_speak_priority("equals", 10);
else if (c == '+')
accessibility_speak("plus");
accessibility_speak_priority("plus", 10);
else if (c == '[')
accessibility_speak("left square bracket");
accessibility_speak_priority("left square bracket", 10);
else if (c == '{')
accessibility_speak("left curl bracket");
accessibility_speak_priority("left curl bracket", 10);
else if (c == ']')
accessibility_speak("right square bracket");
accessibility_speak_priority("right square bracket", 10);
else if (c == '}')
accessibility_speak("right curl bracket");
accessibility_speak_priority("right curl bracket", 10);
else if (c == '\\')
accessibility_speak("back slash");
accessibility_speak_priority("back slash", 10);
else if (c == '|')
accessibility_speak("pipe");
accessibility_speak_priority("pipe", 10);
else if (c == ';')
accessibility_speak("semicolon");
accessibility_speak_priority("semicolon", 10);
else if (c == ':')
accessibility_speak("colon");
accessibility_speak_priority("colon", 10);
else if (c == '\'')
accessibility_speak("single quote");
accessibility_speak_priority("single quote", 10);
else if (c == '\"')
accessibility_speak("double quote");
accessibility_speak_priority("double quote", 10);
else if (c == ',')
accessibility_speak("comma");
accessibility_speak_priority("comma", 10);
else if (c == '<')
accessibility_speak("left angle bracket");
accessibility_speak_priority("left angle bracket", 10);
else if (c == '.')
accessibility_speak("period");
accessibility_speak_priority("period", 10);
else if (c == '>')
accessibility_speak("right angle bracket");
accessibility_speak_priority("right angle bracket", 10);
else if (c == '/')
accessibility_speak("front slash");
accessibility_speak_priority("front slash", 10);
else if (c == '?')
accessibility_speak("question mark");
accessibility_speak_priority("question mark", 10);
else if (c == ' ')
accessibility_speak("space");
accessibility_speak_priority("space", 10);
else if (character != 0)
accessibility_speak(say_char);
accessibility_speak_priority(say_char, 10);
free(say_char);
}
}
}
#endif
#endif
if (deferred_wait_keys)
@@ -21892,10 +22011,11 @@ static void video_driver_frame(const void *data, unsigned width,
#endif
}
video_driver_active = current_video->frame(
video_driver_data, data, width, height,
video_driver_frame_count,
(unsigned)pitch, video_driver_msg, &video_info);
if (current_video && current_video->frame)
video_driver_active = current_video->frame(
video_driver_data, data, width, height,
video_driver_frame_count,
(unsigned)pitch, video_driver_msg, &video_info);
video_driver_frame_count++;
@@ -25093,7 +25213,9 @@ static void retroarch_parse_input_and_config(int argc, char *argv[])
retroarch_print_help(argv[0]);
retroarch_fail(1, "retroarch_parse_input()");
case RA_OPT_ACCESSIBILITY:
#ifdef HAVE_ACCESSIBILITY
accessibility_enabled = true;
#endif
break;
default:
RARCH_ERR("%s\n", msg_hash_to_str(MSG_ERROR_PARSING_ARGUMENTS));
@@ -25293,8 +25415,10 @@ bool retroarch_main_init(int argc, char *argv[])
retroarch_parse_input_and_config(argc, argv);
#ifdef HAVE_ACCESSIBILITY
if (is_accessibility_enabled())
accessibility_startup_message();
#endif
if (verbosity_is_enabled())
{
@@ -26604,8 +26728,10 @@ void runloop_msg_queue_push(const char *msg,
enum message_queue_category category)
{
runloop_msg_queue_lock();
#ifdef HAVE_ACCESSIBILITY
if (is_accessibility_enabled())
accessibility_speak_priority((char*) msg, 0);
#endif
#if defined(HAVE_MENU) && defined(HAVE_MENU_WIDGETS)
if (menu_widgets_inited)
{
@@ -29246,6 +29372,7 @@ bool core_has_set_input_descriptor(void)
return current_core.has_set_input_descriptors;
}
#if defined(HAVE_RUNAHEAD)
static void core_free_retro_game_info(struct retro_game_info *dest)
{
if (!dest)
@@ -29260,6 +29387,7 @@ static void core_free_retro_game_info(struct retro_game_info *dest)
dest->data = NULL;
dest->meta = NULL;
}
#endif
unsigned int retroarch_get_rotation(void)
{
@@ -29268,17 +29396,6 @@ unsigned int retroarch_get_rotation(void)
}
/* Accessibility */
int speak_pid = 0;
bool is_accessibility_enabled(void)
{
settings_t *settings = configuration_settings;
if (accessibility_enabled || settings->bools.accessibility_enable)
return true;
return false;
}
bool is_input_keyboard_display_on(void)
{
#ifdef HAVE_MENU
@@ -29288,12 +29405,6 @@ bool is_input_keyboard_display_on(void)
#endif
}
bool accessibility_speak(const char* speak_text)
{
return accessibility_speak_priority(speak_text, 10);
}
#if defined(__MACH__) && defined(__APPLE__)
#include <TargetConditionals.h>
#if TARGET_OS_OSX && !defined(EMSCRIPTEN)
@@ -29301,6 +29412,8 @@ bool accessibility_speak(const char* speak_text)
#endif
#endif
#ifdef HAVE_ACCESSIBILITY
#if defined(_IS_OSX)
static char* accessibility_mac_language_code(const char* language)
{
@@ -29368,7 +29481,7 @@ static char* accessibility_mac_language_code(const char* language)
return "";
}
bool is_narrator_running_macos(void)
static bool is_narrator_running_macos(void)
{
if (kill(speak_pid, 0) == 0)
return true;
@@ -29443,7 +29556,6 @@ static bool accessibility_speak_macos(
#endif
#if defined(_WIN32) && !defined(_XBOX) && !defined(__WINRT__) && !defined(EMSCRIPTEN)
static const char *accessibility_win_language_code(const char* language)
{
if (string_is_equal(language,"en"))
@@ -29530,11 +29642,7 @@ static bool create_win32_process(char* cmd)
if (!CreateProcess(NULL, cmd, NULL, NULL, FALSE, CREATE_NO_WINDOW,
NULL, NULL, &si, &pi))
{
pi_set = false;
return false;
}
pi_set = true;
return true;
}
@@ -29584,22 +29692,23 @@ static bool accessibility_speak_windows(
if (!res)
{
RARCH_LOG("Create subprocess failed. Error: %d\n", GetLastError());
pi_set = false;
return true;
}
pi_set = true;
return true;
}
#endif
#if (defined(__linux__) || defined(__unix__)) && !defined(EMSCRIPTEN)
bool is_narrator_running_linux(void)
static bool is_narrator_running_linux(void)
{
if (kill(speak_pid, 0) == 0)
return true;
return false;
}
bool accessibility_speak_linux(
static bool accessibility_speak_linux(
const char* speak_text, const char* language, int priority)
{
int pid;
@@ -29696,7 +29805,8 @@ bool accessibility_speak_priority(const char* speak_text, int priority)
return true;
}
bool is_narrator_running(void)
#ifdef HAVE_ACCESSIBILITY
static bool is_narrator_running(void)
{
if (is_accessibility_enabled())
{
@@ -29710,9 +29820,11 @@ bool is_narrator_running(void)
}
return true;
}
#endif
bool accessibility_speak_ai_service(const char* speak_text, const char* language, int priority)
#if 0
static bool accessibility_speak_ai_service(
const char* speak_text, const char* language, int priority)
{
#if defined(HAVE_NETWORKING) && defined(HAVE_TRANSLATE)
/* Call the AI service listed to do espeak for us. */
@@ -29729,7 +29841,7 @@ bool accessibility_speak_ai_service(const char* speak_text, const char* language
strlcpy(new_ai_service_url, settings->arrays.ai_service_url,
sizeof(new_ai_service_url));
if (strrchr(new_ai_service_url, '?') != NULL)
if (strrchr(new_ai_service_url, '?'))
separator = '&';
snprintf(temp_string, sizeof(temp_string),
"%csource_lang=%s&target_lang=%s&output=espeak",
@@ -29753,11 +29865,15 @@ bool accessibility_speak_ai_service(const char* speak_text, const char* language
return false;
#endif
}
#endif
bool accessibility_startup_message(void)
static bool accessibility_startup_message(void)
{
/* State that the narrator is on, and also include the first menu
item we're on at startup. */
accessibility_speak("RetroArch accessibility on. Main Menu Load Core.");
accessibility_speak_priority(
"RetroArch accessibility on. Main Menu Load Core.",
10);
return true;
}
#endif
-9
View File
@@ -2020,15 +2020,6 @@ bool menu_widgets_ready(void);
unsigned int retroarch_get_rotation(void);
bool is_input_keyboard_display_on(void);
bool is_accessibility_enabled(void);
bool accessibility_speak(const char* speak_text);
bool accessibility_speak_priority(const char* speak_text, int priority);
bool accessibility_startup_message(void);
bool is_narrator_running(void);
bool accessibility_speak_ai_service(
const char* speak_text, const char* voice, int priority);
RETRO_END_DECLS
+134 -25
View File
@@ -23,6 +23,7 @@
#include <string/stdstring.h>
#include <file/file_path.h>
#include <net/net_http.h>
#include <streams/file_stream.h>
#include "tasks_internal.h"
#include "task_file_transfer.h"
@@ -30,6 +31,7 @@
#include "../configuration.h"
#include "../file_path_special.h"
#include "../playlist.h"
#include "../verbosity.h"
#ifdef RARCH_INTERNAL
#ifdef HAVE_MENU
@@ -55,6 +57,7 @@ typedef struct pl_thumb_handle
playlist_t *playlist;
menu_thumbnail_path_data_t *thumbnail_path_data;
retro_task_t *http_task;
bool http_task_complete;
size_t list_size;
size_t list_index;
unsigned type_idx;
@@ -162,16 +165,90 @@ static bool get_thumbnail_paths(
return true;
}
/* Thumbnail download http task callback function
* > Writes thumbnail file to disk */
void cb_http_task_download_pl_thumbnail(
retro_task_t *task, void *task_data,
void *user_data, const char *err)
{
http_transfer_data_t *data = (http_transfer_data_t*)task_data;
file_transfer_t *transf = (file_transfer_t*)user_data;
pl_thumb_handle_t *pl_thumb = NULL;
char output_dir[PATH_MAX_LENGTH];
output_dir[0] = '\0';
/* Update pl_thumb task status
* > Do this first, to minimise the risk of hanging
* the parent task in the event of an http error */
if (!transf)
goto finish;
pl_thumb = (pl_thumb_handle_t*)transf->user_data;
if (!pl_thumb)
goto finish;
pl_thumb->http_task_complete = true;
/* Remaining sanity checks... */
if (!data)
goto finish;
if (!data->data || string_is_empty(transf->path))
goto finish;
/* Create output directory, if required */
strlcpy(output_dir, transf->path, sizeof(output_dir));
path_basedir_wrapper(output_dir);
if (!path_mkdir(output_dir))
{
err = msg_hash_to_str(MSG_FAILED_TO_CREATE_THE_DIRECTORY);
goto finish;
}
/* Write thumbnail file to disk */
if (!filestream_write_file(transf->path, data->data, data->len))
{
err = "Write failed.";
goto finish;
}
finish:
/* Log any error messages */
if (!string_is_empty(err))
{
RARCH_ERR("Download of '%s' failed: %s\n",
(transf ? transf->path: "unknown"), err);
}
if (data)
{
if (data->data)
free(data->data);
free(data);
}
if (transf)
free(transf);
}
/* Download thumbnail of the current type for the current
* playlist entry */
static void download_pl_thumbnail(pl_thumb_handle_t *pl_thumb)
{
char path[PATH_MAX_LENGTH];
char url[2048];
path[0] = '\0';
url[0] = '\0';
url[0] = '\0';
/* Sanity check */
if (!pl_thumb)
return;
/* Check if paths are valid */
if (get_thumbnail_paths(pl_thumb, path, sizeof(path), url, sizeof(url)))
{
@@ -181,15 +258,24 @@ static void download_pl_thumbnail(pl_thumb_handle_t *pl_thumb)
file_transfer_t *transf = (file_transfer_t*)calloc(1, sizeof(file_transfer_t));
if (!transf)
return; /* If this happens then everything is broken anyway... */
/* Initialise http task status */
pl_thumb->http_task_complete = false;
/* Initialise file transfer */
transf->enum_idx = MENU_ENUM_LABEL_CB_SINGLE_THUMBNAIL;
transf->user_data = (void*)pl_thumb;
strlcpy(transf->path, path, sizeof(transf->path));
/* Note: We don't actually care if this fails since that
* just means the file is missing from the server, so it's
* not something we can handle here... */
pl_thumb->http_task = (retro_task_t*)task_push_http_transfer(url, true, NULL, cb_generic_download, transf);
pl_thumb->http_task = (retro_task_t*)task_push_http_transfer(
url, true, NULL, cb_http_task_download_pl_thumbnail, transf);
/* ...if it does fail, however, we can immediately
* signal that the task is 'complete' */
if (!pl_thumb->http_task)
pl_thumb->http_task_complete = true;
}
}
}
@@ -318,13 +404,19 @@ static void task_pl_thumbnail_download_handler(retro_task_t *task)
{
/* Ensure that we only enqueue one transfer
* at a time... */
if (pl_thumb->http_task)
{
if (task_get_finished(pl_thumb->http_task))
pl_thumb->http_task = NULL;
else
break;
}
/* > If HTTP task is NULL, then it either finished
* or an error occurred - in either case,
* current task is 'complete' */
if (!pl_thumb->http_task)
pl_thumb->http_task_complete = true;
/* > Wait for task_push_http_transfer()
* callback to trigger */
if (pl_thumb->http_task_complete)
pl_thumb->http_task = NULL;
else
break;
/* Check whether all thumbnail types have been processed */
if (pl_thumb->type_idx > 3)
@@ -339,8 +431,7 @@ static void task_pl_thumbnail_download_handler(retro_task_t *task)
}
/* Download current thumbnail */
if (pl_thumb)
download_pl_thumbnail(pl_thumb);
download_pl_thumbnail(pl_thumb);
/* Increment thumbnail type */
pl_thumb->type_idx++;
@@ -431,6 +522,7 @@ bool task_push_pl_thumbnail_download(
pl_thumb->playlist = NULL;
pl_thumb->thumbnail_path_data = NULL;
pl_thumb->http_task = NULL;
pl_thumb->http_task_complete = false;
pl_thumb->list_size = 0;
pl_thumb->list_index = 0;
pl_thumb->type_idx = 1;
@@ -574,6 +666,17 @@ static void task_pl_entry_thumbnail_download_handler(retro_task_t *task)
const char *right_thumbnail_path = NULL;
const char *left_thumbnail_path = NULL;
/* Redundant safety check - ensure that playlist is
* non-NULL, and that the playlist path is the same
* as that recorded when task_push_pl_entry_thumbnail_download()
* was called... */
if (!pl_thumb->playlist)
goto task_finished;
if (!string_is_equal(pl_thumb->playlist_path,
playlist_get_conf_path(pl_thumb->playlist)))
goto task_finished;
/* Initialise thumbnail path data */
pl_thumb->thumbnail_path_data = menu_thumbnail_path_init();
@@ -616,13 +719,19 @@ static void task_pl_entry_thumbnail_download_handler(retro_task_t *task)
{
/* Ensure that we only enqueue one transfer
* at a time... */
if (pl_thumb->http_task)
{
if (task_get_finished(pl_thumb->http_task))
pl_thumb->http_task = NULL;
else
break;
}
/* > If HTTP task is NULL, then it either finished
* or an error occurred - in either case,
* current task is 'complete' */
if (!pl_thumb->http_task)
pl_thumb->http_task_complete = true;
/* > Wait for task_push_http_transfer()
* callback to trigger */
if (pl_thumb->http_task_complete)
pl_thumb->http_task = NULL;
else
break;
/* Check whether all thumbnail types have been processed */
if (pl_thumb->type_idx > 3)
@@ -635,8 +744,7 @@ static void task_pl_entry_thumbnail_download_handler(retro_task_t *task)
task_set_progress(task, ((pl_thumb->type_idx - 1) * 100) / 3);
/* Download current thumbnail */
if (pl_thumb)
download_pl_thumbnail(pl_thumb);
download_pl_thumbnail(pl_thumb);
/* Increment thumbnail type */
pl_thumb->type_idx++;
@@ -746,6 +854,7 @@ bool task_push_pl_entry_thumbnail_download(
pl_thumb->playlist = playlist;
pl_thumb->thumbnail_path_data = NULL;
pl_thumb->http_task = NULL;
pl_thumb->http_task_complete = false;
pl_thumb->list_size = playlist_size(playlist);
pl_thumb->list_index = idx;
pl_thumb->type_idx = 1;
+502 -43
View File
@@ -22,6 +22,7 @@
#include <string/stdstring.h>
#include <file/file_path.h>
#include <file/archive_file.h>
#include "tasks_internal.h"
@@ -29,11 +30,15 @@
#include "../msg_hash.h"
#include "../file_path_special.h"
#include "../playlist.h"
#include "../core_info.h"
enum pl_manager_status
{
PL_MANAGER_BEGIN = 0,
PL_MANAGER_ITERATE_ENTRY,
PL_MANAGER_ITERATE_ENTRY_RESET_CORE,
PL_MANAGER_ITERATE_ENTRY_VALIDATE,
PL_MANAGER_VALIDATE_END,
PL_MANAGER_ITERATE_ENTRY_CHECK_DUPLICATE,
PL_MANAGER_END
};
@@ -46,11 +51,12 @@ typedef struct pl_manager_handle
size_t list_index;
enum pl_manager_status status;
bool use_old_format;
bool fuzzy_archive_match;
} pl_manager_handle_t;
/**************************/
/* Reset Associated Cores */
/**************************/
/*********************/
/* Utility Functions */
/*********************/
static void free_pl_manager_handle(pl_manager_handle_t *pl_manager)
{
@@ -79,6 +85,36 @@ static void free_pl_manager_handle(pl_manager_handle_t *pl_manager)
pl_manager = NULL;
}
static void pl_manager_write_playlist(
playlist_t *playlist, const char *playlist_path, bool use_old_format)
{
playlist_t *cached_playlist = playlist_get_cached();
/* Sanity check */
if (!playlist || string_is_empty(playlist_path))
return;
/* Write any changes to playlist file */
playlist_write_file(playlist, use_old_format);
/* If this is the currently cached playlist, then
* it must be re-cached (otherwise changes will be
* lost if the currently cached playlist is saved
* to disk for any reason...) */
if (cached_playlist)
{
if (string_is_equal(playlist_path, playlist_get_conf_path(cached_playlist)))
{
playlist_free_cached();
playlist_init_cached(playlist_path, COLLECTION_SIZE);
}
}
}
/**************************/
/* Reset Associated Cores */
/**************************/
static void task_pl_manager_reset_cores_handler(retro_task_t *task)
{
pl_manager_handle_t *pl_manager = NULL;
@@ -113,10 +149,10 @@ static void task_pl_manager_reset_cores_handler(retro_task_t *task)
goto task_finished;
/* All good - can start iterating */
pl_manager->status = PL_MANAGER_ITERATE_ENTRY;
pl_manager->status = PL_MANAGER_ITERATE_ENTRY_RESET_CORE;
}
break;
case PL_MANAGER_ITERATE_ENTRY:
case PL_MANAGER_ITERATE_ENTRY_RESET_CORE:
{
const struct playlist_entry *entry = NULL;
@@ -128,10 +164,8 @@ static void task_pl_manager_reset_cores_handler(retro_task_t *task)
{
struct playlist_entry update_entry = {0};
char task_title[PATH_MAX_LENGTH];
char detect_string[PATH_MAX_LENGTH];
task_title[0] = '\0';
detect_string[0] = '\0';
task_title[0] = '\0';
/* Update progress display */
task_free_title(task);
@@ -154,17 +188,11 @@ static void task_pl_manager_reset_cores_handler(retro_task_t *task)
task_set_title(task, strdup(task_title));
task_set_progress(task, (pl_manager->list_index * 100) / pl_manager->list_size);
/* Reset core association */
detect_string[0] = 'D';
detect_string[1] = 'E';
detect_string[2] = 'T';
detect_string[3] = 'E';
detect_string[4] = 'C';
detect_string[5] = 'T';
detect_string[6] = '\0';
update_entry.core_path = detect_string;
update_entry.core_name = detect_string;
/* Reset core association
* > The update function reads our entry as const,
* so these casts are safe */
update_entry.core_path = (char*)"DETECT";
update_entry.core_name = (char*)"DETECT";
playlist_update(
pl_manager->playlist, pl_manager->list_index, &update_entry);
@@ -178,26 +206,15 @@ static void task_pl_manager_reset_cores_handler(retro_task_t *task)
break;
case PL_MANAGER_END:
{
playlist_t *cached_playlist = playlist_get_cached();
char task_title[PATH_MAX_LENGTH];
task_title[0] = '\0';
/* Save playlist changes to disk */
playlist_write_file(pl_manager->playlist, pl_manager->use_old_format);
/* If this is the currently cached playlist, then
* it must be re-cached (otherwise changes will be
* lost if the currently cached playlist is saved
* to disk for any reason...) */
if (cached_playlist)
{
if (string_is_equal(pl_manager->playlist_path, playlist_get_conf_path(cached_playlist)))
{
playlist_free_cached();
playlist_init_cached(pl_manager->playlist_path, COLLECTION_SIZE);
}
}
pl_manager_write_playlist(
pl_manager->playlist,
pl_manager->playlist_path,
pl_manager->use_old_format);
/* Update progress display */
task_free_title(task);
@@ -255,7 +272,7 @@ bool task_push_pl_manager_reset_cores(const char *playlist_path)
task_title[0] = '\0';
/* Sanity check */
if (!task || !pl_manager)
if (!task || !pl_manager || !settings)
goto error;
if (string_is_empty(playlist_path))
@@ -287,13 +304,455 @@ bool task_push_pl_manager_reset_cores(const char *playlist_path)
task->progress = 0;
/* Configure handle */
pl_manager->playlist_path = strdup(playlist_path);
pl_manager->playlist_name = strdup(playlist_name);
pl_manager->playlist = NULL;
pl_manager->list_size = 0;
pl_manager->list_index = 0;
pl_manager->status = PL_MANAGER_BEGIN;
pl_manager->use_old_format = settings->bools.playlist_use_old_format;
pl_manager->playlist_path = strdup(playlist_path);
pl_manager->playlist_name = strdup(playlist_name);
pl_manager->playlist = NULL;
pl_manager->list_size = 0;
pl_manager->list_index = 0;
pl_manager->status = PL_MANAGER_BEGIN;
pl_manager->use_old_format = settings->bools.playlist_use_old_format;
pl_manager->fuzzy_archive_match = false; /* Not relevant here */
task_queue_push(task);
return true;
error:
if (task)
{
free(task);
task = NULL;
}
if (pl_manager)
{
free(pl_manager);
pl_manager = NULL;
}
return false;
}
/******************/
/* Clean Playlist */
/******************/
static bool pl_manager_content_exists(const char *path)
{
/* Sanity check */
if (string_is_empty(path))
return false;
/* If content is inside an archive, special
* handling is required... */
if (path_contains_compressed_file(path))
{
const char *delim = path_get_archive_delim(path);
char archive_path[PATH_MAX_LENGTH] = {0};
size_t len = 0;
struct string_list *archive_list = NULL;
const char *content_file = NULL;
bool content_found = false;
if (!delim)
return false;
/* Get path of 'parent' archive file */
len = (size_t)(1 + delim - path);
strlcpy(
archive_path, path,
(len < PATH_MAX_LENGTH ? len : PATH_MAX_LENGTH) * sizeof(char));
/* Check if archive itself exists */
if (!path_is_valid(archive_path))
return false;
/* Check if file exists inside archive */
archive_list = file_archive_get_file_list(archive_path, NULL);
if (!archive_list)
return false;
/* > Get playlist entry content file name
* (sans archive file path) */
content_file = delim;
content_file++;
if (!string_is_empty(content_file))
{
size_t i;
/* > Loop over archive file contents */
for (i = 0; i < archive_list->size; i++)
{
const char *archive_file = archive_list->elems[i].data;
if (string_is_empty(archive_file))
continue;
if (string_is_equal(content_file, archive_file))
{
content_found = true;
break;
}
}
}
/* Clean up */
string_list_free(archive_list);
return content_found;
}
/* This is a 'normal' path - just check if
* it's valid */
else
return path_is_valid(path);
}
static void pl_manager_validate_core_association(
playlist_t *playlist, size_t entry_index,
const char *core_path, const char *core_name)
{
struct playlist_entry update_entry = {0};
/* Sanity check */
if (!playlist)
return;
if (entry_index >= playlist_size(playlist))
return;
if (string_is_empty(core_path))
goto reset_core;
/* Handle 'DETECT' entries */
if (string_is_equal(core_path, "DETECT"))
{
if (!string_is_equal(core_name, "DETECT"))
goto reset_core;
}
/* Handle 'builtin' entries */
else if (string_is_equal(core_path, "builtin"))
{
if (string_is_empty(core_name))
goto reset_core;
}
/* Handle file path entries */
else if (!path_is_valid(core_path))
goto reset_core;
else
{
const char *core_path_basename = path_basename(core_path);
core_info_list_t *core_info = NULL;
char core_display_name[PATH_MAX_LENGTH];
size_t i;
core_display_name[0] = '\0';
if (string_is_empty(core_path_basename))
goto reset_core;
/* Final check - search core info */
core_info_get_list(&core_info);
if (core_info)
{
for (i = 0; i < core_info->count; i++)
{
const char *info_display_name = core_info->list[i].display_name;
if (!string_is_equal(
path_basename(core_info->list[i].path), core_path_basename))
continue;
if (!string_is_empty(info_display_name))
strlcpy(core_display_name, info_display_name, sizeof(core_display_name));
break;
}
}
/* If core_display_name string is empty, it means the
* core wasn't found -> reset association */
if (string_is_empty(core_display_name))
goto reset_core;
/* ...Otherwise, check that playlist entry
* core name is correct */
if (!string_is_equal(core_name, core_display_name))
{
update_entry.core_name = core_display_name;
playlist_update(playlist, entry_index, &update_entry);
}
}
return;
reset_core:
/* The update function reads our entry as const,
* so these casts are safe */
update_entry.core_path = (char*)"DETECT";
update_entry.core_name = (char*)"DETECT";
playlist_update(playlist, entry_index, &update_entry);
}
static void task_pl_manager_clean_playlist_handler(retro_task_t *task)
{
pl_manager_handle_t *pl_manager = NULL;
if (!task)
goto task_finished;
pl_manager = (pl_manager_handle_t*)task->state;
if (!pl_manager)
goto task_finished;
if (task_get_cancelled(task))
goto task_finished;
switch (pl_manager->status)
{
case PL_MANAGER_BEGIN:
{
/* Load playlist */
if (!path_is_valid(pl_manager->playlist_path))
goto task_finished;
pl_manager->playlist = playlist_init(pl_manager->playlist_path, COLLECTION_SIZE);
if (!pl_manager->playlist)
goto task_finished;
pl_manager->list_size = playlist_size(pl_manager->playlist);
if (pl_manager->list_size < 1)
goto task_finished;
/* All good - can start iterating */
pl_manager->status = PL_MANAGER_ITERATE_ENTRY_VALIDATE;
}
break;
case PL_MANAGER_ITERATE_ENTRY_VALIDATE:
{
const struct playlist_entry *entry = NULL;
bool entry_deleted = false;
/* Update progress display */
task_set_progress(task, (pl_manager->list_index * 50) / pl_manager->list_size);
/* Get current entry */
playlist_get_index(
pl_manager->playlist, pl_manager->list_index, &entry);
if (entry)
{
/* Check whether playlist content exists on
* the filesystem */
if (!pl_manager_content_exists(entry->path))
{
/* Invalid content - delete entry */
playlist_delete_index(pl_manager->playlist, pl_manager->list_index);
entry_deleted = true;
/* Update list_size */
pl_manager->list_size = playlist_size(pl_manager->playlist);
}
/* Content is valid - check if core is valid */
else
pl_manager_validate_core_association(
pl_manager->playlist, pl_manager->list_index,
entry->core_path, entry->core_name);
}
/* Increment entry index *if* current entry still
* exists (i.e. if entry was deleted, current index
* will already point to the *next* entry) */
if (!entry_deleted)
pl_manager->list_index++;
if (pl_manager->list_index >= pl_manager->list_size)
pl_manager->status = PL_MANAGER_VALIDATE_END;
}
break;
case PL_MANAGER_VALIDATE_END:
{
/* Sanity check - if all (or all but one)
* playlist entries were removed during the
* 'validate' phase, we can stop now */
if (pl_manager->list_size < 2)
{
pl_manager->status = PL_MANAGER_END;
break;
}
/* ...otherwise, reset index counter and
* start the duplicates check */
pl_manager->list_index = 0;
pl_manager->status = PL_MANAGER_ITERATE_ENTRY_CHECK_DUPLICATE;
}
break;
case PL_MANAGER_ITERATE_ENTRY_CHECK_DUPLICATE:
{
const struct playlist_entry *entry = NULL;
bool entry_deleted = false;
/* Update progress display */
task_set_progress(task, 50 + (pl_manager->list_index * 50) / pl_manager->list_size);
/* Get current entry */
playlist_get_index(
pl_manager->playlist, pl_manager->list_index, &entry);
if (entry)
{
size_t i;
/* Loop over all subsequent entries, and check
* whether content + core paths are the same */
for (i = pl_manager->list_index + 1; i < pl_manager->list_size; i++)
{
const struct playlist_entry *next_entry = NULL;
/* Get next entry */
playlist_get_index(pl_manager->playlist, i, &next_entry);
if (!next_entry)
continue;
if (playlist_entries_are_equal(
entry, next_entry, pl_manager->fuzzy_archive_match))
{
/* Duplicate found - delete entry */
playlist_delete_index(pl_manager->playlist, pl_manager->list_index);
entry_deleted = true;
/* Update list_size */
pl_manager->list_size = playlist_size(pl_manager->playlist);
}
}
}
/* Increment entry index *if* current entry still
* exists (i.e. if entry was deleted, current index
* will already point to the *next* entry) */
if (!entry_deleted)
pl_manager->list_index++;
if (pl_manager->list_index + 1 >= pl_manager->list_size)
pl_manager->status = PL_MANAGER_END;
}
break;
case PL_MANAGER_END:
{
char task_title[PATH_MAX_LENGTH];
task_title[0] = '\0';
/* Save playlist changes to disk */
pl_manager_write_playlist(
pl_manager->playlist,
pl_manager->playlist_path,
pl_manager->use_old_format);
/* Update progress display */
task_free_title(task);
strlcpy(
task_title, msg_hash_to_str(MSG_PLAYLIST_MANAGER_PLAYLIST_CLEANED),
sizeof(task_title));
strlcat(task_title, pl_manager->playlist_name, sizeof(task_title));
task_set_title(task, strdup(task_title));
}
/* fall-through */
default:
task_set_progress(task, 100);
goto task_finished;
}
return;
task_finished:
if (task)
task_set_finished(task, true);
free_pl_manager_handle(pl_manager);
}
static bool task_pl_manager_clean_playlist_finder(retro_task_t *task, void *user_data)
{
pl_manager_handle_t *pl_manager = NULL;
if (!task || !user_data)
return false;
if (task->handler != task_pl_manager_clean_playlist_handler)
return false;
pl_manager = (pl_manager_handle_t*)task->state;
if (!pl_manager)
return false;
return string_is_equal((const char*)user_data, pl_manager->playlist_path);
}
bool task_push_pl_manager_clean_playlist(const char *playlist_path)
{
task_finder_data_t find_data;
char playlist_name[PATH_MAX_LENGTH];
char task_title[PATH_MAX_LENGTH];
settings_t *settings = config_get_ptr();
retro_task_t *task = task_init();
pl_manager_handle_t *pl_manager = (pl_manager_handle_t*)calloc(1, sizeof(pl_manager_handle_t));
playlist_name[0] = '\0';
task_title[0] = '\0';
/* Sanity check */
if (!task || !pl_manager || !settings)
goto error;
if (string_is_empty(playlist_path))
goto error;
fill_pathname_base_noext(playlist_name, playlist_path, sizeof(playlist_name));
if (string_is_empty(playlist_name))
goto error;
/* Concurrent management of the same playlist
* is not allowed */
find_data.func = task_pl_manager_clean_playlist_finder;
find_data.userdata = (void*)playlist_path;
if (task_queue_find(&find_data))
goto error;
/* Configure task */
strlcpy(
task_title, msg_hash_to_str(MSG_PLAYLIST_MANAGER_CLEANING_PLAYLIST),
sizeof(task_title));
strlcat(task_title, playlist_name, sizeof(task_title));
task->handler = task_pl_manager_clean_playlist_handler;
task->state = pl_manager;
task->title = strdup(task_title);
task->alternative_look = true;
task->progress = 0;
/* Configure handle */
pl_manager->playlist_path = strdup(playlist_path);
pl_manager->playlist_name = strdup(playlist_name);
pl_manager->playlist = NULL;
pl_manager->list_size = 0;
pl_manager->list_index = 0;
pl_manager->status = PL_MANAGER_BEGIN;
pl_manager->use_old_format = settings->bools.playlist_use_old_format;
pl_manager->fuzzy_archive_match = settings->bools.playlist_fuzzy_archive_match;
task_queue_push(task);
+1
View File
@@ -95,6 +95,7 @@ bool task_push_pl_entry_thumbnail_download(
#endif
bool task_push_pl_manager_reset_cores(const char *playlist_path);
bool task_push_pl_manager_clean_playlist(const char *playlist_path);
bool task_push_image_load(const char *fullpath,
bool supports_rgba, unsigned upscale_threshold,
+2 -2
View File
@@ -6,8 +6,8 @@
# /* - pkg/snap/snapcraft.yaml (including the github url) */
#if 0
RARCH_VERSION="1.8.3"
RARCH_VERSION="1.8.4"
#endif
#ifndef PACKAGE_VERSION
#define PACKAGE_VERSION "1.8.3"
#define PACKAGE_VERSION "1.8.4"
#endif
+1 -1
View File
@@ -1 +1 @@
<!ENTITY version "1.8.3">
<!ENTITY version "1.8.4">