diff --git a/.travis.yml b/.travis.yml
index 492484bc55..b1f11c8c56 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -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
diff --git a/CHANGES.md b/CHANGES.md
index 302af6b523..45876f055b 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,10 +1,38 @@
# Future
+- BUGFIX: Fix mouse capture hotkey not working
+- CHEEVOS/BUGFIX: Achievement triggers could cause Retroarch to Crash
+- CHEEVOS: Support for extended Sega CD memory
+- EMSCRIPTEN: Recreate input event listeners properly
+- LIBRETRO: Add disk control interface API extension
+- LOCALIZATION: Update Polish translation
+- VIDEO: Set hardware 'Bilinear filtering' off by default
+
+# 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
+- PLAYLISTS: Add 'Clean Playlist' option
# 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
+- BUGFIX/MENU: History size can only be set to 1 at a minimum
- BUGFIX/MENU: (XMB/OZONE) Fix 'quick menu' detection. XMB would not display savestate thumbnails in the quick menu if it was accessed via the main menu
- 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
@@ -13,6 +41,8 @@
- D3D11: Block FL9_3 devices from D3D11 driver because they don't work anyway (current D3D11 driver uses SM4.0 which requires FL10_0 and up)
- D3D11: Fallback to GL driver when D3D11 fails
- EMSCRIPTEN: Fix assets
+- HISTORY/FAVORITES: Bump up default to 200 entries from 100
+- FFMPEG CORE: Implement packet buffer, fixes MP4 video playback for many files
- LOCALIZATION: Update Italian translation
- LOCALIZATION: Update Polish translation
- LOCALIZATION: Update Russian translation
@@ -20,11 +50,14 @@
- MENU: Added 'Hosting' menu under Netplay menu
- MENU: Added 'Subsystems' menu
- MENU/FILEBROWSER: Fix file selection issues when starting from (or navigating to) the top level directory
+- MENU/WIDGETS: Prevent looping of task title text
- RASPBERRY PI: Fix BGRA8888 color inversion issues in the menu and elsewhere with VideoCore GL drivers
- NETPLAY/RELAY: Add Sao Paulo (Brazil) relay server
- NETPLAY/RELAY: Fix the “spectator” bug when using the relay server – When a player switches into the spectator mode (pressing “i”) while using the relay server, all players will disconnect.
- 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
diff --git a/Makefile b/Makefile
index 734865b00e..00e0258c00 100644
--- a/Makefile
+++ b/Makefile
@@ -45,6 +45,8 @@ else
DEF_FLAGS += -ffast-math
endif
+DEF_FLAGS += -Wall
+
ifneq ($(findstring BSD,$(OS)),)
DEF_FLAGS += -DBSD
LDFLAGS += -L/usr/local/lib
@@ -68,7 +70,7 @@ endif
include Makefile.common
ifeq ($(shell $(CC) -v 2>&1 | grep -c "clang"),1)
- DEFINES += -Wno-invalid-source-encoding -Wno-incompatible-ms-struct
+ DEF_FLAGS += -Wno-invalid-source-encoding -Wno-incompatible-ms-struct
endif
ifeq ($(shell $(CC) -v 2>&1 | grep -c "tcc"),1)
@@ -80,7 +82,7 @@ endif
HEADERS = $(wildcard */*/*.h) $(wildcard */*.h) $(wildcard *.h)
ifeq ($(MISSING_DECLS), 1)
- DEFINES += -Werror=missing-declarations
+ DEF_FLAGS += -Werror=missing-declarations
endif
ifeq ($(HAVE_DYLIB), 1)
@@ -106,10 +108,20 @@ ifneq ($(findstring Win32,$(OS)),)
LDFLAGS += -mwindows
endif
-DEF_FLAGS += -Wall $(INCLUDE_DIRS) -I. -Ideps -Ideps/stb
+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 += $(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,29 +139,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
-endif
-ifeq ($(NOUNUSED_VARIABLE), yes)
- CFLAGS += -Wno-unused-variable
- CXXFLAGS += -Wno-unused-variable
-endif
-
RARCH_OBJ := $(addprefix $(OBJDIR)/,$(OBJ))
ifneq ($(X86),)
diff --git a/Makefile.common b/Makefile.common
index 9d06030b4d..8b97ae33ba 100644
--- a/Makefile.common
+++ b/Makefile.common
@@ -7,6 +7,18 @@ ifeq ($(HAVE_STACK_USAGE), 1)
DEF_FLAGS += -fstack-usage
endif
+ifeq ($(HAVE_NOUNUSED), 1)
+ DEF_FLAGS += $(NOUNUSED_CFLAGS)
+endif
+
+ifeq ($(HAVE_NOUNUSED_VARIABLE), 1)
+ DEF_FLAGS += $(NOUNUSED_VARIABLE_CFLAGS)
+endif
+
+ifeq ($(HAVE_CXX11), 1)
+ CXXFLAGS += $(CXX11_CFLAGS)
+endif
+
ifeq ($(HAVE_GL_CONTEXT),)
HAVE_GL_CONTEXT = 0
HAVE_GL_MODERN = 0
@@ -158,6 +170,7 @@ OBJ += frontend/frontend_driver.o \
intl/msg_hash_us.o \
$(LIBRETRO_COMM_DIR)/queues/task_queue.o \
tasks/task_content.o \
+ tasks/task_patch.o \
tasks/task_save.o \
tasks/task_file_transfer.o \
tasks/task_image.o \
@@ -201,6 +214,7 @@ endif
OBJ += \
$(LIBRETRO_COMM_DIR)/file/nbio/nbio_intf.o \
$(LIBRETRO_COMM_DIR)/file/file_path.o \
+ $(LIBRETRO_COMM_DIR)/file/file_path_io.o \
file_path_special.o \
file_path_str.o \
$(LIBRETRO_COMM_DIR)/hash/rhash.o \
@@ -228,6 +242,7 @@ OBJ += \
$(LIBRETRO_COMM_DIR)/file/config_file.o \
$(LIBRETRO_COMM_DIR)/file/config_file_userdata.o \
runtime_file.o \
+ disk_index_file.o \
tasks/task_screenshot.o \
tasks/task_powerstate.o \
$(LIBRETRO_COMM_DIR)/gfx/scaler/scaler.o \
@@ -245,9 +260,14 @@ OBJ += \
$(LIBRETRO_COMM_DIR)/features/features_cpu.o \
performance_counters.o \
verbosity.o \
- midi/drivers/null_midi.o \
$(LIBRETRO_COMM_DIR)/playlists/label_sanitization.o \
- manual_content_scan.o
+ manual_content_scan.o \
+ disk_control_interface.o
+
+ifeq ($(HAVE_BLISSBOX), 1)
+ DEFINES += -DHAVE_BLISSBOX
+ OBJ += tasks/task_autodetect_blissbox.o
+endif
ifeq ($(HAVE_AUDIOMIXER), 1)
DEFINES += -DHAVE_AUDIOMIXER
@@ -1748,6 +1768,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)
diff --git a/Makefile.ctr.salamander b/Makefile.ctr.salamander
index 14fb2f276f..9c05fd6b54 100644
--- a/Makefile.ctr.salamander
+++ b/Makefile.ctr.salamander
@@ -28,6 +28,7 @@ OBJ := ctr/ctr_system.o \
libretro-common/compat/compat_strcasestr.o \
libretro-common/compat/fopen_utf8.o \
libretro-common/file/file_path.o \
+ libretro-common/file/file_path_io.o \
libretro-common/string/stdstring.o \
libretro-common/lists/string_list.o \
libretro-common/lists/dir_list.o \
diff --git a/Makefile.ps3 b/Makefile.ps3
index 20af1ec4d7..f5d9444b3d 100644
--- a/Makefile.ps3
+++ b/Makefile.ps3
@@ -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
diff --git a/Makefile.ps3.salamander b/Makefile.ps3.salamander
index 419fcffbe7..5ef63d2372 100644
--- a/Makefile.ps3.salamander
+++ b/Makefile.ps3.salamander
@@ -46,6 +46,7 @@ PPU_SRCS = frontend/frontend_salamander.c \
frontend/frontend_driver.c \
frontend/drivers/platform_ps3.c \
libretro-common/file/file_path.c \
+ libretro-common/file/file_path_io.c \
libretro-common/lists/dir_list.c \
libretro-common/lists/string_list.c \
libretro-common/file/retro_dirent.c \
diff --git a/Makefile.psp1.salamander b/Makefile.psp1.salamander
index 98ae539786..ce72543fae 100644
--- a/Makefile.psp1.salamander
+++ b/Makefile.psp1.salamander
@@ -36,6 +36,7 @@ OBJS = frontend/frontend_salamander.o \
frontend/frontend_driver.o \
frontend/drivers/platform_psp.o \
libretro-common/file/file_path.o \
+ libretro-common/file/file_path_io.o \
libretro-common/string/stdstring.o \
libretro-common/lists/string_list.o \
libretro-common/lists/dir_list.o \
diff --git a/Makefile.vita.salamander b/Makefile.vita.salamander
index 8898d5bab9..7081793bf8 100644
--- a/Makefile.vita.salamander
+++ b/Makefile.vita.salamander
@@ -36,6 +36,7 @@ OBJS = frontend/frontend_salamander.o \
frontend/frontend_driver.o \
frontend/drivers/platform_psp.o \
libretro-common/file/file_path.o \
+ libretro-common/file/file_path_io.o \
libretro-common/string/stdstring.o \
libretro-common/lists/string_list.o \
libretro-common/lists/dir_list.o \
diff --git a/Makefile.wii.salamander b/Makefile.wii.salamander
index 0fe78655da..81117e7151 100644
--- a/Makefile.wii.salamander
+++ b/Makefile.wii.salamander
@@ -56,6 +56,7 @@ OBJ = frontend/frontend_salamander.o \
frontend/drivers/platform_gx.o \
frontend/drivers/platform_wii.o \
libretro-common/file/file_path.o \
+ libretro-common/file/file_path_io.o \
libretro-common/hash/rhash.o \
libretro-common/string/stdstring.o \
libretro-common/lists/string_list.o \
diff --git a/Makefile.wiiu b/Makefile.wiiu
index 2fb859375f..c105ace984 100644
--- a/Makefile.wiiu
+++ b/Makefile.wiiu
@@ -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
diff --git a/accessibility.h b/accessibility.h
new file mode 100644
index 0000000000..f43107a206
--- /dev/null
+++ b/accessibility.h
@@ -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 .
+ */
+
+#ifndef __RETROARCH_ACCESSIBILITY_H
+#define __RETROARCH_ACCESSIBILITY_H
+
+#include
+#include
+#include
+#include
+
+#include
+#include
+#include
+
+#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
diff --git a/audio/drivers/coreaudio.c b/audio/drivers/coreaudio.c
index 735089a226..6109ee9822 100644
--- a/audio/drivers/coreaudio.c
+++ b/audio/drivers/coreaudio.c
@@ -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;
+ while (!g_interrupted && size > 0)
+#else
+ while (size > 0)
#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)
-#else
- 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;
-
-#if TARGET_OS_IPHONE
- 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);
-#endif
slock_unlock(dev->lock);
+ break;
}
+
+#if TARGET_OS_IOS
+ 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);
+#endif
+ slock_unlock(dev->lock);
}
return written;
diff --git a/audio/drivers/coreaudio3.m b/audio/drivers/coreaudio3.m
index 511338f8d4..0849233353 100644
--- a/audio/drivers/coreaudio3.m
+++ b/audio/drivers/coreaudio3.m
@@ -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;
diff --git a/audio/drivers/switch_audio_compat.h b/audio/drivers/switch_audio_compat.h
index bc65f72ed9..8f9b228376 100644
--- a/audio/drivers/switch_audio_compat.h
+++ b/audio/drivers/switch_audio_compat.h
@@ -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) \
diff --git a/audio/drivers/switch_libnx_audren_thread_audio.c b/audio/drivers/switch_libnx_audren_thread_audio.c
index a4cde5a52e..c44f18aab4 100644
--- a/audio/drivers/switch_libnx_audren_thread_audio.c
+++ b/audio/drivers/switch_libnx_audren_thread_audio.c
@@ -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))
{
diff --git a/cheevos-new/cheevos.c b/cheevos-new/cheevos.c
index cf8ab35b08..026960aa1b 100644
--- a/cheevos-new/cheevos.c
+++ b/cheevos-new/cheevos.c
@@ -210,7 +210,7 @@ static void rcheevos_get_user_agent(char* buffer)
int major, minor;
char tmp[64];
- ptr = rcheevos_user_agent_prefix + sprintf(rcheevos_user_agent_prefix, "RetroArch/" PACKAGE_VERSION);
+ ptr = rcheevos_user_agent_prefix + sprintf(rcheevos_user_agent_prefix, "RetroArch/%s", PACKAGE_VERSION);
if (frontend && frontend->get_os)
{
@@ -2486,8 +2486,6 @@ found:
*************************************************************************/
CORO_SUB(RCHEEVOS_HTTP_GET)
- rcheevos_get_user_agent(buffer);
-
for (coro->k = 0; coro->k < 5; coro->k++)
{
if (coro->k != 0)
@@ -2513,6 +2511,7 @@ found:
continue;
}
+ rcheevos_get_user_agent(buffer);
net_http_connection_set_user_agent(coro->conn, buffer);
coro->http = net_http_new(coro->conn);
diff --git a/cheevos-new/fixup.c b/cheevos-new/fixup.c
index 8994c5e1ad..08d7ca823d 100644
--- a/cheevos-new/fixup.c
+++ b/cheevos-new/fixup.c
@@ -124,6 +124,7 @@ const uint8_t* rcheevos_patch_address(unsigned address, int console)
{
rarch_system_info_t* system = runloop_get_system_info();
const void* pointer = NULL;
+ unsigned original_address = address;
if (console == RC_CONSOLE_NINTENDO)
{
@@ -208,6 +209,21 @@ const uint8_t* rcheevos_patch_address(unsigned address, int console)
address += 0x006000 - 0x020000;
}
}
+ else if (console == RC_CONSOLE_SEGA_CD)
+ {
+ if (address < 0x010000)
+ {
+ /* Work RAM. */
+ address += 0xFF0000;
+ CHEEVOS_LOG(RCHEEVOS_TAG "Sega CD memory address %X adjusted to %X\n", original_address, address);
+ }
+ else
+ {
+ /* CD-ROM peripheral RAM - exposed at virtual address to avoid banking */
+ address += 0x80020000 - 0x010000;
+ CHEEVOS_LOG(RCHEEVOS_TAG "Sega CD memory address %X adjusted to %X\n", original_address, address);
+ }
+ }
desc = system->mmaps.descriptors;
end = desc + system->mmaps.num_descriptors;
@@ -216,19 +232,18 @@ const uint8_t* rcheevos_patch_address(unsigned address, int console)
{
if (((desc->core.start ^ address) & desc->core.select) == 0)
{
- unsigned addr = address;
- pointer = desc->core.ptr;
+ pointer = desc->core.ptr;
+ address -= desc->core.start;
- address = (unsigned)rcheevos_var_reduce(
- (addr - desc->core.start) & desc->disconnect_mask,
- desc->core.disconnect);
+ if (desc->disconnect_mask)
+ address = (unsigned)rcheevos_var_reduce(address & desc->disconnect_mask, desc->core.disconnect);
if (address >= desc->core.len)
address -= rcheevos_var_highest_bit(address);
address += desc->core.offset;
- CHEEVOS_LOG(RCHEEVOS_TAG "address %X set to descriptor %d at offset %X\n", addr, (int)((desc - system->mmaps.descriptors) + 1), address);
+ CHEEVOS_LOG(RCHEEVOS_TAG "address %X set to descriptor %d at offset %X\n", original_address, (int)((desc - system->mmaps.descriptors) + 1), address);
break;
}
}
@@ -236,7 +251,6 @@ const uint8_t* rcheevos_patch_address(unsigned address, int console)
else
{
unsigned i;
- unsigned addr = address;
for (i = 0; i < 4; i++)
{
@@ -260,10 +274,9 @@ const uint8_t* rcheevos_patch_address(unsigned address, int console)
core_get_memory(&meminfo);
- if (addr < meminfo.size)
+ if (address < meminfo.size)
{
pointer = meminfo.data;
- address = addr;
break;
}
@@ -272,15 +285,15 @@ const uint8_t* rcheevos_patch_address(unsigned address, int console)
* it's size is not always set correctly in the core.
*/
if (i == 0 && console == RC_CONSOLE_NINTENDO)
- addr -= 0x6000;
+ address -= 0x6000;
else
- addr -= meminfo.size;
+ address -= meminfo.size;
}
}
if (pointer == NULL)
{
- CHEEVOS_LOG(RCHEEVOS_TAG "address %X not supported\n", address);
+ CHEEVOS_LOG(RCHEEVOS_TAG "address %X not supported\n", original_address);
return NULL;
}
diff --git a/command.h b/command.h
index 4a0ec9a6a0..3b15d23834 100644
--- a/command.h
+++ b/command.h
@@ -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. */
diff --git a/config.def.h b/config.def.h
index 366bcd0b18..3231481c74 100644
--- a/config.def.h
+++ b/config.def.h
@@ -329,7 +329,11 @@
#endif
/* Smooths picture. */
+#if defined(_3DS) || defined(GEKKO) || defined(HW_RVL) || defined(PSP) || defined(VITA) || defined(SN_TARGET_PSP2) || defined(PS2) || defined(_XBOX)
#define DEFAULT_VIDEO_SMOOTH true
+#else
+#define DEFAULT_VIDEO_SMOOTH false
+#endif
/* On resize and fullscreen, rendering area will stay 4:3 */
#define DEFAULT_FORCE_ASPECT true
@@ -468,7 +472,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 +513,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
@@ -915,11 +923,11 @@ static const bool network_on_demand_thumbnails = false;
#endif
/* Number of entries that will be kept in content history playlist file. */
-static const unsigned default_content_history_size = 100;
+static const unsigned default_content_history_size = 200;
/* Number of entries that will be kept in content favorites playlist file.
* -1 == 'unlimited' (99999) */
-static const int default_content_favorites_size = 100;
+static const int default_content_favorites_size = 200;
/* Sort all playlists (apart from histories) alphabetically */
static const bool playlist_sort_alphabetical = true;
diff --git a/configuration.c b/configuration.c
index 810988a3a8..a1bd36c71b 100644
--- a/configuration.c
+++ b/configuration.c
@@ -1341,7 +1341,6 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
SETTING_BOOL("frame_time_counter_reset_after_load_state", &settings->bools.frame_time_counter_reset_after_load_state, true, false, false);
SETTING_BOOL("frame_time_counter_reset_after_save_state", &settings->bools.frame_time_counter_reset_after_save_state, true, false, false);
SETTING_BOOL("crt_switch_resolution_use_custom_refresh_rate", &settings->bools.crt_switch_custom_refresh_enable, true, false, false);
- SETTING_BOOL("automatically_add_content_to_playlist", &settings->bools.automatically_add_content_to_playlist, true, DEFAULT_AUTOMATICALLY_ADD_CONTENT_TO_PLAYLIST, false);
SETTING_BOOL("ui_companion_start_on_boot", &settings->bools.ui_companion_start_on_boot, true, ui_companion_start_on_boot, false);
SETTING_BOOL("ui_companion_enable", &settings->bools.ui_companion_enable, true, ui_companion_enable, false);
SETTING_BOOL("ui_companion_toggle", &settings->bools.ui_companion_toggle, false, ui_companion_toggle, false);
@@ -1460,6 +1459,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);
diff --git a/configuration.h b/configuration.h
index c14c307741..fa6c8ecaba 100644
--- a/configuration.h
+++ b/configuration.h
@@ -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;
@@ -360,7 +361,6 @@ typedef struct settings
bool bluetooth_enable;
bool localap_enable;
- bool automatically_add_content_to_playlist;
bool video_window_show_decorations;
bool video_window_save_positions;
diff --git a/core.h b/core.h
index 29fc95767d..35d7961ca0 100644
--- a/core.h
+++ b/core.h
@@ -25,6 +25,7 @@
#include "core_type.h"
#include "input/input_defines.h"
+#include "disk_control_interface.h"
RETRO_BEGIN_DECLS
@@ -67,8 +68,8 @@ typedef struct rarch_system_info
bool supports_vfs;
- struct retro_disk_control_callback disk_control_cb;
- struct retro_location_callback location_cb;
+ disk_control_interface_t disk_control;
+ struct retro_location_callback location_cb;
struct
{
diff --git a/core_info.c b/core_info.c
index 239a7d20f8..023ca851b4 100644
--- a/core_info.c
+++ b/core_info.c
@@ -21,14 +21,12 @@
#include
#include
#include
-#include
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "retroarch.h"
-#include "verbosity.h"
#include "core_info.h"
#include "file_path_special.h"
@@ -610,10 +608,7 @@ static bool core_info_list_update_missing_firmware_internal(
info->firmware[i].path, path_size);
info->firmware[i].missing = !path_is_valid(path);
if (info->firmware[i].missing && !info->firmware[i].optional)
- {
*set_missing_bios = true;
- RARCH_WARN("Firmware missing: %s\n", info->firmware[i].path);
- }
}
free(path);
diff --git a/cores/libretro-ffmpeg/ffmpeg_core.c b/cores/libretro-ffmpeg/ffmpeg_core.c
index 9e3dd0493f..d9d28d9ecd 100644
--- a/cores/libretro-ffmpeg/ffmpeg_core.c
+++ b/cores/libretro-ffmpeg/ffmpeg_core.c
@@ -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);
diff --git a/cores/libretro-ffmpeg/packet_buffer.c b/cores/libretro-ffmpeg/packet_buffer.c
index b852631b5c..da4cd4654c 100644
--- a/cores/libretro-ffmpeg/packet_buffer.c
+++ b/cores/libretro-ffmpeg/packet_buffer.c
@@ -16,7 +16,7 @@ struct packet_buffer
packet_buffer_t *packet_buffer_create()
{
- packet_buffer_t *b = malloc(sizeof(packet_buffer_t));
+ packet_buffer_t *b = (packet_buffer_t*)malloc(sizeof(packet_buffer_t));
if (!b)
return NULL;
diff --git a/cores/libretro-ffmpeg/video_buffer.c b/cores/libretro-ffmpeg/video_buffer.c
index 72aeeaf560..d59354ae09 100644
--- a/cores/libretro-ffmpeg/video_buffer.c
+++ b/cores/libretro-ffmpeg/video_buffer.c
@@ -25,14 +25,14 @@ struct video_buffer
video_buffer_t *video_buffer_create(size_t capacity, int frame_size, int width, int height)
{
- video_buffer_t *b = malloc(sizeof(video_buffer_t));
+ video_buffer_t *b = (video_buffer_t*)malloc(sizeof(video_buffer_t));
if (!b)
return NULL;
memset(b, 0, sizeof(video_buffer_t));
b->capacity = capacity;
- b->status = malloc(sizeof(enum kbStatus) * capacity);
+ b->status = (enum kbStatus*)malloc(sizeof(enum kbStatus) * capacity);
if (!b->status)
goto fail;
for (int i = 0; i < capacity; i++)
@@ -44,21 +44,21 @@ video_buffer_t *video_buffer_create(size_t capacity, int frame_size, int width,
if (!b->lock || !b->open_cond || !b->finished_cond)
goto fail;
- b->buffer = malloc(sizeof(video_decoder_context_t) * capacity);
+ b->buffer = (video_decoder_context_t*)malloc(sizeof(video_decoder_context_t) * capacity);
if (!b->buffer)
goto fail;
for (int i = 0; i < capacity; i++)
{
- b->buffer[i].index = i;
- b->buffer[i].pts = 0;
- b->buffer[i].sws = sws_alloc_context();
- b->buffer[i].source = av_frame_alloc();
+ b->buffer[i].index = i;
+ b->buffer[i].pts = 0;
+ b->buffer[i].sws = sws_alloc_context();
+ b->buffer[i].source = av_frame_alloc();
#if LIBAVUTIL_VERSION_MAJOR > 55
b->buffer[i].hw_source = av_frame_alloc();
#endif
- b->buffer[i].target = av_frame_alloc();
- b->buffer[i].frame_buf = av_malloc(frame_size);
+ b->buffer[i].target = av_frame_alloc();
+ b->buffer[i].frame_buf = (uint8_t*)av_malloc(frame_size);
avpicture_fill((AVPicture*)b->buffer[i].target, (const uint8_t*)b->buffer[i].frame_buf,
PIX_FMT_RGB32, width, height);
diff --git a/cores/libretro-imageviewer/Makefile b/cores/libretro-imageviewer/Makefile
index 9916b3eeee..e3f4554a75 100644
--- a/cores/libretro-imageviewer/Makefile
+++ b/cores/libretro-imageviewer/Makefile
@@ -8,6 +8,7 @@ image_core.so: image_core.c
../../libretro-common/compat/compat_strcasestr.c \
../../libretro-common/compat/compat_strl.c \
../../libretro-common/file/file_path.c \
+ ../../libretro-common/file/file_path_io.c \
../../libretro-common/file/retro_dirent.c \
../../libretro-common/lists/dir_list.c \
../../libretro-common/lists/string_list.c \
diff --git a/database_info.c b/database_info.c
index e0e80af6de..afb851863f 100644
--- a/database_info.c
+++ b/database_info.c
@@ -29,7 +29,6 @@
#include "core_info.h"
#include "database_info.h"
-#include "verbosity.h"
int database_info_build_query_enum(char *s, size_t len,
enum database_query_type type,
@@ -105,7 +104,6 @@ int database_info_build_query_enum(char *s, size_t len,
add_quotes = false;
break;
case DATABASE_QUERY_NONE:
- RARCH_LOG("Unknown type: %d\n", type);
break;
}
@@ -122,10 +120,6 @@ int database_info_build_query_enum(char *s, size_t len,
strlcat(s, "}", len);
-#if 0
- RARCH_LOG("query: %s\n", s);
-#endif
-
return 0;
}
@@ -289,10 +283,6 @@ static int database_cursor_iterate(libretrodb_cursor_t *cur,
else if (string_is_equal(str, "md5"))
db_info->md5 = bin_to_hex_alloc(
(uint8_t*)val->val.binary.buff, val->val.binary.len);
- else
- {
- RARCH_LOG("Unknown key: %s\n", str);
- }
}
rmsgpack_dom_value_free(&item);
diff --git a/deps/discord-rpc/.clang-format b/deps/discord-rpc/.clang-format
deleted file mode 100644
index 1be83906c7..0000000000
--- a/deps/discord-rpc/.clang-format
+++ /dev/null
@@ -1,92 +0,0 @@
----
-AccessModifierOffset: -4
-AlignAfterOpenBracket: true
-AlignConsecutiveAssignments: false
-AlignConsecutiveDeclarations: false
-AlignEscapedNewlines: Left
-AlignOperands: false
-AlignTrailingComments: true
-AllowAllParametersOfDeclarationOnNextLine: false
-AllowShortBlocksOnASingleLine: false
-AllowShortCaseLabelsOnASingleLine: false
-AllowShortFunctionsOnASingleLine: InlineOnly
-AllowShortIfStatementsOnASingleLine: false
-AllowShortLoopsOnASingleLine: false
-AlwaysBreakAfterReturnType: None
-AlwaysBreakBeforeMultilineStrings: false
-AlwaysBreakTemplateDeclarations: true
-BinPackArguments: false
-BinPackParameters: false
-BreakBeforeBinaryOperators: None
-BreakBeforeBraces: Stroustrup
-BreakBeforeInheritanceComma: true
-BreakBeforeTernaryOperators: true
-BreakConstructorInitializers: BeforeComma
-BreakStringLiterals: true
-ColumnLimit: 100
-CommentPragmas: ''
-CompactNamespaces: false
-ConstructorInitializerAllOnOneLineOrOnePerLine: false
-ConstructorInitializerIndentWidth: 2
-ContinuationIndentWidth: 2
-Cpp11BracedListStyle: true
-DerivePointerAlignment: false
-DisableFormat: false
-FixNamespaceComments: true
-ForEachMacros: []
-IndentCaseLabels: false
-IncludeCategories:
- - Regex: '^("|<)stdafx\.h(pp)?("|>)'
- Priority: -1
- - Regex: '^<(W|w)indows.h>'
- Priority: 1
- - Regex: '^<'
- Priority: 2
- - Regex: '.*'
- Priority: 3
-IncludeIsMainRegex: '(_test|_win|_linux|_mac|_ios|_osx|_null)?$'
-IndentCaseLabels: false
-IndentWidth: 4
-IndentWrappedFunctionNames: false
-KeepEmptyLinesAtTheStartOfBlocks: false
-MacroBlockBegin: ''
-MacroBlockEnd: ''
-MaxEmptyLinesToKeep: 1
-NamespaceIndentation: None
-PenaltyBreakAssignment: 0
-PenaltyBreakBeforeFirstCallParameter: 1
-PenaltyBreakComment: 300
-PenaltyBreakFirstLessLess: 120
-PenaltyBreakString: 1000
-PenaltyExcessCharacter: 1000000
-PenaltyReturnTypeOnItsOwnLine: 9999999
-PointerAlignment: Left
-ReflowComments: true
-SortIncludes: false
-SortUsingDeclarations: true
-SpaceAfterCStyleCast: false
-SpaceAfterTemplateKeyword: true
-SpaceBeforeAssignmentOperators: true
-SpaceBeforeParens: ControlStatements
-SpaceInEmptyParentheses: false
-SpacesBeforeTrailingComments: 1
-SpacesInAngles: false
-SpacesInCStyleCastParentheses: false
-SpacesInContainerLiterals: true
-SpacesInParentheses: false
-SpacesInSquareBrackets: false
-Standard: Cpp11
-TabWidth: 4
-UseTab: Never
----
-Language: Cpp
----
-Language: ObjC
-ObjCBlockIndentWidth: 4
-ObjCSpaceAfterProperty: true
-ObjCSpaceBeforeProtocolList: false
----
-Language: Java
-BasedOnStyle: Google
-BreakAfterJavaFieldAnnotations: true
-...
diff --git a/deps/discord-rpc/.gitignore b/deps/discord-rpc/.gitignore
deleted file mode 100644
index 223c07d706..0000000000
--- a/deps/discord-rpc/.gitignore
+++ /dev/null
@@ -1,5 +0,0 @@
-/build*/
-/.vscode/
-/thirdparty/
-.vs/
-.DS_Store
\ No newline at end of file
diff --git a/deps/discord-rpc/.travis.yml b/deps/discord-rpc/.travis.yml
deleted file mode 100644
index 5d091317cd..0000000000
--- a/deps/discord-rpc/.travis.yml
+++ /dev/null
@@ -1,47 +0,0 @@
-language: cpp
-
-env:
- global:
- - CLANG_FORMAT_SUFFIX="-dummy" # don't use formatting on Travis, this is
- # needed not to use default 3.5 version
- # which is too old.
-
-matrix:
- include:
- - os: linux
- env: MATRIX_EVAL="CC=gcc-5 && CXX=g++-5"
- addons:
- apt:
- sources:
- - ubuntu-toolchain-r-test
- packages:
- - g++-5
- - os: linux
- env: MATRIX_EVAL="CC=clang-4.0 && CXX=clang++-4.0"
- addons:
- apt:
- sources:
- - llvm-toolchain-trusty-4.0
- packages:
- - clang-4.0
- - os: linux
- env: MATRIX_EVAL="CC=clang-5.0 && CXX=clang++-5.0"
- addons:
- apt:
- sources:
- - llvm-toolchain-trusty-5.0
- packages:
- - clang-5.0
- - os: osx
- osx_image: xcode9
-
-# prevent Travis from overwriting our CXX variables
-before_install:
- - eval "${MATRIX_EVAL}"
- - echo $CXX
-
-script:
- - mkdir build
- - cd build
- - cmake -DCLANG_FORMAT_SUFFIX=$CLANG_FORMAT_SUFFIX --config Release ..
- - cmake --build . -- -j2
diff --git a/deps/discord-rpc/CMakeLists.txt b/deps/discord-rpc/CMakeLists.txt
deleted file mode 100644
index 5dad9e9f6d..0000000000
--- a/deps/discord-rpc/CMakeLists.txt
+++ /dev/null
@@ -1,56 +0,0 @@
-cmake_minimum_required (VERSION 3.2.0)
-project (DiscordRPC)
-
-include(GNUInstallDirs)
-
-option(BUILD_EXAMPLES "Build example apps" ON)
-
-# format
-file(GLOB_RECURSE ALL_SOURCE_FILES
- examples/*.cpp examples/*.h examples/*.c
- include/*.h
- src/*.cpp src/*.h src/*.c
-)
-
-# Set CLANG_FORMAT_SUFFIX if you are using custom clang-format, e.g. clang-format-5.0
-find_program(CLANG_FORMAT_CMD clang-format${CLANG_FORMAT_SUFFIX})
-
-if (CLANG_FORMAT_CMD)
- add_custom_target(
- clangformat
- COMMAND ${CLANG_FORMAT_CMD}
- -i -style=file -fallback-style=none
- ${ALL_SOURCE_FILES}
- DEPENDS
- ${ALL_SOURCE_FILES}
- )
-endif(CLANG_FORMAT_CMD)
-
-# thirdparty stuff
-execute_process(
- COMMAND mkdir ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty
- ERROR_QUIET
-)
-
-find_file(RAPIDJSONTEST NAMES rapidjson rapidjson-1.1.0 PATHS ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty CMAKE_FIND_ROOT_PATH_BOTH)
-if (NOT RAPIDJSONTEST)
- message("no rapidjson, download")
- set(RJ_TAR_FILE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/v1.1.0.tar.gz)
- file(DOWNLOAD https://github.com/miloyip/rapidjson/archive/v1.1.0.tar.gz ${RJ_TAR_FILE})
- execute_process(
- COMMAND ${CMAKE_COMMAND} -E tar xzf ${RJ_TAR_FILE}
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty
- )
- file(REMOVE ${RJ_TAR_FILE})
-endif(NOT RAPIDJSONTEST)
-
-find_file(RAPIDJSON NAMES rapidjson rapidjson-1.1.0 PATHS ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty CMAKE_FIND_ROOT_PATH_BOTH)
-
-add_library(rapidjson STATIC IMPORTED ${RAPIDJSON})
-
-# add subdirs
-
-add_subdirectory(src)
-if (BUILD_EXAMPLES)
- add_subdirectory(examples/send-presence)
-endif(BUILD_EXAMPLES)
diff --git a/deps/discord-rpc/README.md b/deps/discord-rpc/README.md
deleted file mode 100644
index 011c961755..0000000000
--- a/deps/discord-rpc/README.md
+++ /dev/null
@@ -1,91 +0,0 @@
-# Discord RPC
-
-This is a library for interfacing your game with a locally running Discord desktop client. It's known to work on Windows, macOS, and Linux. You can use the lib directly if you like, or use it as a guide to writing your own if it doesn't suit your game as is. PRs/feedback welcome if you have an improvement everyone might want, or can describe how this doesn't meet your needs.
-
-Included here are some quick demos that implement the very minimal subset to show current status, and
-have callbacks for where a more complete game would do more things (joining, spectating, etc).
-
-## Documentation
-
-The most up to date documentation for Rich Presence can always be found on our [developer site](https://discordapp.com/developers/docs/rich-presence/how-to)! If you're interested in rolling your own native implementation of Rich Presence via IPC sockets instead of using our SDK—hey, you've got free time, right?—check out the ["Hard Mode" documentation](https://github.com/discordapp/discord-rpc/blob/master/documentation/hard-mode.md).
-
-## Basic Usage
-
-Zeroith, you should be set up to build things because you are a game developer, right?
-
-First, head on over to the [Discord developers site](https://discordapp.com/developers/applications/me) and make yourself an app. Keep track of `Client ID` -- you'll need it here to pass to the init function.
-
-### From package
-
-Download a release package for your platform(s) -- they have subdirs with various prebuilt options, select the one you need add `/include` to your compile includes, `/lib` to your linker paths, and link with `discord-rpc`. For the dynamically linked builds, you'll need to ship the associated file along with your game.
-
-### From repo
-
-First-eth, you'll want `CMake`. There's a few different ways to install it on your system, and you should refer to [their website](https://cmake.org/install/). Many package managers provide ways of installing CMake as well.
-
-To make sure it's installed correctly, type `cmake --version` into your flavor of terminal/cmd. If you get a response with a version number, you're good to go!
-
-There's a [CMake](https://cmake.org/download/) file that should be able to generate the lib for you; Sometimes I use it like this:
-```sh
- cd
- mkdir build
- cd build
- cmake .. -DCMAKE_INSTALL_PREFIX=
- cmake --build . --config Release --target install
-```
-There is a wrapper build script `build.py` that runs `cmake` with a few different options.
-
-Usually, I run `build.py` to get things started, then use the generated project files as I work on things. It does depend on `click` library, so do a quick `pip install click` to make sure you have it if you want to run `build.py`.
-
-There are some CMake options you might care about:
-
-| flag | default | does |
-|------|---------|------|
-| `ENABLE_IO_THREAD` | `ON` | When enabled, we start up a thread to do io processing, if disabled you should call `Discord_UpdateConnection` yourself.
-| `USE_STATIC_CRT` | `OFF` | (Windows) Enable to statically link the CRT, avoiding requiring users install the redistributable package. (The prebuilt binaries enable this option)
-| [`BUILD_SHARED_LIBS`](https://cmake.org/cmake/help/v3.7/variable/BUILD_SHARED_LIBS.html) | `OFF` | Build library as a DLL
-| `WARNINGS_AS_ERRORS` | `OFF` | When enabled, compiles with `-Werror` (on *nix platforms). |
-
-## Continuous Builds
-
-Why do we have three of these? Three times the fun!
-
-| CI | badge |
-|----|-------|
-| TravisCI | [](https://travis-ci.org/discordapp/discord-rpc)
-| AppVeyor | [](https://ci.appveyor.com/project/crmarsh/discord-rpc)
-| Buildkite (internal) | [](https://buildkite.com/discord/discord-rpc)
-
-## Sample: send-presence
-
-This is a text adventure "game" that inits/deinits the connection to Discord, and sends a presence update on each command.
-
-## Sample: button-clicker
-
-This is a sample [Unity](https://unity3d.com/) project that wraps a DLL version of the library, and sends presence updates when you click on a button. Run `python build.py unity` in the root directory to build the correct library files and place them in their respective folders.
-
-## Sample: unrealstatus
-
-This is a sample [Unreal](https://www.unrealengine.com) project that wraps the DLL version of the library with an Unreal plugin, exposes a blueprint class for interacting with it, and uses that to make a very simple UI. Run `python build.py unreal` in the root directory to build the correct library files and place them in their respective folders.
-
-## Wrappers and Implementations
-
-Below is a table of unofficial, community-developed wrappers for and implementations of Rich Presence in various languages. If you would like to have yours added, please make a pull request adding your repository to the table. The repository should include:
-
-- The code
-- A brief ReadMe of how to use it
-- A working example
-
-###### Rich Presence Wrappers and Implementations
-
-| Name | Language |
-|------|----------|
-| [DerelictDiscordRPC](https://github.com/voidblaster/DerelictDiscordRPC) | [D](https://dlang.org/) |
-| [discord-rpc.jar](https://github.com/Vatuu/discord-rpc "Discord-RPC.jar") | Java |
-| [java-discord-rpc](https://github.com/MinnDevelopment/java-discord-rpc) | Java |
-| [Discord-IPC](https://github.com/jagrosh/DiscordIPC) | Java |
-| [Discord Rich Presence](https://npmjs.org/discord-rich-presence) | JavaScript |
-| [drpc4k](https://github.com/Bluexin/drpc4k) | [Kotlin](https://kotlinlang.org/) |
-| [lua-discordRPC](https://github.com/pfirsich/lua-discordRPC) | LuaJIT (FFI) |
-| [pypresence](https://github.com/qwertyquerty/pypresence) | [Python](https://python.org/) |
-| [SwordRPC](https://github.com/Azoy/SwordRPC) | [Swift](https://swift.org) |
diff --git a/deps/discord-rpc/appveyor.yml b/deps/discord-rpc/appveyor.yml
deleted file mode 100644
index 1c328b8787..0000000000
--- a/deps/discord-rpc/appveyor.yml
+++ /dev/null
@@ -1,17 +0,0 @@
-version: '{build}'
-install:
- - python -m pip install click
-
-build_script:
- - mkdir examples\unrealstatus\Plugins\discordrpc\Binaries\ThirdParty\discordrpcLibrary\Win64
- - python build.py
-
-artifacts:
-- path: builds\install\win32-dynamic
- name: win32-dynamic
-- path: builds\install\win32-static
- name: win32-static
-- path: builds\install\win64-dynamic
- name: win64-dynamic
-- path: builds\install\win64-static
- name: win64-static
diff --git a/deps/discord-rpc/build.py b/deps/discord-rpc/build.py
deleted file mode 100755
index 215d3586b3..0000000000
--- a/deps/discord-rpc/build.py
+++ /dev/null
@@ -1,304 +0,0 @@
-#!/usr/bin/env python
-
-import os
-import subprocess
-import sys
-import shutil
-import zipfile
-from contextlib import contextmanager
-import click
-
-
-def get_platform():
- """ a name for the platform """
- if sys.platform.startswith('win'):
- return 'win'
- elif sys.platform == 'darwin':
- return 'osx'
- elif sys.platform.startswith('linux'):
- return 'linux'
- raise Exception('Unsupported platform ' + sys.platform)
-
-
-SCRIPT_PATH = os.path.dirname(os.path.abspath(__file__))
-# we use Buildkite which sets this env variable by default
-IS_BUILD_MACHINE = os.environ.get('CI', '') == 'true'
-PLATFORM = get_platform()
-INSTALL_ROOT = os.path.join(SCRIPT_PATH, 'builds', 'install')
-
-
-def get_signtool():
- """ get path to code signing tool """
- if PLATFORM == 'win':
- sdk_dir = 'c:\\Program Files (x86)\\Windows Kits\\10' # os.environ['WindowsSdkDir']
- return os.path.join(sdk_dir, 'bin', 'x86', 'signtool.exe')
- elif PLATFORM == 'osx':
- return '/usr/bin/codesign'
-
-
-@contextmanager
-def cd(new_dir):
- """ Temporarily change current directory """
- if new_dir:
- old_dir = os.getcwd()
- os.chdir(new_dir)
- yield
- if new_dir:
- os.chdir(old_dir)
-
-
-def mkdir_p(path):
- """ mkdir -p """
- if not os.path.isdir(path):
- click.secho('Making ' + path, fg='yellow')
- os.makedirs(path)
-
-
-@click.group(invoke_without_command=True)
-@click.pass_context
-@click.option('--clean', is_flag=True)
-def cli(ctx, clean):
- """ click wrapper for command line stuff """
- if ctx.invoked_subcommand is None:
- ctx.invoke(libs, clean=clean)
- if IS_BUILD_MACHINE:
- ctx.invoke(sign)
- ctx.invoke(archive)
-
-
-@cli.command()
-@click.pass_context
-def unity(ctx):
- """ build just dynamic libs for use in unity project """
- ctx.invoke(libs, clean=False, static=False, shared=True, skip_formatter=True, just_release=True)
- BUILDS = []
-
- click.echo('--- Copying libs and header into unity example')
- UNITY_PROJECT_PATH = os.path.join(SCRIPT_PATH, 'examples', 'button-clicker', 'Assets', 'Plugins')
-
- if sys.platform.startswith('win'):
- LIBRARY_NAME = 'discord-rpc.dll'
- BUILD_64_BASE_PATH = os.path.join(SCRIPT_PATH, 'builds', 'win64-dynamic', 'src', 'Release')
- UNITY_64_DLL_PATH = os.path.join(UNITY_PROJECT_PATH, 'x86_64')
- BUILDS.append({BUILD_64_BASE_PATH: UNITY_64_DLL_PATH})
-
- BUILD_32_BASE_PATH = os.path.join(SCRIPT_PATH, 'builds', 'win32-dynamic', 'src', 'Release')
- UNITY_32_DLL_PATH = os.path.join(UNITY_PROJECT_PATH, 'x86')
- BUILDS.append({BUILD_32_BASE_PATH: UNITY_32_DLL_PATH})
-
- elif sys.platform == 'darwin':
- LIBRARY_NAME = 'discord-rpc.bundle'
- BUILD_BASE_PATH = os.path.join(SCRIPT_PATH, 'builds', 'osx-dynamic', 'src')
- UNITY_DLL_PATH = UNITY_PROJECT_PATH
- os.rename(
- os.path.join(BUILD_BASE_PATH, 'libdiscord-rpc.dylib'), os.path.join(BUILD_BASE_PATH, 'discord-rpc.bundle'))
-
- BUILDS.append({BUILD_BASE_PATH: UNITY_DLL_PATH})
-
- elif sys.platform.startswith('linux'):
- LIBRARY_NAME = 'discord-rpc.so'
- BUILD_BASE_PATH = os.path.join(SCRIPT_PATH, 'builds', 'linux-dynamic', 'src')
- UNITY_DLL_PATH = os.path.join(UNITY_PROJECT_PATH, 'x86')
- os.rename(os.path.join(BUILD_BASE_PATH, 'libdiscord-rpc.so'), os.path.join(BUILD_BASE_PATH, 'discord-rpc.so'))
-
- BUILDS.append({BUILD_BASE_PATH: UNITY_DLL_PATH})
-
- else:
- raise Exception('Unsupported platform ' + sys.platform)
-
- for build in BUILDS:
- for i in build:
- mkdir_p(build[i])
- shutil.copy(os.path.join(i, LIBRARY_NAME), build[i])
-
-
-@cli.command()
-@click.pass_context
-def unreal(ctx):
- """ build libs and copy them into the unreal project """
- ctx.invoke(libs, clean=False, static=False, shared=True, skip_formatter=True, just_release=True)
- BUILDS = []
-
- click.echo('--- Copying libs and header into unreal example')
- UNREAL_PROJECT_PATH = os.path.join(SCRIPT_PATH, 'examples', 'unrealstatus', 'Plugins', 'discordrpc')
- UNREAL_INCLUDE_PATH = os.path.join(UNREAL_PROJECT_PATH, 'Source', 'ThirdParty', 'DiscordRpcLibrary', 'Include')
- mkdir_p(UNREAL_INCLUDE_PATH)
- shutil.copy(os.path.join(SCRIPT_PATH, 'include', 'discord_rpc.h'), UNREAL_INCLUDE_PATH)
-
- if sys.platform.startswith('win'):
- LIBRARY_NAME = 'discord-rpc.lib'
- BUILD_64_BASE_PATH = os.path.join(SCRIPT_PATH, 'builds', 'win64-dynamic', 'src', 'Release')
- UNREAL_64_DLL_PATH = os.path.join(UNREAL_PROJECT_PATH, 'Source', 'ThirdParty', 'DiscordRpcLibrary', 'Win64')
- BUILDS.append({BUILD_64_BASE_PATH: UNREAL_64_DLL_PATH})
-
- BUILD_32_BASE_PATH = os.path.join(SCRIPT_PATH, 'builds', 'win32-dynamic', 'src', 'Release')
- UNREAL_32_DLL_PATH = os.path.join(UNREAL_PROJECT_PATH, 'Source', 'ThirdParty', 'DiscordRpcLibrary', 'Win32')
- BUILDS.append({BUILD_32_BASE_PATH: UNREAL_32_DLL_PATH})
-
- elif sys.platform == 'darwin':
- LIBRARY_NAME = 'libdiscord-rpc.dylib'
- BUILD_BASE_PATH = os.path.join(SCRIPT_PATH, 'builds', 'osx-dynamic', 'src')
- UNREAL_DLL_PATH = os.path.join(UNREAL_PROJECT_PATH, 'Source', 'ThirdParty', 'DiscordRpcLibrary', 'Mac')
-
- BUILDS.append({BUILD_BASE_PATH: UNREAL_DLL_PATH})
-
- elif sys.platform.startswith('linux'):
- LIBRARY_NAME = 'libdiscord-rpc.so'
- BUILD_BASE_PATH = os.path.join(SCRIPT_PATH, 'builds', 'linux-dynamic', 'src')
- UNREAL_DLL_PATH = os.path.join(UNREAL_PROJECT_PATH, 'Source', 'ThirdParty', 'DiscordRpcLibrary', 'Linux')
-
- BUILDS.append({BUILD_BASE_PATH: UNREAL_DLL_PATH})
-
- else:
- raise Exception('Unsupported platform ' + sys.platform)
-
- for build in BUILDS:
- for i in build:
- mkdir_p(build[i])
- shutil.copy(os.path.join(i, LIBRARY_NAME), build[i])
-
-
-def build_lib(build_name, generator, options, just_release):
- """ Create a dir under builds, run build and install in it """
- build_path = os.path.join(SCRIPT_PATH, 'builds', build_name)
- install_path = os.path.join(INSTALL_ROOT, build_name)
- mkdir_p(build_path)
- mkdir_p(install_path)
- with cd(build_path):
- initial_cmake = ['cmake', SCRIPT_PATH, '-DCMAKE_INSTALL_PREFIX=%s' % os.path.join('..', 'install', build_name)]
- if generator:
- initial_cmake.extend(['-G', generator])
- for key in options:
- val = options[key]
- if type(val) is bool:
- val = 'ON' if val else 'OFF'
- initial_cmake.append('-D%s=%s' % (key, val))
- click.echo('--- Building ' + build_name)
- subprocess.check_call(initial_cmake)
- if not just_release:
- subprocess.check_call(['cmake', '--build', '.', '--config', 'Debug'])
- subprocess.check_call(['cmake', '--build', '.', '--config', 'Release', '--target', 'install'])
-
-
-@cli.command()
-def archive():
- """ create zip of install dir """
- click.echo('--- Archiving')
- archive_file_path = os.path.join(SCRIPT_PATH, 'builds', 'discord-rpc-%s.zip' % get_platform())
- archive_file = zipfile.ZipFile(archive_file_path, 'w', zipfile.ZIP_DEFLATED)
- archive_src_base_path = INSTALL_ROOT
- archive_dst_base_path = 'discord-rpc'
- with cd(archive_src_base_path):
- for path, _, filenames in os.walk('.'):
- for fname in filenames:
- fpath = os.path.join(path, fname)
- dst_path = os.path.normpath(os.path.join(archive_dst_base_path, fpath))
- click.echo('Adding ' + dst_path)
- archive_file.write(fpath, dst_path)
-
-
-@cli.command()
-def sign():
- """ Do code signing within install directory using our cert """
- tool = get_signtool()
- signable_extensions = set()
- if PLATFORM == 'win':
- signable_extensions.add('.dll')
- sign_command_base = [
- tool,
- 'sign',
- '/n',
- 'Discord Inc.',
- '/a',
- '/tr',
- 'http://timestamp.digicert.com/rfc3161',
- '/as',
- '/td',
- 'sha256',
- '/fd',
- 'sha256',
- ]
- elif PLATFORM == 'osx':
- signable_extensions.add('.dylib')
- sign_command_base = [
- tool,
- '--keychain',
- os.path.expanduser('~/Library/Keychains/login.keychain'),
- '-vvvv',
- '--deep',
- '--force',
- '--sign',
- 'Developer ID Application: Hammer & Chisel Inc. (53Q6R32WPB)',
- ]
- else:
- click.secho('Not signing things on this platform yet', fg='red')
- return
-
- click.echo('--- Signing')
- for path, _, filenames in os.walk(INSTALL_ROOT):
- for fname in filenames:
- ext = os.path.splitext(fname)[1]
- if ext not in signable_extensions:
- continue
- fpath = os.path.join(path, fname)
- click.echo('Sign ' + fpath)
- sign_command = sign_command_base + [fpath]
- subprocess.check_call(sign_command)
-
-
-@cli.command()
-@click.option('--clean', is_flag=True)
-@click.option('--static', is_flag=True)
-@click.option('--shared', is_flag=True)
-@click.option('--skip_formatter', is_flag=True)
-@click.option('--just_release', is_flag=True)
-def libs(clean, static, shared, skip_formatter, just_release):
- """ Do all the builds for this platform """
- if clean:
- shutil.rmtree('builds', ignore_errors=True)
-
- mkdir_p('builds')
-
- if not (static or shared):
- static = True
- shared = True
-
- static_options = {}
- dynamic_options = {
- 'BUILD_SHARED_LIBS': True,
- 'USE_STATIC_CRT': True,
- }
-
- if skip_formatter or IS_BUILD_MACHINE:
- static_options['CLANG_FORMAT_SUFFIX'] = 'none'
- dynamic_options['CLANG_FORMAT_SUFFIX'] = 'none'
-
- if IS_BUILD_MACHINE:
- just_release = True
- static_options['WARNINGS_AS_ERRORS'] = True
- dynamic_options['WARNINGS_AS_ERRORS'] = True
-
- if PLATFORM == 'win':
- generator32 = 'Visual Studio 14 2015'
- generator64 = 'Visual Studio 14 2015 Win64'
- if static:
- build_lib('win32-static', generator32, static_options, just_release)
- build_lib('win64-static', generator64, static_options, just_release)
- if shared:
- build_lib('win32-dynamic', generator32, dynamic_options, just_release)
- build_lib('win64-dynamic', generator64, dynamic_options, just_release)
- elif PLATFORM == 'osx':
- if static:
- build_lib('osx-static', None, static_options, just_release)
- if shared:
- build_lib('osx-dynamic', None, dynamic_options, just_release)
- elif PLATFORM == 'linux':
- if static:
- build_lib('linux-static', None, static_options, just_release)
- if shared:
- build_lib('linux-dynamic', None, dynamic_options, just_release)
-
-
-if __name__ == '__main__':
- os.chdir(SCRIPT_PATH)
- sys.exit(cli())
diff --git a/deps/discord-rpc/documentation/hard-mode.md b/deps/discord-rpc/documentation/hard-mode.md
deleted file mode 100644
index 35042cbcbe..0000000000
--- a/deps/discord-rpc/documentation/hard-mode.md
+++ /dev/null
@@ -1,164 +0,0 @@
-# Hard Mode: Roll Your Own Client
-
-Discord's Rich Presence feature is designed as an obfuscated addition to our existing [RPC infrastructure](https://discordapp.com/developers/docs/topics/rpc). The standalone library and header files make it easy for any dev to drop it into their game.
-
-Our library communicates with Discord over the local Discord RPC socket. We've already done the work in connecting properly, handling disconnects and reconnects, and other RPC intracacies, but those who have done this implementation for our private alpha Voice and Chat SDK can simply make use of the new RPC commands and events to implement Rich Presence.
-
-## Hark! A warning!
-
-By committing to an RPC-only integration, you decide to forego the work our library and header file have done for you in the way of error handling, state storage, disconnecting and reconnecting, and other quality of life abstractions. While simply implementing the new RPC command and events will enable Rich Presence for your game, we highly suggest that you do your best to mimic the functionality of the SDK the most that you can. It ensure not only code quality on your part, but also an excellent experience on the part of your players.
-
-## Application Protocol Registration
-
-One thing that cannot be explicitly done over RPC is registering an application protocol for your game. If you choose to do an RPC-only implementation, you will have to register your application protocol yourself in the format of `discord-[your_app_id]://`. You can use `Discord_Register()` as a good(?) example of how to properly register an application protocol for use with Discord. For OSX and Linux it is probably simpler to handle the protocol registration as part of your install/packaging.
-
-## New RPC Command
-
-The new RPC command for Rich Presence is `SET_ACTIVITY`. The fields are similar to what is outlined in the SDK; we've combined similar fields into objects for the sake of less data on the wire.
-
-The one major difference is the `party.size` field. It is an array with a size of two. The first element is the current party size, `partySize` from the main documentation. The second element is the maximum party size, `partyMax` from the main documentation.
-
-Below is a full example of a `SET_ACTIVITY` command. Field restrictions like size are the same as outlined in the main documentation.
-
-```
-{
- "cmd": "SET_ACTIVITY",
- "args": {
- "pid": 9999, // Your application's process id - required field
- "activity": {
- "state": "In a Group",
- "details": "Competitive | In a Match",
- "timestamps": {
- "start": time(nullptr),
- "end": time(nullptr) + ((60 * 5) + 23)
- },
- "assets": {
- "large_image": "numbani_map",
- "large_text": "Numbani",
- "small_image": "pharah_profile",
- "small_text": "Pharah"
- },
- "party": {
- "id": GameEngine.GetPartyId(),
- "size": [3, 6]
- },
- "secrets": {
- "join": "025ed05c71f639de8bfaa0d679d7c94b2fdce12f",
- "spectate": "e7eb30d2ee025ed05c71ea495f770b76454ee4e0",
- "match": "4b2fdce12f639de8bfa7e3591b71a0d679d7c93f"
- },
- "instance": true
- }
- },
- "nonce": "647d814a-4cf8-4fbb-948f-898abd24f55b"
-}
-```
-
-## New RPC Events
-
-The three new RPC events for Rich Presence power the ability to join and spectate your friends' games.
-
-First is the `ACTIVITY_JOIN` event:
-
-```json
-{
- "cmd": "DISPATCH",
- "data": {
- "secret": "025ed05c71f639de8bfaa0d679d7c94b2fdce12f"
- },
- "evt": "ACTIVITY_JOIN"
-}
-```
-
-Second is the `ACTIVITY_SPECTATE` event:
-
-```json
-{
- "cmd": "DISPATCH",
- "data": {
- "secret": "e7eb30d2ee025ed05c71ea495f770b76454ee4e0"
- },
- "evt": "ACTIVITY_SPECTATE"
-}
-```
-
-And third is the `ACTIVITY_JOIN_REQUEST` event:
-
-```json
-{
- "cmd": "DISPATCH",
- "data": {
- "user": {
- "id": "53908232506183680",
- "username": "Mason",
- "discriminator": "1337",
- "avatar": "a_bab14f271d565501444b2ca3be944b25"
- }
- },
- "evt": "ACTIVITY_JOIN_REQUEST"
-}
-```
-
-In order to receive these events, you need to [subscribe](https://discordapp.com/developers/docs/topics/rpc#subscribe) to them like so:
-
-```json
-{
- "nonce": "be9a6de3-31d0-4767-a8e9-4818c5690015",
- "evt": "ACTIVITY_JOIN",
- "cmd": "SUBSCRIBE"
-}
-```
-
-```json
-{
- "nonce": "ae9qdde3-31d0-8989-a8e9-dnakwy174he",
- "evt": "ACTIVITY_SPECTATE",
- "cmd": "SUBSCRIBE"
-}
-```
-
-```json
-{
- "nonce": "5dc0c062-98c6-47a0-8922-bbb52e9d6afa",
- "evt": "ACTIVITY_JOIN_REQUEST",
- "cmd": "SUBSCRIBE"
-}
-```
-
-To unsubscribe from these events, resend with the command `UNSUBSCRIBE`
-
-## Responding
-A discord user will request access to the game. If the ACTIVITY_JOIN_REQUEST has been subscribed too, the ACTIVITY_JOIN_REQUEST event will be sent to the host's game. Accept it with following model:
-```json
-{
- "nonce": "5dc0c062-98c6-47a0-8922-15aerg126",
- "cmd": "SEND_ACTIVITY_JOIN_INVITE",
- "args":
- {
- "user_id": "53908232506183680"
- }
-}
-```
-
-To reject the request, use `CLOSE_ACTIVITY_REQUEST`:
-```json
-{
- "nonce": "5dc0c062-98c6-47a0-8922-dasg256eafg",
- "cmd": "CLOSE_ACTIVITY_REQUEST",
- "args":
- {
- "user_id": "53908232506183680"
- }
-}
-```
-
-## Notes
-Here are just some quick notes to help with some common troubleshooting problems.
-* IPC will echo back every command you send as a response. Use this as a lock-step feature to avoid flooding messages. Can be used to validate messages such as the Presence or Subscribes.
-* The pipe expects for frames to be written in a single byte array. You cannot do multiple `stream.Write(opcode);` `stream.Write(length);` as it will break the pipe. Instead create a buffer, write the data to the buffer, then send the entire buffer to the stream.
-* Discord can be on any pipe ranging from `discord-ipc-0` to `discord-ipc-9`. It is a good idea to try and connect to each one and keeping the first one you connect too. For multiple clients (eg Discord and Canary), you might want to add a feature to manually select the pipe so you can more easily debug the application.
-* All enums are `lower_snake_case`.
-* The opcode and length in the header are `Little Endian Unsigned Integers (32bits)`. In some languages, you must convert them as they can be architecture specific.
-* [Discord Rich Presence How-To](https://discordapp.com/developers/docs/rich-presence/how-to) contains a lot of the information this document doesn't. For example, it will tell you about the response payload.
-* In the documentation, DISCORD_REPLY_IGNORE is just implemented the same as DISCORD_REPLY_NO.
-* You can test the Join / Spectate feature by enabling them in your profile and whitelisting a test account. Use Canary to run 2 accounts on the same machine.
diff --git a/deps/discord-rpc/documentation/images/rp-dev-dashboard.png b/deps/discord-rpc/documentation/images/rp-dev-dashboard.png
deleted file mode 100644
index f246cfb2dd..0000000000
Binary files a/deps/discord-rpc/documentation/images/rp-dev-dashboard.png and /dev/null differ
diff --git a/deps/discord-rpc/documentation/images/rp-profile-view.png b/deps/discord-rpc/documentation/images/rp-profile-view.png
deleted file mode 100644
index f9ddc31304..0000000000
Binary files a/deps/discord-rpc/documentation/images/rp-profile-view.png and /dev/null differ
diff --git a/deps/discord-rpc/documentation/images/rp-secret-example.png b/deps/discord-rpc/documentation/images/rp-secret-example.png
deleted file mode 100644
index 4ff21b093f..0000000000
Binary files a/deps/discord-rpc/documentation/images/rp-secret-example.png and /dev/null differ
diff --git a/deps/discord-rpc/examples/button-clicker/.gitignore b/deps/discord-rpc/examples/button-clicker/.gitignore
deleted file mode 100644
index 2695047f5d..0000000000
--- a/deps/discord-rpc/examples/button-clicker/.gitignore
+++ /dev/null
@@ -1,8 +0,0 @@
-/Library/
-/Temp/
-/obj/
-/Assets/Plugins/
-/Assets/Plugins.meta
-*.sln
-*.csproj
-*.userprefs
diff --git a/deps/discord-rpc/examples/button-clicker/Assets/DiscordController.cs b/deps/discord-rpc/examples/button-clicker/Assets/DiscordController.cs
deleted file mode 100644
index 182d31d8a1..0000000000
--- a/deps/discord-rpc/examples/button-clicker/Assets/DiscordController.cs
+++ /dev/null
@@ -1,129 +0,0 @@
-using UnityEngine;
-
-[System.Serializable]
-public class DiscordJoinEvent : UnityEngine.Events.UnityEvent { }
-
-[System.Serializable]
-public class DiscordSpectateEvent : UnityEngine.Events.UnityEvent { }
-
-[System.Serializable]
-public class DiscordJoinRequestEvent : UnityEngine.Events.UnityEvent { }
-
-public class DiscordController : MonoBehaviour
-{
- public DiscordRpc.RichPresence presence = new DiscordRpc.RichPresence();
- public string applicationId;
- public string optionalSteamId;
- public int callbackCalls;
- public int clickCounter;
- public DiscordRpc.DiscordUser joinRequest;
- public UnityEngine.Events.UnityEvent onConnect;
- public UnityEngine.Events.UnityEvent onDisconnect;
- public UnityEngine.Events.UnityEvent hasResponded;
- public DiscordJoinEvent onJoin;
- public DiscordJoinEvent onSpectate;
- public DiscordJoinRequestEvent onJoinRequest;
-
- DiscordRpc.EventHandlers handlers;
-
- public void OnClick()
- {
- Debug.Log("Discord: on click!");
- clickCounter++;
-
- presence.details = string.Format("Button clicked {0} times", clickCounter);
-
- DiscordRpc.UpdatePresence(presence);
- }
-
- public void RequestRespondYes()
- {
- Debug.Log("Discord: responding yes to Ask to Join request");
- DiscordRpc.Respond(joinRequest.userId, DiscordRpc.Reply.Yes);
- hasResponded.Invoke();
- }
-
- public void RequestRespondNo()
- {
- Debug.Log("Discord: responding no to Ask to Join request");
- DiscordRpc.Respond(joinRequest.userId, DiscordRpc.Reply.No);
- hasResponded.Invoke();
- }
-
- public void ReadyCallback(ref DiscordRpc.DiscordUser connectedUser)
- {
- ++callbackCalls;
- Debug.Log(string.Format("Discord: connected to {0}#{1}: {2}", connectedUser.username, connectedUser.discriminator, connectedUser.userId));
- onConnect.Invoke();
- }
-
- public void DisconnectedCallback(int errorCode, string message)
- {
- ++callbackCalls;
- Debug.Log(string.Format("Discord: disconnect {0}: {1}", errorCode, message));
- onDisconnect.Invoke();
- }
-
- public void ErrorCallback(int errorCode, string message)
- {
- ++callbackCalls;
- Debug.Log(string.Format("Discord: error {0}: {1}", errorCode, message));
- }
-
- public void JoinCallback(string secret)
- {
- ++callbackCalls;
- Debug.Log(string.Format("Discord: join ({0})", secret));
- onJoin.Invoke(secret);
- }
-
- public void SpectateCallback(string secret)
- {
- ++callbackCalls;
- Debug.Log(string.Format("Discord: spectate ({0})", secret));
- onSpectate.Invoke(secret);
- }
-
- public void RequestCallback(ref DiscordRpc.DiscordUser request)
- {
- ++callbackCalls;
- Debug.Log(string.Format("Discord: join request {0}#{1}: {2}", request.username, request.discriminator, request.userId));
- joinRequest = request;
- onJoinRequest.Invoke(request);
- }
-
- void Start()
- {
- }
-
- void Update()
- {
- DiscordRpc.RunCallbacks();
- }
-
- void OnEnable()
- {
- Debug.Log("Discord: init");
- callbackCalls = 0;
-
- handlers = new DiscordRpc.EventHandlers();
- handlers.readyCallback = ReadyCallback;
- handlers.disconnectedCallback += DisconnectedCallback;
- handlers.errorCallback += ErrorCallback;
- handlers.joinCallback += JoinCallback;
- handlers.spectateCallback += SpectateCallback;
- handlers.requestCallback += RequestCallback;
- DiscordRpc.Initialize(applicationId, ref handlers, true, optionalSteamId);
- }
-
- void OnDisable()
- {
- Debug.Log("Discord: shutdown");
- DiscordRpc.Shutdown();
- }
-
- void OnDestroy()
- {
-
- }
-}
diff --git a/deps/discord-rpc/examples/button-clicker/Assets/DiscordController.cs.meta b/deps/discord-rpc/examples/button-clicker/Assets/DiscordController.cs.meta
deleted file mode 100644
index ee24c7e484..0000000000
--- a/deps/discord-rpc/examples/button-clicker/Assets/DiscordController.cs.meta
+++ /dev/null
@@ -1,12 +0,0 @@
-fileFormatVersion: 2
-guid: 27f0a5f59ffffa84c86547736e2e730a
-timeCreated: 1501697692
-licenseType: Free
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/deps/discord-rpc/examples/button-clicker/Assets/DiscordRpc.cs b/deps/discord-rpc/examples/button-clicker/Assets/DiscordRpc.cs
deleted file mode 100644
index af82c1c231..0000000000
--- a/deps/discord-rpc/examples/button-clicker/Assets/DiscordRpc.cs
+++ /dev/null
@@ -1,198 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Runtime.InteropServices;
-using System.Text;
-
-public class DiscordRpc
-{
- [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
- public delegate void ReadyCallback(ref DiscordUser connectedUser);
-
- [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
- public delegate void DisconnectedCallback(int errorCode, string message);
-
- [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
- public delegate void ErrorCallback(int errorCode, string message);
-
- [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
- public delegate void JoinCallback(string secret);
-
- [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
- public delegate void SpectateCallback(string secret);
-
- [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
- public delegate void RequestCallback(ref DiscordUser request);
-
- public struct EventHandlers
- {
- public ReadyCallback readyCallback;
- public DisconnectedCallback disconnectedCallback;
- public ErrorCallback errorCallback;
- public JoinCallback joinCallback;
- public SpectateCallback spectateCallback;
- public RequestCallback requestCallback;
- }
-
- [Serializable, StructLayout(LayoutKind.Sequential)]
- public struct RichPresenceStruct
- {
- public IntPtr state; /* max 128 bytes */
- public IntPtr details; /* max 128 bytes */
- public long startTimestamp;
- public long endTimestamp;
- public IntPtr largeImageKey; /* max 32 bytes */
- public IntPtr largeImageText; /* max 128 bytes */
- public IntPtr smallImageKey; /* max 32 bytes */
- public IntPtr smallImageText; /* max 128 bytes */
- public IntPtr partyId; /* max 128 bytes */
- public int partySize;
- public int partyMax;
- public IntPtr matchSecret; /* max 128 bytes */
- public IntPtr joinSecret; /* max 128 bytes */
- public IntPtr spectateSecret; /* max 128 bytes */
- public bool instance;
- }
-
- [Serializable]
- public struct DiscordUser
- {
- public string userId;
- public string username;
- public string discriminator;
- public string avatar;
- }
-
- public enum Reply
- {
- No = 0,
- Yes = 1,
- Ignore = 2
- }
-
- [DllImport("discord-rpc", EntryPoint = "Discord_Initialize", CallingConvention = CallingConvention.Cdecl)]
- public static extern void Initialize(string applicationId, ref EventHandlers handlers, bool autoRegister, string optionalSteamId);
-
- [DllImport("discord-rpc", EntryPoint = "Discord_Shutdown", CallingConvention = CallingConvention.Cdecl)]
- public static extern void Shutdown();
-
- [DllImport("discord-rpc", EntryPoint = "Discord_RunCallbacks", CallingConvention = CallingConvention.Cdecl)]
- public static extern void RunCallbacks();
-
- [DllImport("discord-rpc", EntryPoint = "Discord_UpdatePresence", CallingConvention = CallingConvention.Cdecl)]
- private static extern void UpdatePresenceNative(ref RichPresenceStruct presence);
-
- [DllImport("discord-rpc", EntryPoint = "Discord_ClearPresence", CallingConvention = CallingConvention.Cdecl)]
- public static extern void ClearPresence();
-
- [DllImport("discord-rpc", EntryPoint = "Discord_Respond", CallingConvention = CallingConvention.Cdecl)]
- public static extern void Respond(string userId, Reply reply);
-
- [DllImport("discord-rpc", EntryPoint = "Discord_UpdateHandlers", CallingConvention = CallingConvention.Cdecl)]
- public static extern void UpdateHandlers(ref EventHandlers handlers);
-
- public static void UpdatePresence(RichPresence presence)
- {
- var presencestruct = presence.GetStruct();
- UpdatePresenceNative(ref presencestruct);
- presence.FreeMem();
- }
-
- public class RichPresence
- {
- private RichPresenceStruct _presence;
- private readonly List _buffers = new List(10);
-
- public string state; /* max 128 bytes */
- public string details; /* max 128 bytes */
- public long startTimestamp;
- public long endTimestamp;
- public string largeImageKey; /* max 32 bytes */
- public string largeImageText; /* max 128 bytes */
- public string smallImageKey; /* max 32 bytes */
- public string smallImageText; /* max 128 bytes */
- public string partyId; /* max 128 bytes */
- public int partySize;
- public int partyMax;
- public string matchSecret; /* max 128 bytes */
- public string joinSecret; /* max 128 bytes */
- public string spectateSecret; /* max 128 bytes */
- public bool instance;
-
- ///
- /// Get the reprensentation of this instance
- ///
- /// reprensentation of this instance
- internal RichPresenceStruct GetStruct()
- {
- if (_buffers.Count > 0)
- {
- FreeMem();
- }
-
- _presence.state = StrToPtr(state);
- _presence.details = StrToPtr(details);
- _presence.startTimestamp = startTimestamp;
- _presence.endTimestamp = endTimestamp;
- _presence.largeImageKey = StrToPtr(largeImageKey);
- _presence.largeImageText = StrToPtr(largeImageText);
- _presence.smallImageKey = StrToPtr(smallImageKey);
- _presence.smallImageText = StrToPtr(smallImageText);
- _presence.partyId = StrToPtr(partyId);
- _presence.partySize = partySize;
- _presence.partyMax = partyMax;
- _presence.matchSecret = StrToPtr(matchSecret);
- _presence.joinSecret = StrToPtr(joinSecret);
- _presence.spectateSecret = StrToPtr(spectateSecret);
- _presence.instance = instance;
-
- return _presence;
- }
-
- ///
- /// Returns a pointer to a representation of the given string with a size of maxbytes
- ///
- /// String to convert
- /// Pointer to the UTF-8 representation of
- private IntPtr StrToPtr(string input)
- {
- if (string.IsNullOrEmpty(input)) return IntPtr.Zero;
- var convbytecnt = Encoding.UTF8.GetByteCount(input);
- var buffer = Marshal.AllocHGlobal(convbytecnt + 1);
- for (int i = 0; i < convbytecnt + 1; i++)
- {
- Marshal.WriteByte(buffer, i , 0);
- }
- _buffers.Add(buffer);
- Marshal.Copy(Encoding.UTF8.GetBytes(input), 0, buffer, convbytecnt);
- return buffer;
- }
-
- ///
- /// Convert string to UTF-8 and add null termination
- ///
- /// string to convert
- /// UTF-8 representation of with added null termination
- private static string StrToUtf8NullTerm(string toconv)
- {
- var str = toconv.Trim();
- var bytes = Encoding.Default.GetBytes(str);
- if (bytes.Length > 0 && bytes[bytes.Length - 1] != 0)
- {
- str += "\0\0";
- }
- return Encoding.UTF8.GetString(Encoding.UTF8.GetBytes(str));
- }
-
- ///
- /// Free the allocated memory for conversion to
- ///
- internal void FreeMem()
- {
- for (var i = _buffers.Count - 1; i >= 0; i--)
- {
- Marshal.FreeHGlobal(_buffers[i]);
- _buffers.RemoveAt(i);
- }
- }
- }
-}
\ No newline at end of file
diff --git a/deps/discord-rpc/examples/button-clicker/Assets/DiscordRpc.cs.meta b/deps/discord-rpc/examples/button-clicker/Assets/DiscordRpc.cs.meta
deleted file mode 100644
index acd04b102f..0000000000
--- a/deps/discord-rpc/examples/button-clicker/Assets/DiscordRpc.cs.meta
+++ /dev/null
@@ -1,12 +0,0 @@
-fileFormatVersion: 2
-guid: b4474a677de9d80409e98c5393ec5b1e
-timeCreated: 1501697692
-licenseType: Free
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/deps/discord-rpc/examples/button-clicker/Assets/Editor/BuildHelper.cs b/deps/discord-rpc/examples/button-clicker/Assets/Editor/BuildHelper.cs
deleted file mode 100644
index 977745312c..0000000000
--- a/deps/discord-rpc/examples/button-clicker/Assets/Editor/BuildHelper.cs
+++ /dev/null
@@ -1,101 +0,0 @@
-using UnityEditor;
-using System.Diagnostics;
-using System.IO;
-
-[InitializeOnLoad]
-public class ScriptBatch
-{
- static ScriptBatch()
- {
- EnsureDLL();
- }
-
- public static bool FileExists(string filename)
- {
- return new FileInfo(filename).Exists;
- }
-
- public static bool RunRpcBuildScript()
- {
- UnityEngine.Debug.Log("Try to run build script");
-
- Process proc = new Process();
-#if UNITY_STANDALONE_OSX || UNITY_EDITOR_OSX
- proc.StartInfo.UseShellExecute = false;
- // brew installs cmake in /usr/local/bin, which Unity seems to strip from PATH?
- string newPath = proc.StartInfo.EnvironmentVariables["PATH"] + ":/usr/local/bin";
- proc.StartInfo.EnvironmentVariables["PATH"] = newPath;
-#endif
- proc.StartInfo.FileName = "python";
- proc.StartInfo.Arguments = "build.py unity";
- proc.StartInfo.WorkingDirectory = "../..";
- proc.Start();
- proc.WaitForExit();
- return proc.ExitCode == 0;
- }
-
- public static void EnsureDLL()
- {
- #if UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN
- string[] dstDirs = { "Assets/Plugins", "Assets/Plugins/x86", "Assets/Plugins/x86_64" };
- string[] dstDlls = { "Assets/Plugins/x86/discord-rpc.dll", "Assets/Plugins/x86_64/discord-rpc.dll" };
- string[] srcDlls = { "../../builds/install/win64-dynamic/bin/discord-rpc.dll", "../../builds/install/win64-dynamic/bin/discord-rpc.dll" };
- #elif UNITY_STANDALONE_OSX || UNITY_EDITOR_OSX
- string[] dstDirs = { "Assets/Plugins" };
- string[] dstDlls = { "Assets/Plugins/discord-rpc.bundle" };
- string[] srcDlls = { "../../builds/install/osx-dynamic/lib/libdiscord-rpc.dylib" };
- #else
- string[] dstDirs = { "Assets/Plugins", "Assets/Plugins/x86", "Assets/Plugins/x86_64" };
- string[] dstDlls = { "Assets/Plugins/discord-rpc.so" };
- string[] srcDlls = { "../../builds/install/linux-dynamic/lib/libdiscord-rpc.so" };
- #endif
-
- Debug.Assert(dstDlls.Length == srcDlls.Length);
-
- bool exists = true;
- foreach (string fname in dstDlls)
- {
- if (!FileExists(fname))
- {
- exists = false;
- break;
- }
- }
-
- if (exists)
- {
- return;
- }
-
- exists = true;
- foreach (string fname in srcDlls)
- {
- if (!FileExists(fname))
- {
- exists = false;
- break;
- }
- }
-
- if (!exists)
- {
- if (!RunRpcBuildScript())
- {
- UnityEngine.Debug.LogError("Build failed");
- return;
- }
- }
-
- // make sure the dirs exist
- foreach (string dirname in dstDirs)
- {
- Directory.CreateDirectory(dirname);
- }
-
- // Copy dlls
- for (int i = 0; i < dstDlls.Length; ++i)
- {
- FileUtil.CopyFileOrDirectory(srcDlls[i], dstDlls[i]);
- }
- }
-}
\ No newline at end of file
diff --git a/deps/discord-rpc/examples/button-clicker/Assets/Editor/BuildHelper.cs.meta b/deps/discord-rpc/examples/button-clicker/Assets/Editor/BuildHelper.cs.meta
deleted file mode 100644
index c14e1e8b94..0000000000
--- a/deps/discord-rpc/examples/button-clicker/Assets/Editor/BuildHelper.cs.meta
+++ /dev/null
@@ -1,13 +0,0 @@
-fileFormatVersion: 2
-guid: e5aecc4633e5f594b85eaa39f49bb402
-timeCreated: 1512071254
-licenseType: Free
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/deps/discord-rpc/examples/button-clicker/Assets/main.unity b/deps/discord-rpc/examples/button-clicker/Assets/main.unity
deleted file mode 100644
index c5074d5555..0000000000
--- a/deps/discord-rpc/examples/button-clicker/Assets/main.unity
+++ /dev/null
@@ -1,1278 +0,0 @@
-%YAML 1.1
-%TAG !u! tag:unity3d.com,2011:
---- !u!29 &1
-OcclusionCullingSettings:
- m_ObjectHideFlags: 0
- serializedVersion: 2
- m_OcclusionBakeSettings:
- smallestOccluder: 5
- smallestHole: 0.25
- backfaceThreshold: 100
- m_SceneGUID: 00000000000000000000000000000000
- m_OcclusionCullingData: {fileID: 0}
---- !u!104 &2
-RenderSettings:
- m_ObjectHideFlags: 0
- serializedVersion: 8
- m_Fog: 0
- m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
- m_FogMode: 3
- m_FogDensity: 0.01
- m_LinearFogStart: 0
- m_LinearFogEnd: 300
- m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
- m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
- m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
- m_AmbientIntensity: 1
- m_AmbientMode: 3
- m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
- m_SkyboxMaterial: {fileID: 0}
- m_HaloStrength: 0.5
- m_FlareStrength: 1
- m_FlareFadeSpeed: 3
- m_HaloTexture: {fileID: 0}
- m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
- m_DefaultReflectionMode: 0
- m_DefaultReflectionResolution: 128
- m_ReflectionBounces: 1
- m_ReflectionIntensity: 1
- m_CustomReflection: {fileID: 0}
- m_Sun: {fileID: 0}
- m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
---- !u!157 &3
-LightmapSettings:
- m_ObjectHideFlags: 0
- serializedVersion: 11
- m_GIWorkflowMode: 1
- m_GISettings:
- serializedVersion: 2
- m_BounceScale: 1
- m_IndirectOutputScale: 1
- m_AlbedoBoost: 1
- m_TemporalCoherenceThreshold: 1
- m_EnvironmentLightingMode: 0
- m_EnableBakedLightmaps: 0
- m_EnableRealtimeLightmaps: 0
- m_LightmapEditorSettings:
- serializedVersion: 9
- m_Resolution: 2
- m_BakeResolution: 40
- m_TextureWidth: 1024
- m_TextureHeight: 1024
- m_AO: 0
- m_AOMaxDistance: 1
- m_CompAOExponent: 1
- m_CompAOExponentDirect: 0
- m_Padding: 2
- m_LightmapParameters: {fileID: 0}
- m_LightmapsBakeMode: 1
- m_TextureCompression: 1
- m_FinalGather: 0
- m_FinalGatherFiltering: 1
- m_FinalGatherRayCount: 256
- m_ReflectionCompression: 2
- m_MixedBakeMode: 2
- m_BakeBackend: 0
- m_PVRSampling: 1
- m_PVRDirectSampleCount: 32
- m_PVRSampleCount: 500
- m_PVRBounces: 2
- m_PVRFiltering: 0
- m_PVRFilteringMode: 1
- m_PVRCulling: 1
- m_PVRFilteringGaussRadiusDirect: 1
- m_PVRFilteringGaussRadiusIndirect: 5
- m_PVRFilteringGaussRadiusAO: 2
- m_PVRFilteringAtrousColorSigma: 1
- m_PVRFilteringAtrousNormalSigma: 1
- m_PVRFilteringAtrousPositionSigma: 1
- m_LightingDataAsset: {fileID: 0}
- m_UseShadowmask: 1
---- !u!196 &4
-NavMeshSettings:
- serializedVersion: 2
- m_ObjectHideFlags: 0
- m_BuildSettings:
- serializedVersion: 2
- agentTypeID: 0
- agentRadius: 0.5
- agentHeight: 2
- agentSlope: 45
- agentClimb: 0.4
- ledgeDropHeight: 0
- maxJumpAcrossDistance: 0
- minRegionArea: 2
- manualCellSize: 0
- cellSize: 0.16666667
- manualTileSize: 0
- tileSize: 256
- accuratePlacement: 0
- m_NavMeshData: {fileID: 0}
---- !u!1 &134146651
-GameObject:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- serializedVersion: 5
- m_Component:
- - component: {fileID: 134146656}
- - component: {fileID: 134146655}
- - component: {fileID: 134146654}
- - component: {fileID: 134146653}
- - component: {fileID: 134146652}
- m_Layer: 0
- m_Name: Main Camera
- m_TagString: MainCamera
- m_Icon: {fileID: 0}
- m_NavMeshLayer: 0
- m_StaticEditorFlags: 0
- m_IsActive: 1
---- !u!81 &134146652
-AudioListener:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- m_GameObject: {fileID: 134146651}
- m_Enabled: 1
---- !u!124 &134146653
-Behaviour:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- m_GameObject: {fileID: 134146651}
- m_Enabled: 1
---- !u!92 &134146654
-Behaviour:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- m_GameObject: {fileID: 134146651}
- m_Enabled: 1
---- !u!20 &134146655
-Camera:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- m_GameObject: {fileID: 134146651}
- m_Enabled: 1
- serializedVersion: 2
- m_ClearFlags: 1
- m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
- m_NormalizedViewPortRect:
- serializedVersion: 2
- x: 0
- y: 0
- width: 1
- height: 1
- near clip plane: 0.3
- far clip plane: 1000
- field of view: 60
- orthographic: 1
- orthographic size: 5
- m_Depth: -1
- m_CullingMask:
- serializedVersion: 2
- m_Bits: 4294967295
- m_RenderingPath: -1
- m_TargetTexture: {fileID: 0}
- m_TargetDisplay: 0
- m_TargetEye: 3
- m_HDR: 1
- m_AllowMSAA: 1
- m_ForceIntoRT: 0
- m_OcclusionCulling: 1
- m_StereoConvergence: 10
- m_StereoSeparation: 0.022
- m_StereoMirrorMode: 0
---- !u!4 &134146656
-Transform:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- m_GameObject: {fileID: 134146651}
- m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
- m_LocalPosition: {x: 0, y: 0, z: -10}
- m_LocalScale: {x: 1, y: 1, z: 1}
- m_Children: []
- m_Father: {fileID: 0}
- m_RootOrder: 0
- m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
---- !u!1 &359174702
-GameObject:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- serializedVersion: 5
- m_Component:
- - component: {fileID: 359174703}
- - component: {fileID: 359174705}
- - component: {fileID: 359174704}
- m_Layer: 5
- m_Name: Text
- m_TagString: Untagged
- m_Icon: {fileID: 0}
- m_NavMeshLayer: 0
- m_StaticEditorFlags: 0
- m_IsActive: 1
---- !u!224 &359174703
-RectTransform:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- m_GameObject: {fileID: 359174702}
- m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
- m_LocalPosition: {x: 0, y: 0, z: 0}
- m_LocalScale: {x: 1, y: 1, z: 1}
- m_Children: []
- m_Father: {fileID: 1032248339}
- m_RootOrder: 0
- m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
- m_AnchorMin: {x: 0, y: 0}
- m_AnchorMax: {x: 1, y: 1}
- m_AnchoredPosition: {x: 0, y: 0}
- m_SizeDelta: {x: 0, y: 0}
- m_Pivot: {x: 0.5, y: 0.5}
---- !u!114 &359174704
-MonoBehaviour:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- m_GameObject: {fileID: 359174702}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
- m_Name:
- m_EditorClassIdentifier:
- m_Material: {fileID: 0}
- m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
- m_RaycastTarget: 1
- m_OnCullStateChanged:
- m_PersistentCalls:
- m_Calls: []
- m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
- Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
- m_FontData:
- m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
- m_FontSize: 14
- m_FontStyle: 0
- m_BestFit: 0
- m_MinSize: 10
- m_MaxSize: 40
- m_Alignment: 4
- m_AlignByGeometry: 0
- m_RichText: 1
- m_HorizontalOverflow: 0
- m_VerticalOverflow: 0
- m_LineSpacing: 1
- m_Text: Button
---- !u!222 &359174705
-CanvasRenderer:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- m_GameObject: {fileID: 359174702}
---- !u!1 &520806049
-GameObject:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- serializedVersion: 5
- m_Component:
- - component: {fileID: 520806050}
- - component: {fileID: 520806052}
- - component: {fileID: 520806051}
- m_Layer: 5
- m_Name: Text
- m_TagString: Untagged
- m_Icon: {fileID: 0}
- m_NavMeshLayer: 0
- m_StaticEditorFlags: 0
- m_IsActive: 1
---- !u!224 &520806050
-RectTransform:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- m_GameObject: {fileID: 520806049}
- m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
- m_LocalPosition: {x: 0, y: 0, z: 0}
- m_LocalScale: {x: 1, y: 1, z: 1}
- m_Children: []
- m_Father: {fileID: 806911717}
- m_RootOrder: 0
- m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
- m_AnchorMin: {x: 0, y: 0}
- m_AnchorMax: {x: 1, y: 1}
- m_AnchoredPosition: {x: 0, y: 0}
- m_SizeDelta: {x: 0, y: 0}
- m_Pivot: {x: 0.5, y: 0.5}
---- !u!114 &520806051
-MonoBehaviour:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- m_GameObject: {fileID: 520806049}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
- m_Name:
- m_EditorClassIdentifier:
- m_Material: {fileID: 0}
- m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
- m_RaycastTarget: 1
- m_OnCullStateChanged:
- m_PersistentCalls:
- m_Calls: []
- m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
- Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
- m_FontData:
- m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
- m_FontSize: 14
- m_FontStyle: 0
- m_BestFit: 0
- m_MinSize: 10
- m_MaxSize: 40
- m_Alignment: 4
- m_AlignByGeometry: 0
- m_RichText: 1
- m_HorizontalOverflow: 0
- m_VerticalOverflow: 0
- m_LineSpacing: 1
- m_Text: Yes
---- !u!222 &520806052
-CanvasRenderer:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- m_GameObject: {fileID: 520806049}
---- !u!1 &657463235
-GameObject:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- serializedVersion: 5
- m_Component:
- - component: {fileID: 657463238}
- - component: {fileID: 657463237}
- - component: {fileID: 657463236}
- m_Layer: 5
- m_Name: IsConnectedLabel
- m_TagString: Untagged
- m_Icon: {fileID: 0}
- m_NavMeshLayer: 0
- m_StaticEditorFlags: 0
- m_IsActive: 1
---- !u!114 &657463236
-MonoBehaviour:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- m_GameObject: {fileID: 657463235}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3}
- m_Name:
- m_EditorClassIdentifier:
- m_Material: {fileID: 0}
- m_Color: {r: 0.89518255, g: 0.9338235, b: 0.23345588, a: 1}
- m_RaycastTarget: 1
- m_OnCullStateChanged:
- m_PersistentCalls:
- m_Calls: []
- m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
- Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
- m_FontData:
- m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
- m_FontSize: 24
- m_FontStyle: 0
- m_BestFit: 0
- m_MinSize: 2
- m_MaxSize: 40
- m_Alignment: 0
- m_AlignByGeometry: 0
- m_RichText: 1
- m_HorizontalOverflow: 0
- m_VerticalOverflow: 0
- m_LineSpacing: 1
- m_Text: Discord Disconnected
---- !u!222 &657463237
-CanvasRenderer:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- m_GameObject: {fileID: 657463235}
---- !u!224 &657463238
-RectTransform:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- m_GameObject: {fileID: 657463235}
- m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
- m_LocalPosition: {x: 0, y: 0, z: 0}
- m_LocalScale: {x: 1, y: 1, z: 1}
- m_Children: []
- m_Father: {fileID: 1766020814}
- m_RootOrder: 1
- m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
- m_AnchorMin: {x: 0, y: 1}
- m_AnchorMax: {x: 0, y: 1}
- m_AnchoredPosition: {x: 16, y: -19.00003}
- m_SizeDelta: {x: 239.20001, y: 37.799988}
- m_Pivot: {x: 0, y: 1}
---- !u!1 &806911716
-GameObject:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- serializedVersion: 5
- m_Component:
- - component: {fileID: 806911717}
- - component: {fileID: 806911720}
- - component: {fileID: 806911719}
- - component: {fileID: 806911718}
- m_Layer: 5
- m_Name: ButtonRespondYes
- m_TagString: Untagged
- m_Icon: {fileID: 0}
- m_NavMeshLayer: 0
- m_StaticEditorFlags: 0
- m_IsActive: 1
---- !u!224 &806911717
-RectTransform:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- m_GameObject: {fileID: 806911716}
- m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
- m_LocalPosition: {x: 0, y: 0, z: 0}
- m_LocalScale: {x: 1, y: 1, z: 1}
- m_Children:
- - {fileID: 520806050}
- m_Father: {fileID: 1766020814}
- m_RootOrder: 2
- m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
- m_AnchorMin: {x: 0.5, y: 0.5}
- m_AnchorMax: {x: 0.5, y: 0.5}
- m_AnchoredPosition: {x: -129.1, y: -116.3}
- m_SizeDelta: {x: 160, y: 30}
- m_Pivot: {x: 0.5, y: 0.5}
---- !u!114 &806911718
-MonoBehaviour:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- m_GameObject: {fileID: 806911716}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
- m_Name:
- m_EditorClassIdentifier:
- m_Navigation:
- m_Mode: 3
- m_SelectOnUp: {fileID: 0}
- m_SelectOnDown: {fileID: 0}
- m_SelectOnLeft: {fileID: 0}
- m_SelectOnRight: {fileID: 0}
- m_Transition: 1
- m_Colors:
- m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
- m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
- m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
- m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
- m_ColorMultiplier: 1
- m_FadeDuration: 0.1
- m_SpriteState:
- m_HighlightedSprite: {fileID: 0}
- m_PressedSprite: {fileID: 0}
- m_DisabledSprite: {fileID: 0}
- m_AnimationTriggers:
- m_NormalTrigger: Normal
- m_HighlightedTrigger: Highlighted
- m_PressedTrigger: Pressed
- m_DisabledTrigger: Disabled
- m_Interactable: 0
- m_TargetGraphic: {fileID: 806911719}
- m_OnClick:
- m_PersistentCalls:
- m_Calls:
- - m_Target: {fileID: 1929635629}
- m_MethodName: RequestRespondYes
- m_Mode: 1
- m_Arguments:
- m_ObjectArgument: {fileID: 0}
- m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
- m_IntArgument: 0
- m_FloatArgument: 0
- m_StringArgument:
- m_BoolArgument: 0
- m_CallState: 2
- m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0,
- Culture=neutral, PublicKeyToken=null
---- !u!114 &806911719
-MonoBehaviour:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- m_GameObject: {fileID: 806911716}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
- m_Name:
- m_EditorClassIdentifier:
- m_Material: {fileID: 0}
- m_Color: {r: 1, g: 1, b: 1, a: 1}
- m_RaycastTarget: 1
- m_OnCullStateChanged:
- m_PersistentCalls:
- m_Calls: []
- m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
- Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
- m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
- m_Type: 1
- m_PreserveAspect: 0
- m_FillCenter: 1
- m_FillMethod: 4
- m_FillAmount: 1
- m_FillClockwise: 1
- m_FillOrigin: 0
---- !u!222 &806911720
-CanvasRenderer:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- m_GameObject: {fileID: 806911716}
---- !u!1 &1032248338
-GameObject:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- serializedVersion: 5
- m_Component:
- - component: {fileID: 1032248339}
- - component: {fileID: 1032248342}
- - component: {fileID: 1032248341}
- - component: {fileID: 1032248340}
- m_Layer: 5
- m_Name: Button
- m_TagString: Untagged
- m_Icon: {fileID: 0}
- m_NavMeshLayer: 0
- m_StaticEditorFlags: 0
- m_IsActive: 1
---- !u!224 &1032248339
-RectTransform:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- m_GameObject: {fileID: 1032248338}
- m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
- m_LocalPosition: {x: 0, y: 0, z: 0}
- m_LocalScale: {x: 1, y: 1, z: 1}
- m_Children:
- - {fileID: 359174703}
- m_Father: {fileID: 1766020814}
- m_RootOrder: 0
- m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
- m_AnchorMin: {x: 0.5, y: 0.5}
- m_AnchorMax: {x: 0.5, y: 0.5}
- m_AnchoredPosition: {x: 0, y: 0}
- m_SizeDelta: {x: 160, y: 30}
- m_Pivot: {x: 0.5, y: 0.5}
---- !u!114 &1032248340
-MonoBehaviour:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- m_GameObject: {fileID: 1032248338}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
- m_Name:
- m_EditorClassIdentifier:
- m_Navigation:
- m_Mode: 3
- m_SelectOnUp: {fileID: 0}
- m_SelectOnDown: {fileID: 0}
- m_SelectOnLeft: {fileID: 0}
- m_SelectOnRight: {fileID: 0}
- m_Transition: 1
- m_Colors:
- m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
- m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
- m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
- m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
- m_ColorMultiplier: 1
- m_FadeDuration: 0.1
- m_SpriteState:
- m_HighlightedSprite: {fileID: 0}
- m_PressedSprite: {fileID: 0}
- m_DisabledSprite: {fileID: 0}
- m_AnimationTriggers:
- m_NormalTrigger: Normal
- m_HighlightedTrigger: Highlighted
- m_PressedTrigger: Pressed
- m_DisabledTrigger: Disabled
- m_Interactable: 1
- m_TargetGraphic: {fileID: 1032248341}
- m_OnClick:
- m_PersistentCalls:
- m_Calls:
- - m_Target: {fileID: 1929635629}
- m_MethodName: OnClick
- m_Mode: 1
- m_Arguments:
- m_ObjectArgument: {fileID: 0}
- m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
- m_IntArgument: 0
- m_FloatArgument: 0
- m_StringArgument:
- m_BoolArgument: 0
- m_CallState: 2
- m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0,
- Culture=neutral, PublicKeyToken=null
---- !u!114 &1032248341
-MonoBehaviour:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- m_GameObject: {fileID: 1032248338}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
- m_Name:
- m_EditorClassIdentifier:
- m_Material: {fileID: 0}
- m_Color: {r: 1, g: 1, b: 1, a: 1}
- m_RaycastTarget: 1
- m_OnCullStateChanged:
- m_PersistentCalls:
- m_Calls: []
- m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
- Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
- m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
- m_Type: 1
- m_PreserveAspect: 0
- m_FillCenter: 1
- m_FillMethod: 4
- m_FillAmount: 1
- m_FillClockwise: 1
- m_FillOrigin: 0
---- !u!222 &1032248342
-CanvasRenderer:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- m_GameObject: {fileID: 1032248338}
---- !u!1 &1238162986
-GameObject:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- serializedVersion: 5
- m_Component:
- - component: {fileID: 1238162987}
- - component: {fileID: 1238162989}
- - component: {fileID: 1238162988}
- m_Layer: 5
- m_Name: JoinRequestInfo
- m_TagString: Untagged
- m_Icon: {fileID: 0}
- m_NavMeshLayer: 0
- m_StaticEditorFlags: 0
- m_IsActive: 1
---- !u!224 &1238162987
-RectTransform:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- m_GameObject: {fileID: 1238162986}
- m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
- m_LocalPosition: {x: 0, y: 0, z: 0}
- m_LocalScale: {x: 1, y: 1, z: 1}
- m_Children: []
- m_Father: {fileID: 1766020814}
- m_RootOrder: 4
- m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
- m_AnchorMin: {x: 0.5, y: 0.5}
- m_AnchorMax: {x: 0.5, y: 0.5}
- m_AnchoredPosition: {x: -0.0000085831, y: -66.9}
- m_SizeDelta: {x: 323.38, y: 55.29}
- m_Pivot: {x: 0.5, y: 0.5}
---- !u!114 &1238162988
-MonoBehaviour:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- m_GameObject: {fileID: 1238162986}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3}
- m_Name:
- m_EditorClassIdentifier:
- m_Material: {fileID: 0}
- m_Color: {r: 1, g: 0.88965523, b: 0, a: 1}
- m_RaycastTarget: 1
- m_OnCullStateChanged:
- m_PersistentCalls:
- m_Calls: []
- m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
- Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
- m_FontData:
- m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
- m_FontSize: 14
- m_FontStyle: 0
- m_BestFit: 0
- m_MinSize: 10
- m_MaxSize: 40
- m_Alignment: 1
- m_AlignByGeometry: 0
- m_RichText: 1
- m_HorizontalOverflow: 0
- m_VerticalOverflow: 0
- m_LineSpacing: 1
- m_Text: No requests yet
---- !u!222 &1238162989
-CanvasRenderer:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- m_GameObject: {fileID: 1238162986}
---- !u!1 &1470895131
-GameObject:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- serializedVersion: 5
- m_Component:
- - component: {fileID: 1470895134}
- - component: {fileID: 1470895133}
- - component: {fileID: 1470895132}
- m_Layer: 0
- m_Name: EventSystem
- m_TagString: Untagged
- m_Icon: {fileID: 0}
- m_NavMeshLayer: 0
- m_StaticEditorFlags: 0
- m_IsActive: 1
---- !u!114 &1470895132
-MonoBehaviour:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- m_GameObject: {fileID: 1470895131}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 1077351063, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
- m_Name:
- m_EditorClassIdentifier:
- m_HorizontalAxis: Horizontal
- m_VerticalAxis: Vertical
- m_SubmitButton: Submit
- m_CancelButton: Cancel
- m_InputActionsPerSecond: 10
- m_RepeatDelay: 0.5
- m_ForceModuleActive: 0
---- !u!114 &1470895133
-MonoBehaviour:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- m_GameObject: {fileID: 1470895131}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: -619905303, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
- m_Name:
- m_EditorClassIdentifier:
- m_FirstSelected: {fileID: 0}
- m_sendNavigationEvents: 1
- m_DragThreshold: 5
---- !u!4 &1470895134
-Transform:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- m_GameObject: {fileID: 1470895131}
- m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
- m_LocalPosition: {x: 0, y: 0, z: 0}
- m_LocalScale: {x: 1, y: 1, z: 1}
- m_Children: []
- m_Father: {fileID: 0}
- m_RootOrder: 2
- m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
---- !u!1 &1766020810
-GameObject:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- serializedVersion: 5
- m_Component:
- - component: {fileID: 1766020814}
- - component: {fileID: 1766020813}
- - component: {fileID: 1766020812}
- - component: {fileID: 1766020811}
- m_Layer: 5
- m_Name: Canvas
- m_TagString: Untagged
- m_Icon: {fileID: 0}
- m_NavMeshLayer: 0
- m_StaticEditorFlags: 0
- m_IsActive: 1
---- !u!114 &1766020811
-MonoBehaviour:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- m_GameObject: {fileID: 1766020810}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 1301386320, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
- m_Name:
- m_EditorClassIdentifier:
- m_IgnoreReversedGraphics: 1
- m_BlockingObjects: 0
- m_BlockingMask:
- serializedVersion: 2
- m_Bits: 4294967295
---- !u!114 &1766020812
-MonoBehaviour:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- m_GameObject: {fileID: 1766020810}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 1980459831, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
- m_Name:
- m_EditorClassIdentifier:
- m_UiScaleMode: 0
- m_ReferencePixelsPerUnit: 100
- m_ScaleFactor: 1
- m_ReferenceResolution: {x: 800, y: 600}
- m_ScreenMatchMode: 0
- m_MatchWidthOrHeight: 0
- m_PhysicalUnit: 3
- m_FallbackScreenDPI: 96
- m_DefaultSpriteDPI: 96
- m_DynamicPixelsPerUnit: 1
---- !u!223 &1766020813
-Canvas:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- m_GameObject: {fileID: 1766020810}
- m_Enabled: 1
- serializedVersion: 3
- m_RenderMode: 0
- m_Camera: {fileID: 0}
- m_PlaneDistance: 100
- m_PixelPerfect: 0
- m_ReceivesEvents: 1
- m_OverrideSorting: 0
- m_OverridePixelPerfect: 0
- m_SortingBucketNormalizedSize: 0
- m_AdditionalShaderChannelsFlag: 0
- m_SortingLayerID: 0
- m_SortingOrder: 0
- m_TargetDisplay: 0
---- !u!224 &1766020814
-RectTransform:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- m_GameObject: {fileID: 1766020810}
- m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
- m_LocalPosition: {x: 0, y: 0, z: 0}
- m_LocalScale: {x: 0, y: 0, z: 0}
- m_Children:
- - {fileID: 1032248339}
- - {fileID: 657463238}
- - {fileID: 806911717}
- - {fileID: 1858885002}
- - {fileID: 1238162987}
- m_Father: {fileID: 0}
- m_RootOrder: 1
- m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
- m_AnchorMin: {x: 0, y: 0}
- m_AnchorMax: {x: 0, y: 0}
- m_AnchoredPosition: {x: 0, y: 0}
- m_SizeDelta: {x: 0, y: 0}
- m_Pivot: {x: 0, y: 0}
---- !u!1 &1858885001
-GameObject:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- serializedVersion: 5
- m_Component:
- - component: {fileID: 1858885002}
- - component: {fileID: 1858885005}
- - component: {fileID: 1858885004}
- - component: {fileID: 1858885003}
- m_Layer: 5
- m_Name: ButtonRespondNo
- m_TagString: Untagged
- m_Icon: {fileID: 0}
- m_NavMeshLayer: 0
- m_StaticEditorFlags: 0
- m_IsActive: 1
---- !u!224 &1858885002
-RectTransform:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- m_GameObject: {fileID: 1858885001}
- m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
- m_LocalPosition: {x: 0, y: 0, z: 0}
- m_LocalScale: {x: 1, y: 1, z: 1}
- m_Children:
- - {fileID: 1958982062}
- m_Father: {fileID: 1766020814}
- m_RootOrder: 3
- m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
- m_AnchorMin: {x: 0.5, y: 0.5}
- m_AnchorMax: {x: 0.5, y: 0.5}
- m_AnchoredPosition: {x: 128.7, y: -116.3}
- m_SizeDelta: {x: 160, y: 30}
- m_Pivot: {x: 0.5, y: 0.5}
---- !u!114 &1858885003
-MonoBehaviour:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- m_GameObject: {fileID: 1858885001}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
- m_Name:
- m_EditorClassIdentifier:
- m_Navigation:
- m_Mode: 3
- m_SelectOnUp: {fileID: 0}
- m_SelectOnDown: {fileID: 0}
- m_SelectOnLeft: {fileID: 0}
- m_SelectOnRight: {fileID: 0}
- m_Transition: 1
- m_Colors:
- m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
- m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
- m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
- m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
- m_ColorMultiplier: 1
- m_FadeDuration: 0.1
- m_SpriteState:
- m_HighlightedSprite: {fileID: 0}
- m_PressedSprite: {fileID: 0}
- m_DisabledSprite: {fileID: 0}
- m_AnimationTriggers:
- m_NormalTrigger: Normal
- m_HighlightedTrigger: Highlighted
- m_PressedTrigger: Pressed
- m_DisabledTrigger: Disabled
- m_Interactable: 0
- m_TargetGraphic: {fileID: 1858885004}
- m_OnClick:
- m_PersistentCalls:
- m_Calls:
- - m_Target: {fileID: 1929635629}
- m_MethodName: RequestRespondNo
- m_Mode: 1
- m_Arguments:
- m_ObjectArgument: {fileID: 0}
- m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
- m_IntArgument: 0
- m_FloatArgument: 0
- m_StringArgument:
- m_BoolArgument: 0
- m_CallState: 2
- m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0,
- Culture=neutral, PublicKeyToken=null
---- !u!114 &1858885004
-MonoBehaviour:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- m_GameObject: {fileID: 1858885001}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
- m_Name:
- m_EditorClassIdentifier:
- m_Material: {fileID: 0}
- m_Color: {r: 1, g: 1, b: 1, a: 1}
- m_RaycastTarget: 1
- m_OnCullStateChanged:
- m_PersistentCalls:
- m_Calls: []
- m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
- Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
- m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
- m_Type: 1
- m_PreserveAspect: 0
- m_FillCenter: 1
- m_FillMethod: 4
- m_FillAmount: 1
- m_FillClockwise: 1
- m_FillOrigin: 0
---- !u!222 &1858885005
-CanvasRenderer:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- m_GameObject: {fileID: 1858885001}
---- !u!1 &1929635628
-GameObject:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- serializedVersion: 5
- m_Component:
- - component: {fileID: 1929635630}
- - component: {fileID: 1929635629}
- m_Layer: 0
- m_Name: Discord
- m_TagString: Untagged
- m_Icon: {fileID: 0}
- m_NavMeshLayer: 0
- m_StaticEditorFlags: 0
- m_IsActive: 1
---- !u!114 &1929635629
-MonoBehaviour:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- m_GameObject: {fileID: 1929635628}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 11500000, guid: 27f0a5f59ffffa84c86547736e2e730a, type: 3}
- m_Name:
- m_EditorClassIdentifier:
- presence:
- state: Button clicking
- details: Best game ever
- startTimestamp: 0
- endTimestamp: 0
- largeImageKey: stable-large
- largeImageText:
- smallImageKey: canary-small
- smallImageText:
- partyId: abcdefg
- partySize: 1
- partyMax: 10
- matchSecret: match_secret
- joinSecret: join_secret
- spectateSecret: spectate_secret
- instance: 1
- applicationId: 345229890980937739
- optionalSteamId:
- callbackCalls: 0
- clickCounter: 0
- joinRequest:
- userId:
- username:
- discriminator:
- avatar:
- onConnect:
- m_PersistentCalls:
- m_Calls:
- - m_Target: {fileID: 657463236}
- m_MethodName: set_text
- m_Mode: 5
- m_Arguments:
- m_ObjectArgument: {fileID: 0}
- m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
- m_IntArgument: 0
- m_FloatArgument: 0
- m_StringArgument: Discord Connected
- m_BoolArgument: 1
- m_CallState: 2
- m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine, Version=0.0.0.0, Culture=neutral,
- PublicKeyToken=null
- onDisconnect:
- m_PersistentCalls:
- m_Calls:
- - m_Target: {fileID: 657463236}
- m_MethodName: set_text
- m_Mode: 5
- m_Arguments:
- m_ObjectArgument: {fileID: 0}
- m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
- m_IntArgument: 0
- m_FloatArgument: 0
- m_StringArgument: Discord Disconnected
- m_BoolArgument: 0
- m_CallState: 2
- m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine, Version=0.0.0.0, Culture=neutral,
- PublicKeyToken=null
- hasResponded:
- m_PersistentCalls:
- m_Calls:
- - m_Target: {fileID: 1238162988}
- m_MethodName: set_text
- m_Mode: 5
- m_Arguments:
- m_ObjectArgument: {fileID: 0}
- m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
- m_IntArgument: 0
- m_FloatArgument: 0
- m_StringArgument: No requests yet
- m_BoolArgument: 0
- m_CallState: 2
- - m_Target: {fileID: 806911718}
- m_MethodName: set_interactable
- m_Mode: 6
- m_Arguments:
- m_ObjectArgument: {fileID: 0}
- m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
- m_IntArgument: 0
- m_FloatArgument: 0
- m_StringArgument:
- m_BoolArgument: 0
- m_CallState: 2
- - m_Target: {fileID: 1858885003}
- m_MethodName: set_interactable
- m_Mode: 6
- m_Arguments:
- m_ObjectArgument: {fileID: 0}
- m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
- m_IntArgument: 0
- m_FloatArgument: 0
- m_StringArgument:
- m_BoolArgument: 0
- m_CallState: 2
- m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine, Version=0.0.0.0, Culture=neutral,
- PublicKeyToken=null
- onJoin:
- m_PersistentCalls:
- m_Calls: []
- m_TypeName: DiscordJoinEvent, Assembly-CSharp, Version=0.0.0.0, Culture=neutral,
- PublicKeyToken=null
- onSpectate:
- m_PersistentCalls:
- m_Calls: []
- m_TypeName: DiscordJoinEvent, Assembly-CSharp, Version=0.0.0.0, Culture=neutral,
- PublicKeyToken=null
- onJoinRequest:
- m_PersistentCalls:
- m_Calls:
- - m_Target: {fileID: 1238162988}
- m_MethodName: set_text
- m_Mode: 5
- m_Arguments:
- m_ObjectArgument: {fileID: 0}
- m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
- m_IntArgument: 0
- m_FloatArgument: 0
- m_StringArgument: Someone asked to join!
- m_BoolArgument: 0
- m_CallState: 2
- - m_Target: {fileID: 806911718}
- m_MethodName: set_interactable
- m_Mode: 6
- m_Arguments:
- m_ObjectArgument: {fileID: 0}
- m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
- m_IntArgument: 0
- m_FloatArgument: 0
- m_StringArgument:
- m_BoolArgument: 1
- m_CallState: 2
- - m_Target: {fileID: 1858885003}
- m_MethodName: set_interactable
- m_Mode: 6
- m_Arguments:
- m_ObjectArgument: {fileID: 0}
- m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
- m_IntArgument: 0
- m_FloatArgument: 0
- m_StringArgument:
- m_BoolArgument: 1
- m_CallState: 2
- m_TypeName: DiscordJoinRequestEvent, Assembly-CSharp, Version=0.0.0.0, Culture=neutral,
- PublicKeyToken=null
---- !u!4 &1929635630
-Transform:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- m_GameObject: {fileID: 1929635628}
- m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
- m_LocalPosition: {x: 0, y: 0, z: 0}
- m_LocalScale: {x: 1, y: 1, z: 1}
- m_Children: []
- m_Father: {fileID: 0}
- m_RootOrder: 3
- m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
---- !u!1 &1958982061
-GameObject:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- serializedVersion: 5
- m_Component:
- - component: {fileID: 1958982062}
- - component: {fileID: 1958982064}
- - component: {fileID: 1958982063}
- m_Layer: 5
- m_Name: Text
- m_TagString: Untagged
- m_Icon: {fileID: 0}
- m_NavMeshLayer: 0
- m_StaticEditorFlags: 0
- m_IsActive: 1
---- !u!224 &1958982062
-RectTransform:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- m_GameObject: {fileID: 1958982061}
- m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
- m_LocalPosition: {x: 0, y: 0, z: 0}
- m_LocalScale: {x: 1, y: 1, z: 1}
- m_Children: []
- m_Father: {fileID: 1858885002}
- m_RootOrder: 0
- m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
- m_AnchorMin: {x: 0, y: 0}
- m_AnchorMax: {x: 1, y: 1}
- m_AnchoredPosition: {x: 0, y: 0}
- m_SizeDelta: {x: 0, y: 0}
- m_Pivot: {x: 0.5, y: 0.5}
---- !u!114 &1958982063
-MonoBehaviour:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- m_GameObject: {fileID: 1958982061}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
- m_Name:
- m_EditorClassIdentifier:
- m_Material: {fileID: 0}
- m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
- m_RaycastTarget: 1
- m_OnCullStateChanged:
- m_PersistentCalls:
- m_Calls: []
- m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
- Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
- m_FontData:
- m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
- m_FontSize: 14
- m_FontStyle: 0
- m_BestFit: 0
- m_MinSize: 10
- m_MaxSize: 40
- m_Alignment: 4
- m_AlignByGeometry: 0
- m_RichText: 1
- m_HorizontalOverflow: 0
- m_VerticalOverflow: 0
- m_LineSpacing: 1
- m_Text: No
---- !u!222 &1958982064
-CanvasRenderer:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- m_GameObject: {fileID: 1958982061}
diff --git a/deps/discord-rpc/examples/button-clicker/Assets/main.unity.meta b/deps/discord-rpc/examples/button-clicker/Assets/main.unity.meta
deleted file mode 100644
index 75654f195f..0000000000
--- a/deps/discord-rpc/examples/button-clicker/Assets/main.unity.meta
+++ /dev/null
@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: 3b03d21bb25fa494e8694cd6e4b6d769
-timeCreated: 1501696924
-licenseType: Free
-DefaultImporter:
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/deps/discord-rpc/examples/button-clicker/ProjectSettings/AudioManager.asset b/deps/discord-rpc/examples/button-clicker/ProjectSettings/AudioManager.asset
deleted file mode 100644
index da6112576a..0000000000
--- a/deps/discord-rpc/examples/button-clicker/ProjectSettings/AudioManager.asset
+++ /dev/null
@@ -1,17 +0,0 @@
-%YAML 1.1
-%TAG !u! tag:unity3d.com,2011:
---- !u!11 &1
-AudioManager:
- m_ObjectHideFlags: 0
- m_Volume: 1
- Rolloff Scale: 1
- Doppler Factor: 1
- Default Speaker Mode: 2
- m_SampleRate: 0
- m_DSPBufferSize: 0
- m_VirtualVoiceCount: 512
- m_RealVoiceCount: 32
- m_SpatializerPlugin:
- m_AmbisonicDecoderPlugin:
- m_DisableAudio: 0
- m_VirtualizeEffects: 1
diff --git a/deps/discord-rpc/examples/button-clicker/ProjectSettings/ClusterInputManager.asset b/deps/discord-rpc/examples/button-clicker/ProjectSettings/ClusterInputManager.asset
deleted file mode 100644
index e7886b266a..0000000000
--- a/deps/discord-rpc/examples/button-clicker/ProjectSettings/ClusterInputManager.asset
+++ /dev/null
@@ -1,6 +0,0 @@
-%YAML 1.1
-%TAG !u! tag:unity3d.com,2011:
---- !u!236 &1
-ClusterInputManager:
- m_ObjectHideFlags: 0
- m_Inputs: []
diff --git a/deps/discord-rpc/examples/button-clicker/ProjectSettings/DynamicsManager.asset b/deps/discord-rpc/examples/button-clicker/ProjectSettings/DynamicsManager.asset
deleted file mode 100644
index 0be3d787c2..0000000000
--- a/deps/discord-rpc/examples/button-clicker/ProjectSettings/DynamicsManager.asset
+++ /dev/null
@@ -1,20 +0,0 @@
-%YAML 1.1
-%TAG !u! tag:unity3d.com,2011:
---- !u!55 &1
-PhysicsManager:
- m_ObjectHideFlags: 0
- serializedVersion: 3
- m_Gravity: {x: 0, y: -9.81, z: 0}
- m_DefaultMaterial: {fileID: 0}
- m_BounceThreshold: 2
- m_SleepThreshold: 0.005
- m_DefaultContactOffset: 0.01
- m_DefaultSolverIterations: 6
- m_DefaultSolverVelocityIterations: 1
- m_QueriesHitBackfaces: 0
- m_QueriesHitTriggers: 1
- m_EnableAdaptiveForce: 0
- m_EnablePCM: 1
- m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
- m_AutoSimulation: 1
- m_AutoSyncTransforms: 1
diff --git a/deps/discord-rpc/examples/button-clicker/ProjectSettings/EditorBuildSettings.asset b/deps/discord-rpc/examples/button-clicker/ProjectSettings/EditorBuildSettings.asset
deleted file mode 100644
index d8fda84837..0000000000
--- a/deps/discord-rpc/examples/button-clicker/ProjectSettings/EditorBuildSettings.asset
+++ /dev/null
@@ -1,10 +0,0 @@
-%YAML 1.1
-%TAG !u! tag:unity3d.com,2011:
---- !u!1045 &1
-EditorBuildSettings:
- m_ObjectHideFlags: 0
- serializedVersion: 2
- m_Scenes:
- - enabled: 1
- path: Assets/main.unity
- guid: 3b03d21bb25fa494e8694cd6e4b6d769
diff --git a/deps/discord-rpc/examples/button-clicker/ProjectSettings/EditorSettings.asset b/deps/discord-rpc/examples/button-clicker/ProjectSettings/EditorSettings.asset
deleted file mode 100644
index c0c814fdf9..0000000000
--- a/deps/discord-rpc/examples/button-clicker/ProjectSettings/EditorSettings.asset
+++ /dev/null
@@ -1,16 +0,0 @@
-%YAML 1.1
-%TAG !u! tag:unity3d.com,2011:
---- !u!159 &1
-EditorSettings:
- m_ObjectHideFlags: 0
- serializedVersion: 4
- m_ExternalVersionControlSupport: Visible Meta Files
- m_SerializationMode: 2
- m_DefaultBehaviorMode: 1
- m_SpritePackerMode: 4
- m_SpritePackerPaddingPower: 1
- m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd
- m_ProjectGenerationRootNamespace:
- m_UserGeneratedProjectSuffix:
- m_CollabEditorSettings:
- inProgressEnabled: 1
diff --git a/deps/discord-rpc/examples/button-clicker/ProjectSettings/GraphicsSettings.asset b/deps/discord-rpc/examples/button-clicker/ProjectSettings/GraphicsSettings.asset
deleted file mode 100644
index 74d7b532b0..0000000000
--- a/deps/discord-rpc/examples/button-clicker/ProjectSettings/GraphicsSettings.asset
+++ /dev/null
@@ -1,61 +0,0 @@
-%YAML 1.1
-%TAG !u! tag:unity3d.com,2011:
---- !u!30 &1
-GraphicsSettings:
- m_ObjectHideFlags: 0
- serializedVersion: 12
- m_Deferred:
- m_Mode: 1
- m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0}
- m_DeferredReflections:
- m_Mode: 1
- m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0}
- m_ScreenSpaceShadows:
- m_Mode: 1
- m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0}
- m_LegacyDeferred:
- m_Mode: 1
- m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0}
- m_DepthNormals:
- m_Mode: 1
- m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0}
- m_MotionVectors:
- m_Mode: 1
- m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0}
- m_LightHalo:
- m_Mode: 1
- m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0}
- m_LensFlare:
- m_Mode: 1
- m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0}
- m_AlwaysIncludedShaders:
- - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0}
- - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0}
- - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0}
- - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0}
- - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0}
- - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0}
- m_PreloadedShaders: []
- m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000,
- type: 0}
- m_CustomRenderPipeline: {fileID: 0}
- m_TransparencySortMode: 0
- m_TransparencySortAxis: {x: 0, y: 0, z: 1}
- m_DefaultRenderingPath: 1
- m_DefaultMobileRenderingPath: 1
- m_TierSettings: []
- m_LightmapStripping: 0
- m_FogStripping: 0
- m_InstancingStripping: 0
- m_LightmapKeepPlain: 1
- m_LightmapKeepDirCombined: 1
- m_LightmapKeepDynamicPlain: 1
- m_LightmapKeepDynamicDirCombined: 1
- m_LightmapKeepShadowMask: 1
- m_LightmapKeepSubtractive: 1
- m_FogKeepLinear: 1
- m_FogKeepExp: 1
- m_FogKeepExp2: 1
- m_AlbedoSwatchInfos: []
- m_LightsUseLinearIntensity: 0
- m_LightsUseColorTemperature: 0
diff --git a/deps/discord-rpc/examples/button-clicker/ProjectSettings/InputManager.asset b/deps/discord-rpc/examples/button-clicker/ProjectSettings/InputManager.asset
deleted file mode 100644
index 17c8f538e2..0000000000
--- a/deps/discord-rpc/examples/button-clicker/ProjectSettings/InputManager.asset
+++ /dev/null
@@ -1,295 +0,0 @@
-%YAML 1.1
-%TAG !u! tag:unity3d.com,2011:
---- !u!13 &1
-InputManager:
- m_ObjectHideFlags: 0
- serializedVersion: 2
- m_Axes:
- - serializedVersion: 3
- m_Name: Horizontal
- descriptiveName:
- descriptiveNegativeName:
- negativeButton: left
- positiveButton: right
- altNegativeButton: a
- altPositiveButton: d
- gravity: 3
- dead: 0.001
- sensitivity: 3
- snap: 1
- invert: 0
- type: 0
- axis: 0
- joyNum: 0
- - serializedVersion: 3
- m_Name: Vertical
- descriptiveName:
- descriptiveNegativeName:
- negativeButton: down
- positiveButton: up
- altNegativeButton: s
- altPositiveButton: w
- gravity: 3
- dead: 0.001
- sensitivity: 3
- snap: 1
- invert: 0
- type: 0
- axis: 0
- joyNum: 0
- - serializedVersion: 3
- m_Name: Fire1
- descriptiveName:
- descriptiveNegativeName:
- negativeButton:
- positiveButton: left ctrl
- altNegativeButton:
- altPositiveButton: mouse 0
- gravity: 1000
- dead: 0.001
- sensitivity: 1000
- snap: 0
- invert: 0
- type: 0
- axis: 0
- joyNum: 0
- - serializedVersion: 3
- m_Name: Fire2
- descriptiveName:
- descriptiveNegativeName:
- negativeButton:
- positiveButton: left alt
- altNegativeButton:
- altPositiveButton: mouse 1
- gravity: 1000
- dead: 0.001
- sensitivity: 1000
- snap: 0
- invert: 0
- type: 0
- axis: 0
- joyNum: 0
- - serializedVersion: 3
- m_Name: Fire3
- descriptiveName:
- descriptiveNegativeName:
- negativeButton:
- positiveButton: left shift
- altNegativeButton:
- altPositiveButton: mouse 2
- gravity: 1000
- dead: 0.001
- sensitivity: 1000
- snap: 0
- invert: 0
- type: 0
- axis: 0
- joyNum: 0
- - serializedVersion: 3
- m_Name: Jump
- descriptiveName:
- descriptiveNegativeName:
- negativeButton:
- positiveButton: space
- altNegativeButton:
- altPositiveButton:
- gravity: 1000
- dead: 0.001
- sensitivity: 1000
- snap: 0
- invert: 0
- type: 0
- axis: 0
- joyNum: 0
- - serializedVersion: 3
- m_Name: Mouse X
- descriptiveName:
- descriptiveNegativeName:
- negativeButton:
- positiveButton:
- altNegativeButton:
- altPositiveButton:
- gravity: 0
- dead: 0
- sensitivity: 0.1
- snap: 0
- invert: 0
- type: 1
- axis: 0
- joyNum: 0
- - serializedVersion: 3
- m_Name: Mouse Y
- descriptiveName:
- descriptiveNegativeName:
- negativeButton:
- positiveButton:
- altNegativeButton:
- altPositiveButton:
- gravity: 0
- dead: 0
- sensitivity: 0.1
- snap: 0
- invert: 0
- type: 1
- axis: 1
- joyNum: 0
- - serializedVersion: 3
- m_Name: Mouse ScrollWheel
- descriptiveName:
- descriptiveNegativeName:
- negativeButton:
- positiveButton:
- altNegativeButton:
- altPositiveButton:
- gravity: 0
- dead: 0
- sensitivity: 0.1
- snap: 0
- invert: 0
- type: 1
- axis: 2
- joyNum: 0
- - serializedVersion: 3
- m_Name: Horizontal
- descriptiveName:
- descriptiveNegativeName:
- negativeButton:
- positiveButton:
- altNegativeButton:
- altPositiveButton:
- gravity: 0
- dead: 0.19
- sensitivity: 1
- snap: 0
- invert: 0
- type: 2
- axis: 0
- joyNum: 0
- - serializedVersion: 3
- m_Name: Vertical
- descriptiveName:
- descriptiveNegativeName:
- negativeButton:
- positiveButton:
- altNegativeButton:
- altPositiveButton:
- gravity: 0
- dead: 0.19
- sensitivity: 1
- snap: 0
- invert: 1
- type: 2
- axis: 1
- joyNum: 0
- - serializedVersion: 3
- m_Name: Fire1
- descriptiveName:
- descriptiveNegativeName:
- negativeButton:
- positiveButton: joystick button 0
- altNegativeButton:
- altPositiveButton:
- gravity: 1000
- dead: 0.001
- sensitivity: 1000
- snap: 0
- invert: 0
- type: 0
- axis: 0
- joyNum: 0
- - serializedVersion: 3
- m_Name: Fire2
- descriptiveName:
- descriptiveNegativeName:
- negativeButton:
- positiveButton: joystick button 1
- altNegativeButton:
- altPositiveButton:
- gravity: 1000
- dead: 0.001
- sensitivity: 1000
- snap: 0
- invert: 0
- type: 0
- axis: 0
- joyNum: 0
- - serializedVersion: 3
- m_Name: Fire3
- descriptiveName:
- descriptiveNegativeName:
- negativeButton:
- positiveButton: joystick button 2
- altNegativeButton:
- altPositiveButton:
- gravity: 1000
- dead: 0.001
- sensitivity: 1000
- snap: 0
- invert: 0
- type: 0
- axis: 0
- joyNum: 0
- - serializedVersion: 3
- m_Name: Jump
- descriptiveName:
- descriptiveNegativeName:
- negativeButton:
- positiveButton: joystick button 3
- altNegativeButton:
- altPositiveButton:
- gravity: 1000
- dead: 0.001
- sensitivity: 1000
- snap: 0
- invert: 0
- type: 0
- axis: 0
- joyNum: 0
- - serializedVersion: 3
- m_Name: Submit
- descriptiveName:
- descriptiveNegativeName:
- negativeButton:
- positiveButton: return
- altNegativeButton:
- altPositiveButton: joystick button 0
- gravity: 1000
- dead: 0.001
- sensitivity: 1000
- snap: 0
- invert: 0
- type: 0
- axis: 0
- joyNum: 0
- - serializedVersion: 3
- m_Name: Submit
- descriptiveName:
- descriptiveNegativeName:
- negativeButton:
- positiveButton: enter
- altNegativeButton:
- altPositiveButton: space
- gravity: 1000
- dead: 0.001
- sensitivity: 1000
- snap: 0
- invert: 0
- type: 0
- axis: 0
- joyNum: 0
- - serializedVersion: 3
- m_Name: Cancel
- descriptiveName:
- descriptiveNegativeName:
- negativeButton:
- positiveButton: escape
- altNegativeButton:
- altPositiveButton: joystick button 1
- gravity: 1000
- dead: 0.001
- sensitivity: 1000
- snap: 0
- invert: 0
- type: 0
- axis: 0
- joyNum: 0
diff --git a/deps/discord-rpc/examples/button-clicker/ProjectSettings/NavMeshAreas.asset b/deps/discord-rpc/examples/button-clicker/ProjectSettings/NavMeshAreas.asset
deleted file mode 100644
index 6dd520f63a..0000000000
--- a/deps/discord-rpc/examples/button-clicker/ProjectSettings/NavMeshAreas.asset
+++ /dev/null
@@ -1,89 +0,0 @@
-%YAML 1.1
-%TAG !u! tag:unity3d.com,2011:
---- !u!126 &1
-NavMeshProjectSettings:
- m_ObjectHideFlags: 0
- serializedVersion: 2
- areas:
- - name: Walkable
- cost: 1
- - name: Not Walkable
- cost: 1
- - name: Jump
- cost: 2
- - name:
- cost: 1
- - name:
- cost: 1
- - name:
- cost: 1
- - name:
- cost: 1
- - name:
- cost: 1
- - name:
- cost: 1
- - name:
- cost: 1
- - name:
- cost: 1
- - name:
- cost: 1
- - name:
- cost: 1
- - name:
- cost: 1
- - name:
- cost: 1
- - name:
- cost: 1
- - name:
- cost: 1
- - name:
- cost: 1
- - name:
- cost: 1
- - name:
- cost: 1
- - name:
- cost: 1
- - name:
- cost: 1
- - name:
- cost: 1
- - name:
- cost: 1
- - name:
- cost: 1
- - name:
- cost: 1
- - name:
- cost: 1
- - name:
- cost: 1
- - name:
- cost: 1
- - name:
- cost: 1
- - name:
- cost: 1
- - name:
- cost: 1
- m_LastAgentTypeID: -887442657
- m_Settings:
- - serializedVersion: 2
- agentTypeID: 0
- agentRadius: 0.5
- agentHeight: 2
- agentSlope: 45
- agentClimb: 0.75
- ledgeDropHeight: 0
- maxJumpAcrossDistance: 0
- minRegionArea: 2
- manualCellSize: 0
- cellSize: 0.16666667
- manualTileSize: 0
- tileSize: 256
- accuratePlacement: 0
- m_SettingNames:
- - Humanoid
diff --git a/deps/discord-rpc/examples/button-clicker/ProjectSettings/NetworkManager.asset b/deps/discord-rpc/examples/button-clicker/ProjectSettings/NetworkManager.asset
deleted file mode 100644
index 5dc6a831d9..0000000000
--- a/deps/discord-rpc/examples/button-clicker/ProjectSettings/NetworkManager.asset
+++ /dev/null
@@ -1,8 +0,0 @@
-%YAML 1.1
-%TAG !u! tag:unity3d.com,2011:
---- !u!149 &1
-NetworkManager:
- m_ObjectHideFlags: 0
- m_DebugLevel: 0
- m_Sendrate: 15
- m_AssetToPrefab: {}
diff --git a/deps/discord-rpc/examples/button-clicker/ProjectSettings/Physics2DSettings.asset b/deps/discord-rpc/examples/button-clicker/ProjectSettings/Physics2DSettings.asset
deleted file mode 100644
index 132ee6bc86..0000000000
--- a/deps/discord-rpc/examples/button-clicker/ProjectSettings/Physics2DSettings.asset
+++ /dev/null
@@ -1,37 +0,0 @@
-%YAML 1.1
-%TAG !u! tag:unity3d.com,2011:
---- !u!19 &1
-Physics2DSettings:
- m_ObjectHideFlags: 0
- serializedVersion: 3
- m_Gravity: {x: 0, y: -9.81}
- m_DefaultMaterial: {fileID: 0}
- m_VelocityIterations: 8
- m_PositionIterations: 3
- m_VelocityThreshold: 1
- m_MaxLinearCorrection: 0.2
- m_MaxAngularCorrection: 8
- m_MaxTranslationSpeed: 100
- m_MaxRotationSpeed: 360
- m_BaumgarteScale: 0.2
- m_BaumgarteTimeOfImpactScale: 0.75
- m_TimeToSleep: 0.5
- m_LinearSleepTolerance: 0.01
- m_AngularSleepTolerance: 2
- m_DefaultContactOffset: 0.01
- m_AutoSimulation: 1
- m_QueriesHitTriggers: 1
- m_QueriesStartInColliders: 1
- m_ChangeStopsCallbacks: 0
- m_CallbacksOnDisable: 1
- m_AutoSyncTransforms: 1
- m_AlwaysShowColliders: 0
- m_ShowColliderSleep: 1
- m_ShowColliderContacts: 0
- m_ShowColliderAABB: 0
- m_ContactArrowScale: 0.2
- m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412}
- m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432}
- m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745}
- m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804}
- m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
diff --git a/deps/discord-rpc/examples/button-clicker/ProjectSettings/ProjectSettings.asset b/deps/discord-rpc/examples/button-clicker/ProjectSettings/ProjectSettings.asset
deleted file mode 100644
index f60fe83aa9..0000000000
--- a/deps/discord-rpc/examples/button-clicker/ProjectSettings/ProjectSettings.asset
+++ /dev/null
@@ -1,610 +0,0 @@
-%YAML 1.1
-%TAG !u! tag:unity3d.com,2011:
---- !u!129 &1
-PlayerSettings:
- m_ObjectHideFlags: 0
- serializedVersion: 13
- productGUID: 5eccc60d3e382a346a65f512d6b81b84
- AndroidProfiler: 0
- AndroidFilterTouchesWhenObscured: 0
- defaultScreenOrientation: 4
- targetDevice: 2
- useOnDemandResources: 0
- accelerometerFrequency: 60
- companyName: Discord Inc.
- productName: button-clicker
- defaultCursor: {fileID: 0}
- cursorHotspot: {x: 0, y: 0}
- m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1}
- m_ShowUnitySplashScreen: 1
- m_ShowUnitySplashLogo: 1
- m_SplashScreenOverlayOpacity: 1
- m_SplashScreenAnimation: 1
- m_SplashScreenLogoStyle: 1
- m_SplashScreenDrawMode: 0
- m_SplashScreenBackgroundAnimationZoom: 1
- m_SplashScreenLogoAnimationZoom: 1
- m_SplashScreenBackgroundLandscapeAspect: 1
- m_SplashScreenBackgroundPortraitAspect: 1
- m_SplashScreenBackgroundLandscapeUvs:
- serializedVersion: 2
- x: 0
- y: 0
- width: 1
- height: 1
- m_SplashScreenBackgroundPortraitUvs:
- serializedVersion: 2
- x: 0
- y: 0
- width: 1
- height: 1
- m_SplashScreenLogos: []
- m_VirtualRealitySplashScreen: {fileID: 0}
- m_HolographicTrackingLossScreen: {fileID: 0}
- defaultScreenWidth: 1024
- defaultScreenHeight: 768
- defaultScreenWidthWeb: 960
- defaultScreenHeightWeb: 600
- m_StereoRenderingPath: 0
- m_ActiveColorSpace: 0
- m_MTRendering: 1
- m_StackTraceTypes: 010000000100000001000000010000000100000001000000
- iosShowActivityIndicatorOnLoading: -1
- androidShowActivityIndicatorOnLoading: -1
- tizenShowActivityIndicatorOnLoading: -1
- iosAppInBackgroundBehavior: 0
- displayResolutionDialog: 1
- iosAllowHTTPDownload: 1
- allowedAutorotateToPortrait: 1
- allowedAutorotateToPortraitUpsideDown: 1
- allowedAutorotateToLandscapeRight: 1
- allowedAutorotateToLandscapeLeft: 1
- useOSAutorotation: 1
- use32BitDisplayBuffer: 1
- disableDepthAndStencilBuffers: 0
- androidBlitType: 0
- defaultIsFullScreen: 1
- defaultIsNativeResolution: 1
- macRetinaSupport: 1
- runInBackground: 0
- captureSingleScreen: 0
- muteOtherAudioSources: 0
- Prepare IOS For Recording: 0
- Force IOS Speakers When Recording: 0
- submitAnalytics: 1
- usePlayerLog: 1
- bakeCollisionMeshes: 0
- forceSingleInstance: 0
- resizableWindow: 0
- useMacAppStoreValidation: 0
- macAppStoreCategory: public.app-category.games
- gpuSkinning: 0
- graphicsJobs: 0
- xboxPIXTextureCapture: 0
- xboxEnableAvatar: 0
- xboxEnableKinect: 0
- xboxEnableKinectAutoTracking: 0
- xboxEnableFitness: 0
- visibleInBackground: 1
- allowFullscreenSwitch: 1
- graphicsJobMode: 0
- macFullscreenMode: 2
- d3d9FullscreenMode: 1
- d3d11FullscreenMode: 1
- xboxSpeechDB: 0
- xboxEnableHeadOrientation: 0
- xboxEnableGuest: 0
- xboxEnablePIXSampling: 0
- metalFramebufferOnly: 0
- n3dsDisableStereoscopicView: 0
- n3dsEnableSharedListOpt: 1
- n3dsEnableVSync: 0
- ignoreAlphaClear: 0
- xboxOneResolution: 0
- xboxOneMonoLoggingLevel: 0
- xboxOneLoggingLevel: 1
- xboxOneDisableEsram: 0
- xboxOnePresentImmediateThreshold: 0
- videoMemoryForVertexBuffers: 0
- psp2PowerMode: 0
- psp2AcquireBGM: 1
- wiiUTVResolution: 0
- wiiUGamePadMSAA: 1
- wiiUSupportsNunchuk: 0
- wiiUSupportsClassicController: 0
- wiiUSupportsBalanceBoard: 0
- wiiUSupportsMotionPlus: 0
- wiiUSupportsProController: 0
- wiiUAllowScreenCapture: 1
- wiiUControllerCount: 0
- m_SupportedAspectRatios:
- 4:3: 1
- 5:4: 1
- 16:10: 1
- 16:9: 1
- Others: 1
- bundleVersion: 1.0
- preloadedAssets: []
- metroInputSource: 0
- m_HolographicPauseOnTrackingLoss: 1
- xboxOneDisableKinectGpuReservation: 0
- xboxOneEnable7thCore: 0
- vrSettings:
- cardboard:
- depthFormat: 0
- enableTransitionView: 0
- daydream:
- depthFormat: 0
- useSustainedPerformanceMode: 0
- enableVideoLayer: 0
- useProtectedVideoMemory: 0
- hololens:
- depthFormat: 1
- protectGraphicsMemory: 0
- useHDRDisplay: 0
- m_ColorGamuts: 00000000
- targetPixelDensity: 0
- resolutionScalingMode: 0
- androidSupportedAspectRatio: 1
- androidMaxAspectRatio: 2.1
- applicationIdentifier: {}
- buildNumber: {}
- AndroidBundleVersionCode: 1
- AndroidMinSdkVersion: 16
- AndroidTargetSdkVersion: 0
- AndroidPreferredInstallLocation: 1
- aotOptions:
- stripEngineCode: 1
- iPhoneStrippingLevel: 0
- iPhoneScriptCallOptimization: 0
- ForceInternetPermission: 0
- ForceSDCardPermission: 0
- CreateWallpaper: 0
- APKExpansionFiles: 0
- keepLoadedShadersAlive: 0
- StripUnusedMeshComponents: 0
- VertexChannelCompressionMask:
- serializedVersion: 2
- m_Bits: 238
- iPhoneSdkVersion: 988
- iOSTargetOSVersionString: 7.0
- tvOSSdkVersion: 0
- tvOSRequireExtendedGameController: 0
- tvOSTargetOSVersionString: 9.0
- uIPrerenderedIcon: 0
- uIRequiresPersistentWiFi: 0
- uIRequiresFullScreen: 1
- uIStatusBarHidden: 1
- uIExitOnSuspend: 0
- uIStatusBarStyle: 0
- iPhoneSplashScreen: {fileID: 0}
- iPhoneHighResSplashScreen: {fileID: 0}
- iPhoneTallHighResSplashScreen: {fileID: 0}
- iPhone47inSplashScreen: {fileID: 0}
- iPhone55inPortraitSplashScreen: {fileID: 0}
- iPhone55inLandscapeSplashScreen: {fileID: 0}
- iPadPortraitSplashScreen: {fileID: 0}
- iPadHighResPortraitSplashScreen: {fileID: 0}
- iPadLandscapeSplashScreen: {fileID: 0}
- iPadHighResLandscapeSplashScreen: {fileID: 0}
- appleTVSplashScreen: {fileID: 0}
- tvOSSmallIconLayers: []
- tvOSLargeIconLayers: []
- tvOSTopShelfImageLayers: []
- tvOSTopShelfImageWideLayers: []
- iOSLaunchScreenType: 0
- iOSLaunchScreenPortrait: {fileID: 0}
- iOSLaunchScreenLandscape: {fileID: 0}
- iOSLaunchScreenBackgroundColor:
- serializedVersion: 2
- rgba: 0
- iOSLaunchScreenFillPct: 100
- iOSLaunchScreenSize: 100
- iOSLaunchScreenCustomXibPath:
- iOSLaunchScreeniPadType: 0
- iOSLaunchScreeniPadImage: {fileID: 0}
- iOSLaunchScreeniPadBackgroundColor:
- serializedVersion: 2
- rgba: 0
- iOSLaunchScreeniPadFillPct: 100
- iOSLaunchScreeniPadSize: 100
- iOSLaunchScreeniPadCustomXibPath:
- iOSDeviceRequirements: []
- iOSURLSchemes: []
- iOSBackgroundModes: 0
- iOSMetalForceHardShadows: 0
- metalEditorSupport: 1
- metalAPIValidation: 1
- iOSRenderExtraFrameOnPause: 0
- appleDeveloperTeamID:
- iOSManualSigningProvisioningProfileID:
- tvOSManualSigningProvisioningProfileID:
- appleEnableAutomaticSigning: 0
- AndroidTargetDevice: 0
- AndroidSplashScreenScale: 0
- androidSplashScreen: {fileID: 0}
- AndroidKeystoreName:
- AndroidKeyaliasName:
- AndroidTVCompatibility: 1
- AndroidIsGame: 1
- AndroidEnableTango: 0
- androidEnableBanner: 1
- androidUseLowAccuracyLocation: 0
- m_AndroidBanners:
- - width: 320
- height: 180
- banner: {fileID: 0}
- androidGamepadSupportLevel: 0
- resolutionDialogBanner: {fileID: 0}
- m_BuildTargetIcons: []
- m_BuildTargetBatching: []
- m_BuildTargetGraphicsAPIs: []
- m_BuildTargetVRSettings: []
- m_BuildTargetEnableVuforiaSettings: []
- openGLRequireES31: 0
- openGLRequireES31AEP: 0
- m_TemplateCustomTags: {}
- mobileMTRendering:
- Android: 1
- iPhone: 1
- tvOS: 1
- wiiUTitleID: 0005000011000000
- wiiUGroupID: 00010000
- wiiUCommonSaveSize: 4096
- wiiUAccountSaveSize: 2048
- wiiUOlvAccessKey: 0
- wiiUTinCode: 0
- wiiUJoinGameId: 0
- wiiUJoinGameModeMask: 0000000000000000
- wiiUCommonBossSize: 0
- wiiUAccountBossSize: 0
- wiiUAddOnUniqueIDs: []
- wiiUMainThreadStackSize: 3072
- wiiULoaderThreadStackSize: 1024
- wiiUSystemHeapSize: 128
- wiiUTVStartupScreen: {fileID: 0}
- wiiUGamePadStartupScreen: {fileID: 0}
- wiiUDrcBufferDisabled: 0
- wiiUProfilerLibPath:
- playModeTestRunnerEnabled: 0
- actionOnDotNetUnhandledException: 1
- enableInternalProfiler: 0
- logObjCUncaughtExceptions: 1
- enableCrashReportAPI: 0
- cameraUsageDescription:
- locationUsageDescription:
- microphoneUsageDescription:
- switchNetLibKey:
- switchSocketMemoryPoolSize: 6144
- switchSocketAllocatorPoolSize: 128
- switchSocketConcurrencyLimit: 14
- switchScreenResolutionBehavior: 2
- switchUseCPUProfiler: 0
- switchApplicationID: 0x01004b9000490000
- switchNSODependencies:
- switchTitleNames_0:
- switchTitleNames_1:
- switchTitleNames_2:
- switchTitleNames_3:
- switchTitleNames_4:
- switchTitleNames_5:
- switchTitleNames_6:
- switchTitleNames_7:
- switchTitleNames_8:
- switchTitleNames_9:
- switchTitleNames_10:
- switchTitleNames_11:
- switchPublisherNames_0:
- switchPublisherNames_1:
- switchPublisherNames_2:
- switchPublisherNames_3:
- switchPublisherNames_4:
- switchPublisherNames_5:
- switchPublisherNames_6:
- switchPublisherNames_7:
- switchPublisherNames_8:
- switchPublisherNames_9:
- switchPublisherNames_10:
- switchPublisherNames_11:
- switchIcons_0: {fileID: 0}
- switchIcons_1: {fileID: 0}
- switchIcons_2: {fileID: 0}
- switchIcons_3: {fileID: 0}
- switchIcons_4: {fileID: 0}
- switchIcons_5: {fileID: 0}
- switchIcons_6: {fileID: 0}
- switchIcons_7: {fileID: 0}
- switchIcons_8: {fileID: 0}
- switchIcons_9: {fileID: 0}
- switchIcons_10: {fileID: 0}
- switchIcons_11: {fileID: 0}
- switchSmallIcons_0: {fileID: 0}
- switchSmallIcons_1: {fileID: 0}
- switchSmallIcons_2: {fileID: 0}
- switchSmallIcons_3: {fileID: 0}
- switchSmallIcons_4: {fileID: 0}
- switchSmallIcons_5: {fileID: 0}
- switchSmallIcons_6: {fileID: 0}
- switchSmallIcons_7: {fileID: 0}
- switchSmallIcons_8: {fileID: 0}
- switchSmallIcons_9: {fileID: 0}
- switchSmallIcons_10: {fileID: 0}
- switchSmallIcons_11: {fileID: 0}
- switchManualHTML:
- switchAccessibleURLs:
- switchLegalInformation:
- switchMainThreadStackSize: 1048576
- switchPresenceGroupId: 0x01004b9000490000
- switchLogoHandling: 0
- switchReleaseVersion: 0
- switchDisplayVersion: 1.0.0
- switchStartupUserAccount: 0
- switchTouchScreenUsage: 0
- switchSupportedLanguagesMask: 0
- switchLogoType: 0
- switchApplicationErrorCodeCategory:
- switchUserAccountSaveDataSize: 0
- switchUserAccountSaveDataJournalSize: 0
- switchApplicationAttribute: 0
- switchCardSpecSize: 4
- switchCardSpecClock: 25
- switchRatingsMask: 0
- switchRatingsInt_0: 0
- switchRatingsInt_1: 0
- switchRatingsInt_2: 0
- switchRatingsInt_3: 0
- switchRatingsInt_4: 0
- switchRatingsInt_5: 0
- switchRatingsInt_6: 0
- switchRatingsInt_7: 0
- switchRatingsInt_8: 0
- switchRatingsInt_9: 0
- switchRatingsInt_10: 0
- switchRatingsInt_11: 0
- switchLocalCommunicationIds_0: 0x01004b9000490000
- switchLocalCommunicationIds_1:
- switchLocalCommunicationIds_2:
- switchLocalCommunicationIds_3:
- switchLocalCommunicationIds_4:
- switchLocalCommunicationIds_5:
- switchLocalCommunicationIds_6:
- switchLocalCommunicationIds_7:
- switchParentalControl: 0
- switchAllowsScreenshot: 1
- switchDataLossConfirmation: 0
- switchSupportedNpadStyles: 3
- switchSocketConfigEnabled: 0
- switchTcpInitialSendBufferSize: 32
- switchTcpInitialReceiveBufferSize: 64
- switchTcpAutoSendBufferSizeMax: 256
- switchTcpAutoReceiveBufferSizeMax: 256
- switchUdpSendBufferSize: 9
- switchUdpReceiveBufferSize: 42
- switchSocketBufferEfficiency: 4
- switchSocketInitializeEnabled: 1
- switchNetworkInterfaceManagerInitializeEnabled: 1
- switchPlayerConnectionEnabled: 1
- ps4NPAgeRating: 12
- ps4NPTitleSecret:
- ps4NPTrophyPackPath:
- ps4ParentalLevel: 11
- ps4ContentID: ED1633-NPXX51362_00-0000000000000000
- ps4Category: 0
- ps4MasterVersion: 01.00
- ps4AppVersion: 01.00
- ps4AppType: 0
- ps4ParamSfxPath:
- ps4VideoOutPixelFormat: 0
- ps4VideoOutInitialWidth: 1920
- ps4VideoOutBaseModeInitialWidth: 1920
- ps4VideoOutReprojectionRate: 120
- ps4PronunciationXMLPath:
- ps4PronunciationSIGPath:
- ps4BackgroundImagePath:
- ps4StartupImagePath:
- ps4SaveDataImagePath:
- ps4SdkOverride:
- ps4BGMPath:
- ps4ShareFilePath:
- ps4ShareOverlayImagePath:
- ps4PrivacyGuardImagePath:
- ps4NPtitleDatPath:
- ps4RemotePlayKeyAssignment: -1
- ps4RemotePlayKeyMappingDir:
- ps4PlayTogetherPlayerCount: 0
- ps4EnterButtonAssignment: 1
- ps4ApplicationParam1: 0
- ps4ApplicationParam2: 0
- ps4ApplicationParam3: 0
- ps4ApplicationParam4: 0
- ps4DownloadDataSize: 0
- ps4GarlicHeapSize: 2048
- ps4ProGarlicHeapSize: 2560
- ps4Passcode: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ
- ps4pnSessions: 1
- ps4pnPresence: 1
- ps4pnFriends: 1
- ps4pnGameCustomData: 1
- playerPrefsSupport: 0
- restrictedAudioUsageRights: 0
- ps4UseResolutionFallback: 0
- ps4ReprojectionSupport: 0
- ps4UseAudio3dBackend: 0
- ps4SocialScreenEnabled: 0
- ps4ScriptOptimizationLevel: 0
- ps4Audio3dVirtualSpeakerCount: 14
- ps4attribCpuUsage: 0
- ps4PatchPkgPath:
- ps4PatchLatestPkgPath:
- ps4PatchChangeinfoPath:
- ps4PatchDayOne: 0
- ps4attribUserManagement: 0
- ps4attribMoveSupport: 0
- ps4attrib3DSupport: 0
- ps4attribShareSupport: 0
- ps4attribExclusiveVR: 0
- ps4disableAutoHideSplash: 0
- ps4videoRecordingFeaturesUsed: 0
- ps4contentSearchFeaturesUsed: 0
- ps4attribEyeToEyeDistanceSettingVR: 0
- ps4IncludedModules: []
- monoEnv:
- psp2Splashimage: {fileID: 0}
- psp2NPTrophyPackPath:
- psp2NPSupportGBMorGJP: 0
- psp2NPAgeRating: 12
- psp2NPTitleDatPath:
- psp2NPCommsID:
- psp2NPCommunicationsID:
- psp2NPCommsPassphrase:
- psp2NPCommsSig:
- psp2ParamSfxPath:
- psp2ManualPath:
- psp2LiveAreaGatePath:
- psp2LiveAreaBackroundPath:
- psp2LiveAreaPath:
- psp2LiveAreaTrialPath:
- psp2PatchChangeInfoPath:
- psp2PatchOriginalPackage:
- psp2PackagePassword: F69AzBlax3CF3EDNhm3soLBPh71Yexui
- psp2KeystoneFile:
- psp2MemoryExpansionMode: 0
- psp2DRMType: 0
- psp2StorageType: 0
- psp2MediaCapacity: 0
- psp2DLCConfigPath:
- psp2ThumbnailPath:
- psp2BackgroundPath:
- psp2SoundPath:
- psp2TrophyCommId:
- psp2TrophyPackagePath:
- psp2PackagedResourcesPath:
- psp2SaveDataQuota: 10240
- psp2ParentalLevel: 1
- psp2ShortTitle: Not Set
- psp2ContentID: IV0000-ABCD12345_00-0123456789ABCDEF
- psp2Category: 0
- psp2MasterVersion: 01.00
- psp2AppVersion: 01.00
- psp2TVBootMode: 0
- psp2EnterButtonAssignment: 2
- psp2TVDisableEmu: 0
- psp2AllowTwitterDialog: 1
- psp2Upgradable: 0
- psp2HealthWarning: 0
- psp2UseLibLocation: 0
- psp2InfoBarOnStartup: 0
- psp2InfoBarColor: 0
- psp2ScriptOptimizationLevel: 0
- psmSplashimage: {fileID: 0}
- splashScreenBackgroundSourceLandscape: {fileID: 0}
- splashScreenBackgroundSourcePortrait: {fileID: 0}
- spritePackerPolicy:
- webGLMemorySize: 256
- webGLExceptionSupport: 1
- webGLNameFilesAsHashes: 0
- webGLDataCaching: 0
- webGLDebugSymbols: 0
- webGLEmscriptenArgs:
- webGLModulesDirectory:
- webGLTemplate: APPLICATION:Default
- webGLAnalyzeBuildSize: 0
- webGLUseEmbeddedResources: 0
- webGLUseWasm: 0
- webGLCompressionFormat: 1
- scriptingDefineSymbols: {}
- platformArchitecture: {}
- scriptingBackend: {}
- incrementalIl2cppBuild: {}
- additionalIl2CppArgs:
- scriptingRuntimeVersion: 0
- apiCompatibilityLevelPerPlatform: {}
- m_RenderingPath: 1
- m_MobileRenderingPath: 1
- metroPackageName: button-clicker
- metroPackageVersion:
- metroCertificatePath:
- metroCertificatePassword:
- metroCertificateSubject:
- metroCertificateIssuer:
- metroCertificateNotAfter: 0000000000000000
- metroApplicationDescription: button-clicker
- wsaImages: {}
- metroTileShortName:
- metroCommandLineArgsFile:
- metroTileShowName: 0
- metroMediumTileShowName: 0
- metroLargeTileShowName: 0
- metroWideTileShowName: 0
- metroDefaultTileSize: 1
- metroTileForegroundText: 2
- metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0}
- metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628,
- a: 1}
- metroSplashScreenUseBackgroundColor: 0
- platformCapabilities: {}
- metroFTAName:
- metroFTAFileTypes: []
- metroProtocolName:
- metroCompilationOverrides: 1
- tizenProductDescription:
- tizenProductURL:
- tizenSigningProfileName:
- tizenGPSPermissions: 0
- tizenMicrophonePermissions: 0
- tizenDeploymentTarget:
- tizenDeploymentTargetType: -1
- tizenMinOSVersion: 1
- n3dsUseExtSaveData: 0
- n3dsCompressStaticMem: 1
- n3dsExtSaveDataNumber: 0x12345
- n3dsStackSize: 131072
- n3dsTargetPlatform: 2
- n3dsRegion: 7
- n3dsMediaSize: 0
- n3dsLogoStyle: 3
- n3dsTitle: GameName
- n3dsProductCode:
- n3dsApplicationId: 0xFF3FF
- stvDeviceAddress:
- stvProductDescription:
- stvProductAuthor:
- stvProductAuthorEmail:
- stvProductLink:
- stvProductCategory: 0
- XboxOneProductId:
- XboxOneUpdateKey:
- XboxOneSandboxId:
- XboxOneContentId:
- XboxOneTitleId:
- XboxOneSCId:
- XboxOneGameOsOverridePath:
- XboxOnePackagingOverridePath:
- XboxOneAppManifestOverridePath:
- XboxOnePackageEncryption: 0
- XboxOnePackageUpdateGranularity: 2
- XboxOneDescription:
- XboxOneLanguage:
- - enus
- XboxOneCapability: []
- XboxOneGameRating: {}
- XboxOneIsContentPackage: 0
- XboxOneEnableGPUVariability: 0
- XboxOneSockets: {}
- XboxOneSplashScreen: {fileID: 0}
- XboxOneAllowedProductIds: []
- XboxOnePersistentLocalStorageSize: 0
- xboxOneScriptCompiler: 0
- vrEditorSettings:
- daydream:
- daydreamIconForeground: {fileID: 0}
- daydreamIconBackground: {fileID: 0}
- cloudServicesEnabled: {}
- facebookSdkVersion: 7.9.4
- apiCompatibilityLevel: 2
- cloudProjectId:
- projectName:
- organizationId:
- cloudEnabled: 0
- enableNativePlatformBackendsForNewInputSystem: 0
- disableOldInputManagerSupport: 0
diff --git a/deps/discord-rpc/examples/button-clicker/ProjectSettings/ProjectVersion.txt b/deps/discord-rpc/examples/button-clicker/ProjectSettings/ProjectVersion.txt
deleted file mode 100644
index 7a6fffb8be..0000000000
--- a/deps/discord-rpc/examples/button-clicker/ProjectSettings/ProjectVersion.txt
+++ /dev/null
@@ -1 +0,0 @@
-m_EditorVersion: 2017.2.0f3
diff --git a/deps/discord-rpc/examples/button-clicker/ProjectSettings/QualitySettings.asset b/deps/discord-rpc/examples/button-clicker/ProjectSettings/QualitySettings.asset
deleted file mode 100644
index 86c047f26e..0000000000
--- a/deps/discord-rpc/examples/button-clicker/ProjectSettings/QualitySettings.asset
+++ /dev/null
@@ -1,193 +0,0 @@
-%YAML 1.1
-%TAG !u! tag:unity3d.com,2011:
---- !u!47 &1
-QualitySettings:
- m_ObjectHideFlags: 0
- serializedVersion: 5
- m_CurrentQuality: 5
- m_QualitySettings:
- - serializedVersion: 2
- name: Very Low
- pixelLightCount: 0
- shadows: 0
- shadowResolution: 0
- shadowProjection: 1
- shadowCascades: 1
- shadowDistance: 15
- shadowNearPlaneOffset: 3
- shadowCascade2Split: 0.33333334
- shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
- shadowmaskMode: 0
- blendWeights: 1
- textureQuality: 1
- anisotropicTextures: 0
- antiAliasing: 0
- softParticles: 0
- softVegetation: 0
- realtimeReflectionProbes: 0
- billboardsFaceCameraPosition: 0
- vSyncCount: 0
- lodBias: 0.3
- maximumLODLevel: 0
- particleRaycastBudget: 4
- asyncUploadTimeSlice: 2
- asyncUploadBufferSize: 4
- resolutionScalingFixedDPIFactor: 1
- excludedTargetPlatforms: []
- - serializedVersion: 2
- name: Low
- pixelLightCount: 0
- shadows: 0
- shadowResolution: 0
- shadowProjection: 1
- shadowCascades: 1
- shadowDistance: 20
- shadowNearPlaneOffset: 3
- shadowCascade2Split: 0.33333334
- shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
- shadowmaskMode: 0
- blendWeights: 2
- textureQuality: 0
- anisotropicTextures: 0
- antiAliasing: 0
- softParticles: 0
- softVegetation: 0
- realtimeReflectionProbes: 0
- billboardsFaceCameraPosition: 0
- vSyncCount: 0
- lodBias: 0.4
- maximumLODLevel: 0
- particleRaycastBudget: 16
- asyncUploadTimeSlice: 2
- asyncUploadBufferSize: 4
- resolutionScalingFixedDPIFactor: 1
- excludedTargetPlatforms: []
- - serializedVersion: 2
- name: Medium
- pixelLightCount: 1
- shadows: 1
- shadowResolution: 0
- shadowProjection: 1
- shadowCascades: 1
- shadowDistance: 20
- shadowNearPlaneOffset: 3
- shadowCascade2Split: 0.33333334
- shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
- shadowmaskMode: 0
- blendWeights: 2
- textureQuality: 0
- anisotropicTextures: 1
- antiAliasing: 0
- softParticles: 0
- softVegetation: 0
- realtimeReflectionProbes: 0
- billboardsFaceCameraPosition: 0
- vSyncCount: 1
- lodBias: 0.7
- maximumLODLevel: 0
- particleRaycastBudget: 64
- asyncUploadTimeSlice: 2
- asyncUploadBufferSize: 4
- resolutionScalingFixedDPIFactor: 1
- excludedTargetPlatforms: []
- - serializedVersion: 2
- name: High
- pixelLightCount: 2
- shadows: 2
- shadowResolution: 1
- shadowProjection: 1
- shadowCascades: 2
- shadowDistance: 40
- shadowNearPlaneOffset: 3
- shadowCascade2Split: 0.33333334
- shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
- shadowmaskMode: 1
- blendWeights: 2
- textureQuality: 0
- anisotropicTextures: 1
- antiAliasing: 0
- softParticles: 0
- softVegetation: 1
- realtimeReflectionProbes: 1
- billboardsFaceCameraPosition: 1
- vSyncCount: 1
- lodBias: 1
- maximumLODLevel: 0
- particleRaycastBudget: 256
- asyncUploadTimeSlice: 2
- asyncUploadBufferSize: 4
- resolutionScalingFixedDPIFactor: 1
- excludedTargetPlatforms: []
- - serializedVersion: 2
- name: Very High
- pixelLightCount: 3
- shadows: 2
- shadowResolution: 2
- shadowProjection: 1
- shadowCascades: 2
- shadowDistance: 70
- shadowNearPlaneOffset: 3
- shadowCascade2Split: 0.33333334
- shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
- shadowmaskMode: 1
- blendWeights: 4
- textureQuality: 0
- anisotropicTextures: 2
- antiAliasing: 2
- softParticles: 1
- softVegetation: 1
- realtimeReflectionProbes: 1
- billboardsFaceCameraPosition: 1
- vSyncCount: 1
- lodBias: 1.5
- maximumLODLevel: 0
- particleRaycastBudget: 1024
- asyncUploadTimeSlice: 2
- asyncUploadBufferSize: 4
- resolutionScalingFixedDPIFactor: 1
- excludedTargetPlatforms: []
- - serializedVersion: 2
- name: Ultra
- pixelLightCount: 4
- shadows: 2
- shadowResolution: 2
- shadowProjection: 1
- shadowCascades: 4
- shadowDistance: 150
- shadowNearPlaneOffset: 3
- shadowCascade2Split: 0.33333334
- shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
- shadowmaskMode: 1
- blendWeights: 4
- textureQuality: 0
- anisotropicTextures: 2
- antiAliasing: 2
- softParticles: 1
- softVegetation: 1
- realtimeReflectionProbes: 1
- billboardsFaceCameraPosition: 1
- vSyncCount: 1
- lodBias: 2
- maximumLODLevel: 0
- particleRaycastBudget: 4096
- asyncUploadTimeSlice: 2
- asyncUploadBufferSize: 4
- resolutionScalingFixedDPIFactor: 1
- excludedTargetPlatforms: []
- m_PerPlatformDefaultQuality:
- Android: 2
- Nintendo 3DS: 5
- Nintendo Switch: 5
- PS4: 5
- PSM: 5
- PSP2: 2
- Samsung TV: 2
- Standalone: 5
- Tizen: 2
- Web: 5
- WebGL: 3
- WiiU: 5
- Windows Store Apps: 5
- XboxOne: 5
- iPhone: 2
- tvOS: 2
diff --git a/deps/discord-rpc/examples/button-clicker/ProjectSettings/TagManager.asset b/deps/discord-rpc/examples/button-clicker/ProjectSettings/TagManager.asset
deleted file mode 100644
index 1c92a7840e..0000000000
--- a/deps/discord-rpc/examples/button-clicker/ProjectSettings/TagManager.asset
+++ /dev/null
@@ -1,43 +0,0 @@
-%YAML 1.1
-%TAG !u! tag:unity3d.com,2011:
---- !u!78 &1
-TagManager:
- serializedVersion: 2
- tags: []
- layers:
- - Default
- - TransparentFX
- - Ignore Raycast
- -
- - Water
- - UI
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- m_SortingLayers:
- - name: Default
- uniqueID: 0
- locked: 0
diff --git a/deps/discord-rpc/examples/button-clicker/ProjectSettings/TimeManager.asset b/deps/discord-rpc/examples/button-clicker/ProjectSettings/TimeManager.asset
deleted file mode 100644
index 558a017e1f..0000000000
--- a/deps/discord-rpc/examples/button-clicker/ProjectSettings/TimeManager.asset
+++ /dev/null
@@ -1,9 +0,0 @@
-%YAML 1.1
-%TAG !u! tag:unity3d.com,2011:
---- !u!5 &1
-TimeManager:
- m_ObjectHideFlags: 0
- Fixed Timestep: 0.02
- Maximum Allowed Timestep: 0.33333334
- m_TimeScale: 1
- Maximum Particle Timestep: 0.03
diff --git a/deps/discord-rpc/examples/button-clicker/ProjectSettings/UnityConnectSettings.asset b/deps/discord-rpc/examples/button-clicker/ProjectSettings/UnityConnectSettings.asset
deleted file mode 100644
index 1cc5485b8a..0000000000
--- a/deps/discord-rpc/examples/button-clicker/ProjectSettings/UnityConnectSettings.asset
+++ /dev/null
@@ -1,34 +0,0 @@
-%YAML 1.1
-%TAG !u! tag:unity3d.com,2011:
---- !u!310 &1
-UnityConnectSettings:
- m_ObjectHideFlags: 0
- m_Enabled: 0
- m_TestMode: 0
- m_TestEventUrl:
- m_TestConfigUrl:
- m_TestInitMode: 0
- CrashReportingSettings:
- m_EventUrl: https://perf-events.cloud.unity3d.com/api/events/crashes
- m_Enabled: 0
- m_CaptureEditorExceptions: 1
- UnityPurchasingSettings:
- m_Enabled: 0
- m_TestMode: 0
- UnityAnalyticsSettings:
- m_Enabled: 0
- m_InitializeOnStartup: 1
- m_TestMode: 0
- m_TestEventUrl:
- m_TestConfigUrl:
- UnityAdsSettings:
- m_Enabled: 0
- m_InitializeOnStartup: 1
- m_TestMode: 0
- m_EnabledPlatforms: 4294967295
- m_IosGameId:
- m_AndroidGameId:
- m_GameIds: {}
- m_GameId:
- PerformanceReportingSettings:
- m_Enabled: 0
diff --git a/deps/discord-rpc/examples/button-clicker/UnityPackageManager/manifest.json b/deps/discord-rpc/examples/button-clicker/UnityPackageManager/manifest.json
deleted file mode 100644
index 526aca6057..0000000000
--- a/deps/discord-rpc/examples/button-clicker/UnityPackageManager/manifest.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "dependencies": {
- }
-}
diff --git a/deps/discord-rpc/examples/send-presence/CMakeLists.txt b/deps/discord-rpc/examples/send-presence/CMakeLists.txt
deleted file mode 100644
index 8a67d472ee..0000000000
--- a/deps/discord-rpc/examples/send-presence/CMakeLists.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-include_directories(${PROJECT_SOURCE_DIR}/include)
-add_executable(
- send-presence
- MACOSX_BUNDLE
- send-presence.c
-)
-set_target_properties(send-presence PROPERTIES
- MACOSX_BUNDLE_BUNDLE_NAME "Send Presence"
- MACOSX_BUNDLE_GUI_IDENTIFIER "com.discordapp.examples.send-presence"
-)
-target_link_libraries(send-presence discord-rpc)
-
-install(
- TARGETS send-presence
- RUNTIME
- DESTINATION "bin"
- CONFIGURATIONS Release
- BUNDLE
- DESTINATION "bin"
- CONFIGURATIONS Release
-)
\ No newline at end of file
diff --git a/deps/discord-rpc/examples/send-presence/send-presence.c b/deps/discord-rpc/examples/send-presence/send-presence.c
deleted file mode 100644
index 5449cf86fc..0000000000
--- a/deps/discord-rpc/examples/send-presence/send-presence.c
+++ /dev/null
@@ -1,205 +0,0 @@
-/*
- This is a simple example in C of using the rich presence API asynchronously.
-*/
-
-#define _CRT_SECURE_NO_WARNINGS /* thanks Microsoft */
-
-#include
-#include
-#include
-#include
-
-#include "discord_rpc.h"
-
-static const char* APPLICATION_ID = "345229890980937739";
-static int FrustrationLevel = 0;
-static int64_t StartTime;
-static int SendPresence = 1;
-
-static int prompt(char* line, size_t size)
-{
- int res;
- char* nl;
- printf("\n> ");
- fflush(stdout);
- res = fgets(line, (int)size, stdin) ? 1 : 0;
- line[size - 1] = 0;
- nl = strchr(line, '\n');
- if (nl) {
- *nl = 0;
- }
- return res;
-}
-
-static void updateDiscordPresence()
-{
- if (SendPresence) {
- char buffer[256];
- DiscordRichPresence discordPresence;
- memset(&discordPresence, 0, sizeof(discordPresence));
- discordPresence.state = "West of House";
- sprintf(buffer, "Frustration level: %d", FrustrationLevel);
- discordPresence.details = buffer;
- discordPresence.startTimestamp = StartTime;
- discordPresence.endTimestamp = time(0) + 5 * 60;
- discordPresence.largeImageKey = "canary-large";
- discordPresence.smallImageKey = "ptb-small";
- discordPresence.partyId = "party1234";
- discordPresence.partySize = 1;
- discordPresence.partyMax = 6;
- discordPresence.matchSecret = "xyzzy";
- discordPresence.joinSecret = "join";
- discordPresence.spectateSecret = "look";
- discordPresence.instance = 0;
- Discord_UpdatePresence(&discordPresence);
- }
- else {
- Discord_ClearPresence();
- }
-}
-
-static void handleDiscordReady(const DiscordUser* connectedUser)
-{
- printf("\nDiscord: connected to user %s#%s - %s\n",
- connectedUser->username,
- connectedUser->discriminator,
- connectedUser->userId);
-}
-
-static void handleDiscordDisconnected(int errcode, const char* message)
-{
- printf("\nDiscord: disconnected (%d: %s)\n", errcode, message);
-}
-
-static void handleDiscordError(int errcode, const char* message)
-{
- printf("\nDiscord: error (%d: %s)\n", errcode, message);
-}
-
-static void handleDiscordJoin(const char* secret)
-{
- printf("\nDiscord: join (%s)\n", secret);
-}
-
-static void handleDiscordSpectate(const char* secret)
-{
- printf("\nDiscord: spectate (%s)\n", secret);
-}
-
-static void handleDiscordJoinRequest(const DiscordUser* request)
-{
- int response = -1;
- char yn[4];
- printf("\nDiscord: join request from %s#%s - %s\n",
- request->username,
- request->discriminator,
- request->userId);
- do {
- printf("Accept? (y/n)");
- if (!prompt(yn, sizeof(yn))) {
- break;
- }
-
- if (!yn[0]) {
- continue;
- }
-
- if (yn[0] == 'y') {
- response = DISCORD_REPLY_YES;
- break;
- }
-
- if (yn[0] == 'n') {
- response = DISCORD_REPLY_NO;
- break;
- }
- } while (1);
- if (response != -1) {
- Discord_Respond(request->userId, response);
- }
-}
-
-static void discordInit()
-{
- DiscordEventHandlers handlers;
- memset(&handlers, 0, sizeof(handlers));
- handlers.ready = handleDiscordReady;
- handlers.disconnected = handleDiscordDisconnected;
- handlers.errored = handleDiscordError;
- handlers.joinGame = handleDiscordJoin;
- handlers.spectateGame = handleDiscordSpectate;
- handlers.joinRequest = handleDiscordJoinRequest;
- Discord_Initialize(APPLICATION_ID, &handlers, 1, NULL);
-}
-
-static void gameLoop()
-{
- char line[512];
- char* space;
-
- StartTime = time(0);
-
- printf("You are standing in an open field west of a white house.\n");
- while (prompt(line, sizeof(line))) {
- if (line[0]) {
- if (line[0] == 'q') {
- break;
- }
-
- if (line[0] == 't') {
- printf("Shutting off Discord.\n");
- Discord_Shutdown();
- continue;
- }
-
- if (line[0] == 'c') {
- if (SendPresence) {
- printf("Clearing presence information.\n");
- SendPresence = 0;
- }
- else {
- printf("Restoring presence information.\n");
- SendPresence = 1;
- }
- updateDiscordPresence();
- continue;
- }
-
- if (line[0] == 'y') {
- printf("Reinit Discord.\n");
- discordInit();
- continue;
- }
-
- if (time(NULL) & 1) {
- printf("I don't understand that.\n");
- }
- else {
- space = strchr(line, ' ');
- if (space) {
- *space = 0;
- }
- printf("I don't know the word \"%s\".\n", line);
- }
-
- ++FrustrationLevel;
-
- updateDiscordPresence();
- }
-
-#ifdef DISCORD_DISABLE_IO_THREAD
- Discord_UpdateConnection();
-#endif
- Discord_RunCallbacks();
- }
-}
-
-int main(int argc, char* argv[])
-{
- discordInit();
-
- gameLoop();
-
- Discord_Shutdown();
- return 0;
-}
diff --git a/deps/discord-rpc/examples/unrealstatus/.gitignore b/deps/discord-rpc/examples/unrealstatus/.gitignore
deleted file mode 100644
index bd472d50ae..0000000000
--- a/deps/discord-rpc/examples/unrealstatus/.gitignore
+++ /dev/null
@@ -1,78 +0,0 @@
-# Visual Studio 2015 user specific files
-.vs/
-
-# Visual Studio 2015 database file
-*.VC.db
-
-# Compiled Object files
-*.slo
-*.lo
-*.o
-*.obj
-
-# Precompiled Headers
-*.gch
-*.pch
-
-# Compiled Dynamic libraries
-*.so
-*.dylib
-*.dll
-
-# Fortran module files
-*.mod
-
-# Compiled Static libraries
-*.lai
-*.la
-*.a
-*.lib
-
-# Executables
-*.exe
-*.out
-*.app
-*.ipa
-
-# These project files can be generated by the engine
-*.xcodeproj
-*.xcworkspace
-*.sln
-*.suo
-*.opensdf
-*.sdf
-*.VC.db
-*.VC.opendb
-
-# Precompiled Assets
-SourceArt/**/*.png
-SourceArt/**/*.tga
-
-# Binary Files
-Binaries/
-
-# Builds
-Build/*
-
-# Whitelist PakBlacklist-.txt files
-!Build/*/
-Build/*/**
-!Build/*/PakBlacklist*.txt
-
-# Don't ignore icon files in Build
-!Build/**/*.ico
-
-# Built data for maps
-*_BuiltData.uasset
-
-# Configuration files generated by the Editor
-Saved/*
-
-# Compiled source files for the engine to use
-Intermediate/
-
-# Cache files for the editor to use
-DerivedDataCache/
-
-# Library headers must be copied automatically by the build script (build.py unreal)
-Plugins/DiscordRpc/Source/ThirdParty/DiscordRpcLibrary/Include
diff --git a/deps/discord-rpc/examples/unrealstatus/Config/DefaultEditor.ini b/deps/discord-rpc/examples/unrealstatus/Config/DefaultEditor.ini
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/deps/discord-rpc/examples/unrealstatus/Config/DefaultEngine.ini b/deps/discord-rpc/examples/unrealstatus/Config/DefaultEngine.ini
deleted file mode 100644
index 84c38f3531..0000000000
--- a/deps/discord-rpc/examples/unrealstatus/Config/DefaultEngine.ini
+++ /dev/null
@@ -1,54 +0,0 @@
-[URL]
-
-[/Script/HardwareTargeting.HardwareTargetingSettings]
-TargetedHardwareClass=Desktop
-AppliedTargetedHardwareClass=Desktop
-DefaultGraphicsPerformance=Maximum
-AppliedDefaultGraphicsPerformance=Maximum
-
-[/Script/Engine.EndUserSettings]
-bSendAnonymousUsageDataToEpic=False
-
-[/Script/Engine.PhysicsSettings]
-DefaultGravityZ=-980.000000
-DefaultTerminalVelocity=4000.000000
-DefaultFluidFriction=0.300000
-SimulateScratchMemorySize=262144
-RagdollAggregateThreshold=4
-TriangleMeshTriangleMinAreaThreshold=5.000000
-bEnableAsyncScene=False
-bEnableShapeSharing=False
-bEnablePCM=False
-bEnableStabilization=False
-bWarnMissingLocks=True
-bEnable2DPhysics=False
-LockedAxis=Invalid
-DefaultDegreesOfFreedom=Full3D
-BounceThresholdVelocity=200.000000
-FrictionCombineMode=Average
-RestitutionCombineMode=Average
-MaxAngularVelocity=3600.000000
-MaxDepenetrationVelocity=0.000000
-ContactOffsetMultiplier=0.010000
-MinContactOffset=0.000100
-MaxContactOffset=1.000000
-bSimulateSkeletalMeshOnDedicatedServer=True
-DefaultShapeComplexity=CTF_UseSimpleAndComplex
-bDefaultHasComplexCollision=True
-bSuppressFaceRemapTable=False
-bSupportUVFromHitResults=False
-bDisableActiveActors=False
-bDisableCCD=False
-MaxPhysicsDeltaTime=0.033333
-bSubstepping=False
-bSubsteppingAsync=False
-MaxSubstepDeltaTime=0.016667
-MaxSubsteps=6
-SyncSceneSmoothingFactor=0.000000
-AsyncSceneSmoothingFactor=0.990000
-InitialAverageFrameRate=0.016667
-
-[/Script/EngineSettings.GameMapsSettings]
-EditorStartupMap=/Game/ShowTheUILevel.ShowTheUILevel
-GameDefaultMap=/Game/ShowTheUILevel.ShowTheUILevel
-
diff --git a/deps/discord-rpc/examples/unrealstatus/Config/DefaultGame.ini b/deps/discord-rpc/examples/unrealstatus/Config/DefaultGame.ini
deleted file mode 100644
index 7b5e2dc2f6..0000000000
--- a/deps/discord-rpc/examples/unrealstatus/Config/DefaultGame.ini
+++ /dev/null
@@ -1,7 +0,0 @@
-[/Script/EngineSettings.GeneralProjectSettings]
-ProjectID=E5977A24492699DF20B8ADBF736AF6C6
-ProjectName=Discord RPC Example
-CompanyName=Discord Inc.
-Homepage="https://discordapp.com/"
-CopyrightNotice=
-
diff --git a/deps/discord-rpc/examples/unrealstatus/Content/MainScreenBP.uasset b/deps/discord-rpc/examples/unrealstatus/Content/MainScreenBP.uasset
deleted file mode 100644
index e903b53830..0000000000
Binary files a/deps/discord-rpc/examples/unrealstatus/Content/MainScreenBP.uasset and /dev/null differ
diff --git a/deps/discord-rpc/examples/unrealstatus/Content/MouseGameModeBP.uasset b/deps/discord-rpc/examples/unrealstatus/Content/MouseGameModeBP.uasset
deleted file mode 100644
index 410af19a9c..0000000000
Binary files a/deps/discord-rpc/examples/unrealstatus/Content/MouseGameModeBP.uasset and /dev/null differ
diff --git a/deps/discord-rpc/examples/unrealstatus/Content/MousePlayerControllerBP.uasset b/deps/discord-rpc/examples/unrealstatus/Content/MousePlayerControllerBP.uasset
deleted file mode 100644
index 0aaf50ba76..0000000000
Binary files a/deps/discord-rpc/examples/unrealstatus/Content/MousePlayerControllerBP.uasset and /dev/null differ
diff --git a/deps/discord-rpc/examples/unrealstatus/Content/ShowTheUILevel.umap b/deps/discord-rpc/examples/unrealstatus/Content/ShowTheUILevel.umap
deleted file mode 100644
index bc0e5b7c48..0000000000
Binary files a/deps/discord-rpc/examples/unrealstatus/Content/ShowTheUILevel.umap and /dev/null differ
diff --git a/deps/discord-rpc/examples/unrealstatus/Plugins/discordrpc/DiscordRpc.uplugin b/deps/discord-rpc/examples/unrealstatus/Plugins/discordrpc/DiscordRpc.uplugin
deleted file mode 100644
index 309df129cf..0000000000
--- a/deps/discord-rpc/examples/unrealstatus/Plugins/discordrpc/DiscordRpc.uplugin
+++ /dev/null
@@ -1,29 +0,0 @@
-{
- "FileVersion": 3,
- "Version": 1,
- "VersionName": "1.0",
- "FriendlyName": "Discord RPC",
- "Description": "Wrap the Discord RPC library.",
- "Category": "Messaging",
- "CreatedBy": "Chris Marsh ",
- "CreatedByURL": "https://discordapp.com/",
- "DocsURL": "",
- "MarketplaceURL": "",
- "SupportURL": "",
- "CanContainContent": true,
- "IsBetaVersion": true,
- "Installed": false,
- "Modules": [
- {
- "Name": "DiscordRpc",
- "Type": "Runtime",
- "LoadingPhase": "PreDefault",
- "WhitelistPlatforms" :
- [
- "Win64",
- "Linux",
- "Mac"
- ]
- }
- ]
-}
\ No newline at end of file
diff --git a/deps/discord-rpc/examples/unrealstatus/Plugins/discordrpc/Resources/Icon128.png b/deps/discord-rpc/examples/unrealstatus/Plugins/discordrpc/Resources/Icon128.png
deleted file mode 100644
index 8b7f8e1c6a..0000000000
Binary files a/deps/discord-rpc/examples/unrealstatus/Plugins/discordrpc/Resources/Icon128.png and /dev/null differ
diff --git a/deps/discord-rpc/examples/unrealstatus/Plugins/discordrpc/Resources/discord.png b/deps/discord-rpc/examples/unrealstatus/Plugins/discordrpc/Resources/discord.png
deleted file mode 100644
index 8b7f8e1c6a..0000000000
Binary files a/deps/discord-rpc/examples/unrealstatus/Plugins/discordrpc/Resources/discord.png and /dev/null differ
diff --git a/deps/discord-rpc/examples/unrealstatus/Plugins/discordrpc/Source/DiscordRpc/DiscordRpc.Build.cs b/deps/discord-rpc/examples/unrealstatus/Plugins/discordrpc/Source/DiscordRpc/DiscordRpc.Build.cs
deleted file mode 100644
index 4b06325520..0000000000
--- a/deps/discord-rpc/examples/unrealstatus/Plugins/discordrpc/Source/DiscordRpc/DiscordRpc.Build.cs
+++ /dev/null
@@ -1,57 +0,0 @@
-// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.
-
-using UnrealBuildTool;
-using System.IO;
-
-public class DiscordRpc : ModuleRules
-{
-#if WITH_FORWARDED_MODULE_RULES_CTOR
- public DiscordRpc(ReadOnlyTargetRules Target) : base(Target)
-#else
- public DiscordRpc(TargetInfo Target)
-#endif
- {
- Definitions.Add("DISCORD_DYNAMIC_LIB=1");
-
- PublicIncludePaths.AddRange(
- new string[] {
- "DiscordRpc/Public"
- }
- );
-
- PrivateIncludePaths.AddRange(
- new string[] {
- "DiscordRpc/Private"
- }
- );
-
- PublicDependencyModuleNames.AddRange(
- new string[]
- {
- "Core",
- "DiscordRpcLibrary"
- }
- );
-
- PrivateDependencyModuleNames.AddRange(
- new string[]
- {
- "CoreUObject",
- "Engine",
- "Slate",
- "SlateCore",
- "Projects"
- }
- );
-
- DynamicallyLoadedModuleNames.AddRange(
- new string[]
- {
- // ... add any modules that your module loads dynamically here ...
- }
- );
-
- string BaseDirectory = Path.GetFullPath(Path.Combine(ModuleDirectory, "..", "..", "Source", "ThirdParty", "DiscordRpcLibrary"));
- PublicIncludePaths.Add(Path.Combine(BaseDirectory, "Include"));
- }
-}
\ No newline at end of file
diff --git a/deps/discord-rpc/examples/unrealstatus/Plugins/discordrpc/Source/DiscordRpc/Private/DiscordRpc.cpp b/deps/discord-rpc/examples/unrealstatus/Plugins/discordrpc/Source/DiscordRpc/Private/DiscordRpc.cpp
deleted file mode 100644
index d539dab034..0000000000
--- a/deps/discord-rpc/examples/unrealstatus/Plugins/discordrpc/Source/DiscordRpc/Private/DiscordRpc.cpp
+++ /dev/null
@@ -1,76 +0,0 @@
-// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.
-
-#include "DiscordRpcPrivatePCH.h"
-#include "IPluginManager.h"
-#include "ModuleManager.h"
-
-#define LOCTEXT_NAMESPACE "FDiscordRpcModule"
-
-void FDiscordRpcModule::StartupModule()
-{
-#if !PLATFORM_LINUX
-#if defined(DISCORD_DYNAMIC_LIB)
- // Get the base directory of this plugin
- FString BaseDir = IPluginManager::Get().FindPlugin("DiscordRpc")->GetBaseDir();
- const FString SDKDir =
- FPaths::Combine(*BaseDir, TEXT("Source"), TEXT("ThirdParty"), TEXT("DiscordRpcLibrary"));
-#if PLATFORM_WINDOWS
- const FString LibName = TEXT("discord-rpc");
- const FString LibDir = FPaths::Combine(*SDKDir, TEXT("Win64"));
- if (!LoadDependency(LibDir, LibName, DiscordRpcLibraryHandle)) {
- FMessageDialog::Open(
- EAppMsgType::Ok,
- LOCTEXT(LOCTEXT_NAMESPACE,
- "Failed to load DiscordRpc plugin. Plug-in will not be functional."));
- FreeDependency(DiscordRpcLibraryHandle);
- }
-#elif PLATFORM_MAC
- const FString LibName = TEXT("libdiscord-rpc");
- const FString LibDir = FPaths::Combine(*SDKDir, TEXT("Mac"));
- if (!LoadDependency(LibDir, LibName, DiscordRpcLibraryHandle)) {
- FMessageDialog::Open(
- EAppMsgType::Ok,
- LOCTEXT(LOCTEXT_NAMESPACE,
- "Failed to load DiscordRpc plugin. Plug-in will not be functional."));
- FreeDependency(DiscordRpcLibraryHandle);
- }
-#endif
-#endif
-#endif
-}
-
-void FDiscordRpcModule::ShutdownModule()
-{
- // Free the dll handle
-#if !PLATFORM_LINUX
-#if defined(DISCORD_DYNAMIC_LIB)
- FreeDependency(DiscordRpcLibraryHandle);
-#endif
-#endif
-}
-
-bool FDiscordRpcModule::LoadDependency(const FString& Dir, const FString& Name, void*& Handle)
-{
- FString Lib = Name + TEXT(".") + FPlatformProcess::GetModuleExtension();
- FString Path = Dir.IsEmpty() ? *Lib : FPaths::Combine(*Dir, *Lib);
-
- Handle = FPlatformProcess::GetDllHandle(*Path);
-
- if (Handle == nullptr) {
- return false;
- }
-
- return true;
-}
-
-void FDiscordRpcModule::FreeDependency(void*& Handle)
-{
- if (Handle != nullptr) {
- FPlatformProcess::FreeDllHandle(Handle);
- Handle = nullptr;
- }
-}
-
-#undef LOCTEXT_NAMESPACE
-
-IMPLEMENT_MODULE(FDiscordRpcModule, DiscordRpc)
\ No newline at end of file
diff --git a/deps/discord-rpc/examples/unrealstatus/Plugins/discordrpc/Source/DiscordRpc/Private/DiscordRpcBlueprint.cpp b/deps/discord-rpc/examples/unrealstatus/Plugins/discordrpc/Source/DiscordRpc/Private/DiscordRpcBlueprint.cpp
deleted file mode 100644
index 95388df0b4..0000000000
--- a/deps/discord-rpc/examples/unrealstatus/Plugins/discordrpc/Source/DiscordRpc/Private/DiscordRpcBlueprint.cpp
+++ /dev/null
@@ -1,171 +0,0 @@
-#include "DiscordRpcPrivatePCH.h"
-#include "DiscordRpcBlueprint.h"
-#include "discord_rpc.h"
-
-DEFINE_LOG_CATEGORY(Discord)
-
-static UDiscordRpc* self = nullptr;
-
-static void ReadyHandler(const DiscordUser* connectedUser)
-{
- FDiscordUserData ud;
- ud.userId = ANSI_TO_TCHAR(connectedUser->userId);
- ud.username = ANSI_TO_TCHAR(connectedUser->username);
- ud.discriminator = ANSI_TO_TCHAR(connectedUser->discriminator);
- ud.avatar = ANSI_TO_TCHAR(connectedUser->avatar);
- UE_LOG(Discord,
- Log,
- TEXT("Discord connected to %s - %s#%s"),
- *ud.userId,
- *ud.username,
- *ud.discriminator);
- if (self) {
- self->IsConnected = true;
- self->OnConnected.Broadcast(ud);
- }
-}
-
-static void DisconnectHandler(int errorCode, const char* message)
-{
- auto msg = FString(message);
- UE_LOG(Discord, Log, TEXT("Discord disconnected (%d): %s"), errorCode, *msg);
- if (self) {
- self->IsConnected = false;
- self->OnDisconnected.Broadcast(errorCode, msg);
- }
-}
-
-static void ErroredHandler(int errorCode, const char* message)
-{
- auto msg = FString(message);
- UE_LOG(Discord, Log, TEXT("Discord error (%d): %s"), errorCode, *msg);
- if (self) {
- self->OnErrored.Broadcast(errorCode, msg);
- }
-}
-
-static void JoinGameHandler(const char* joinSecret)
-{
- auto secret = FString(joinSecret);
- UE_LOG(Discord, Log, TEXT("Discord join %s"), *secret);
- if (self) {
- self->OnJoin.Broadcast(secret);
- }
-}
-
-static void SpectateGameHandler(const char* spectateSecret)
-{
- auto secret = FString(spectateSecret);
- UE_LOG(Discord, Log, TEXT("Discord spectate %s"), *secret);
- if (self) {
- self->OnSpectate.Broadcast(secret);
- }
-}
-
-static void JoinRequestHandler(const DiscordUser* request)
-{
- FDiscordUserData ud;
- ud.userId = ANSI_TO_TCHAR(request->userId);
- ud.username = ANSI_TO_TCHAR(request->username);
- ud.discriminator = ANSI_TO_TCHAR(request->discriminator);
- ud.avatar = ANSI_TO_TCHAR(request->avatar);
- UE_LOG(Discord,
- Log,
- TEXT("Discord join request from %s - %s#%s"),
- *ud.userId,
- *ud.username,
- *ud.discriminator);
- if (self) {
- self->OnJoinRequest.Broadcast(ud);
- }
-}
-
-void UDiscordRpc::Initialize(const FString& applicationId,
- bool autoRegister,
- const FString& optionalSteamId)
-{
- self = this;
- IsConnected = false;
- DiscordEventHandlers handlers{};
- handlers.ready = ReadyHandler;
- handlers.disconnected = DisconnectHandler;
- handlers.errored = ErroredHandler;
- if (OnJoin.IsBound()) {
- handlers.joinGame = JoinGameHandler;
- }
- if (OnSpectate.IsBound()) {
- handlers.spectateGame = SpectateGameHandler;
- }
- if (OnJoinRequest.IsBound()) {
- handlers.joinRequest = JoinRequestHandler;
- }
- auto appId = StringCast(*applicationId);
- auto steamId = StringCast(*optionalSteamId);
- Discord_Initialize(
- (const char*)appId.Get(), &handlers, autoRegister, (const char*)steamId.Get());
-}
-
-void UDiscordRpc::Shutdown()
-{
- Discord_Shutdown();
- self = nullptr;
-}
-
-void UDiscordRpc::RunCallbacks()
-{
- Discord_RunCallbacks();
-}
-
-void UDiscordRpc::UpdatePresence()
-{
- DiscordRichPresence rp{};
-
- auto state = StringCast(*RichPresence.state);
- rp.state = state.Get();
-
- auto details = StringCast(*RichPresence.details);
- rp.details = details.Get();
-
- auto largeImageKey = StringCast(*RichPresence.largeImageKey);
- rp.largeImageKey = largeImageKey.Get();
-
- auto largeImageText = StringCast(*RichPresence.largeImageText);
- rp.largeImageText = largeImageText.Get();
-
- auto smallImageKey = StringCast(*RichPresence.smallImageKey);
- rp.smallImageKey = smallImageKey.Get();
-
- auto smallImageText = StringCast(*RichPresence.smallImageText);
- rp.smallImageText = smallImageText.Get();
-
- auto partyId = StringCast(*RichPresence.partyId);
- rp.partyId = partyId.Get();
-
- auto matchSecret = StringCast(*RichPresence.matchSecret);
- rp.matchSecret = matchSecret.Get();
-
- auto joinSecret = StringCast(*RichPresence.joinSecret);
- rp.joinSecret = joinSecret.Get();
-
- auto spectateSecret = StringCast(*RichPresence.spectateSecret);
- rp.spectateSecret = spectateSecret.Get();
- rp.startTimestamp = RichPresence.startTimestamp;
- rp.endTimestamp = RichPresence.endTimestamp;
- rp.partySize = RichPresence.partySize;
- rp.partyMax = RichPresence.partyMax;
- rp.instance = RichPresence.instance;
-
- Discord_UpdatePresence(&rp);
-}
-
-void UDiscordRpc::ClearPresence()
-{
- Discord_ClearPresence();
-}
-
-void UDiscordRpc::Respond(const FString& userId, int reply)
-{
- UE_LOG(Discord, Log, TEXT("Responding %d to join request from %s"), reply, *userId);
- FTCHARToUTF8 utf8_userid(*userId);
- Discord_Respond(utf8_userid.Get(), reply);
-}
diff --git a/deps/discord-rpc/examples/unrealstatus/Plugins/discordrpc/Source/DiscordRpc/Private/DiscordRpcPrivatePCH.h b/deps/discord-rpc/examples/unrealstatus/Plugins/discordrpc/Source/DiscordRpc/Private/DiscordRpcPrivatePCH.h
deleted file mode 100644
index 0c66aba443..0000000000
--- a/deps/discord-rpc/examples/unrealstatus/Plugins/discordrpc/Source/DiscordRpc/Private/DiscordRpcPrivatePCH.h
+++ /dev/null
@@ -1,2 +0,0 @@
-#include "Core.h"
-#include "DiscordRpc.h"
\ No newline at end of file
diff --git a/deps/discord-rpc/examples/unrealstatus/Plugins/discordrpc/Source/DiscordRpc/Public/DiscordRpc.h b/deps/discord-rpc/examples/unrealstatus/Plugins/discordrpc/Source/DiscordRpc/Public/DiscordRpc.h
deleted file mode 100644
index 727833b091..0000000000
--- a/deps/discord-rpc/examples/unrealstatus/Plugins/discordrpc/Source/DiscordRpc/Public/DiscordRpc.h
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.
-
-#pragma once
-
-#include "ModuleManager.h"
-
-class FDiscordRpcModule : public IModuleInterface {
-public:
- /** IModuleInterface implementation */
- virtual void StartupModule() override;
- virtual void ShutdownModule() override;
-
-private:
- /** Handle to the test dll we will load */
- void* DiscordRpcLibraryHandle;
-
- /** StartupModule is covered with defines, these functions are the place to put breakpoints */
- static bool LoadDependency(const FString& Dir, const FString& Name, void*& Handle);
- static void FreeDependency(void*& Handle);
-};
\ No newline at end of file
diff --git a/deps/discord-rpc/examples/unrealstatus/Plugins/discordrpc/Source/DiscordRpc/Public/DiscordRpcBlueprint.h b/deps/discord-rpc/examples/unrealstatus/Plugins/discordrpc/Source/DiscordRpc/Public/DiscordRpcBlueprint.h
deleted file mode 100644
index 17e2f9b29e..0000000000
--- a/deps/discord-rpc/examples/unrealstatus/Plugins/discordrpc/Source/DiscordRpc/Public/DiscordRpcBlueprint.h
+++ /dev/null
@@ -1,169 +0,0 @@
-#pragma once
-
-#include "CoreMinimal.h"
-#include "Engine.h"
-#include "DiscordRpcBlueprint.generated.h"
-
-// unreal's header tool hates clang-format
-// clang-format off
-
-/**
-* Ask to join callback data
-*/
-USTRUCT(BlueprintType)
-struct FDiscordUserData {
- GENERATED_USTRUCT_BODY()
-
- UPROPERTY(BlueprintReadOnly)
- FString userId;
- UPROPERTY(BlueprintReadOnly)
- FString username;
- UPROPERTY(BlueprintReadOnly)
- FString discriminator;
- UPROPERTY(BlueprintReadOnly)
- FString avatar;
-};
-
-/**
-* Valid response codes for Respond function
-*/
-UENUM(BlueprintType)
-enum class EDiscordJoinResponseCodes : uint8
-{
- DISCORD_REPLY_NO UMETA(DisplayName="No"),
- DISCORD_REPLY_YES UMETA(DisplayName="Yes"),
- DISCORD_REPLY_IGNORE UMETA(DisplayName="Ignore")
-};
-
-DECLARE_LOG_CATEGORY_EXTERN(Discord, Log, All);
-
-DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FDiscordConnected, const FDiscordUserData&, joinRequest);
-DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FDiscordDisconnected, int, errorCode, const FString&, errorMessage);
-DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FDiscordErrored, int, errorCode, const FString&, errorMessage);
-DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FDiscordJoin, const FString&, joinSecret);
-DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FDiscordSpectate, const FString&, spectateSecret);
-DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FDiscordJoinRequest, const FDiscordUserData&, joinRequest);
-
-// clang-format on
-
-/**
- * Rich presence data
- */
-USTRUCT(BlueprintType)
-struct FDiscordRichPresence {
- GENERATED_USTRUCT_BODY()
-
- UPROPERTY(BlueprintReadWrite)
- FString state;
- UPROPERTY(BlueprintReadWrite)
- FString details;
- // todo, timestamps are 64bit, does that even matter?
- UPROPERTY(BlueprintReadWrite)
- int startTimestamp;
- UPROPERTY(BlueprintReadWrite)
- int endTimestamp;
- UPROPERTY(BlueprintReadWrite)
- FString largeImageKey;
- UPROPERTY(BlueprintReadWrite)
- FString largeImageText;
- UPROPERTY(BlueprintReadWrite)
- FString smallImageKey;
- UPROPERTY(BlueprintReadWrite)
- FString smallImageText;
- UPROPERTY(BlueprintReadWrite)
- FString partyId;
- UPROPERTY(BlueprintReadWrite)
- int partySize;
- UPROPERTY(BlueprintReadWrite)
- int partyMax;
- UPROPERTY(BlueprintReadWrite)
- FString matchSecret;
- UPROPERTY(BlueprintReadWrite)
- FString joinSecret;
- UPROPERTY(BlueprintReadWrite)
- FString spectateSecret;
- UPROPERTY(BlueprintReadWrite)
- bool instance;
-};
-
-/**
- *
- */
-UCLASS(BlueprintType, meta = (DisplayName = "Discord RPC"), Category = "Discord")
-class DISCORDRPC_API UDiscordRpc : public UObject {
- GENERATED_BODY()
-
-public:
- UFUNCTION(BlueprintCallable,
- meta = (DisplayName = "Initialize connection", Keywords = "Discord rpc"),
- Category = "Discord")
- void Initialize(const FString& applicationId,
- bool autoRegister,
- const FString& optionalSteamId);
-
- UFUNCTION(BlueprintCallable,
- meta = (DisplayName = "Shut down connection", Keywords = "Discord rpc"),
- Category = "Discord")
- void Shutdown();
-
- UFUNCTION(BlueprintCallable,
- meta = (DisplayName = "Check for callbacks", Keywords = "Discord rpc"),
- Category = "Discord")
- void RunCallbacks();
-
- UFUNCTION(BlueprintCallable,
- meta = (DisplayName = "Send presence", Keywords = "Discord rpc"),
- Category = "Discord")
- void UpdatePresence();
-
- UFUNCTION(BlueprintCallable,
- meta = (DisplayName = "Clear presence", Keywords = "Discord rpc"),
- Category = "Discord")
- void ClearPresence();
-
- UFUNCTION(BlueprintCallable,
- meta = (DisplayName = "Respond to join request", Keywords = "Discord rpc"),
- Category = "Discord")
- void Respond(const FString& userId, int reply);
-
- UPROPERTY(BlueprintReadOnly,
- meta = (DisplayName = "Is Discord connected", Keywords = "Discord rpc"),
- Category = "Discord")
- bool IsConnected;
-
- UPROPERTY(BlueprintAssignable,
- meta = (DisplayName = "On connection", Keywords = "Discord rpc"),
- Category = "Discord")
- FDiscordConnected OnConnected;
-
- UPROPERTY(BlueprintAssignable,
- meta = (DisplayName = "On disconnection", Keywords = "Discord rpc"),
- Category = "Discord")
- FDiscordDisconnected OnDisconnected;
-
- UPROPERTY(BlueprintAssignable,
- meta = (DisplayName = "On error message", Keywords = "Discord rpc"),
- Category = "Discord")
- FDiscordErrored OnErrored;
-
- UPROPERTY(BlueprintAssignable,
- meta = (DisplayName = "When Discord user presses join", Keywords = "Discord rpc"),
- Category = "Discord")
- FDiscordJoin OnJoin;
-
- UPROPERTY(BlueprintAssignable,
- meta = (DisplayName = "When Discord user presses spectate", Keywords = "Discord rpc"),
- Category = "Discord")
- FDiscordSpectate OnSpectate;
-
- UPROPERTY(BlueprintAssignable,
- meta = (DisplayName = "When Discord another user sends a join request",
- Keywords = "Discord rpc"),
- Category = "Discord")
- FDiscordJoinRequest OnJoinRequest;
-
- UPROPERTY(BlueprintReadWrite,
- meta = (DisplayName = "Rich presence info", Keywords = "Discord rpc"),
- Category = "Discord")
- FDiscordRichPresence RichPresence;
-};
diff --git a/deps/discord-rpc/examples/unrealstatus/Plugins/discordrpc/Source/ThirdParty/DiscordRpcLibrary/DiscordRpcLibrary.Build.cs b/deps/discord-rpc/examples/unrealstatus/Plugins/discordrpc/Source/ThirdParty/DiscordRpcLibrary/DiscordRpcLibrary.Build.cs
deleted file mode 100644
index ba8d83499f..0000000000
--- a/deps/discord-rpc/examples/unrealstatus/Plugins/discordrpc/Source/ThirdParty/DiscordRpcLibrary/DiscordRpcLibrary.Build.cs
+++ /dev/null
@@ -1,59 +0,0 @@
-// Fill out your copyright notice in the Description page of Project Settings.
-
-using System.IO;
-using UnrealBuildTool;
-
-public class DiscordRpcLibrary : ModuleRules
-{
-#if WITH_FORWARDED_MODULE_RULES_CTOR
- public DiscordRpcLibrary(ReadOnlyTargetRules Target) : base(Target)
-#else
- public DiscordRpcLibrary(TargetInfo Target)
-#endif
- {
- Type = ModuleType.External;
- Definitions.Add("DISCORD_DYNAMIC_LIB=1");
-
- string BaseDirectory = Path.GetFullPath(Path.Combine(ModuleDirectory, "..", "..", "ThirdParty", "DiscordRpcLibrary"));
-
- if (Target.Platform == UnrealTargetPlatform.Win64)
- {
- string lib = Path.Combine(BaseDirectory, "Win64");
-
- // Include headers
- PublicIncludePaths.Add(Path.Combine(BaseDirectory, "Include"));
-
- // Add the import library
- PublicLibraryPaths.Add(lib);
- PublicAdditionalLibraries.Add(Path.Combine(lib, "discord-rpc.lib"));
-
- // Dynamic
- RuntimeDependencies.Add(new RuntimeDependency(Path.Combine(lib, "discord-rpc.dll")));
- PublicDelayLoadDLLs.Add("discord-rpc.dll");
- }
- else if (Target.Platform == UnrealTargetPlatform.Linux)
- {
- string lib = Path.Combine(BaseDirectory, "Linux", "x86_64-unknown-linux-gnu");
-
- // Include headers
- PublicIncludePaths.Add(Path.Combine(BaseDirectory, "Include"));
-
- // Add the import library
- PublicLibraryPaths.Add(lib);
- PublicAdditionalLibraries.Add(Path.Combine(lib, "libdiscord-rpc.so"));
- RuntimeDependencies.Add(new RuntimeDependency(Path.Combine(lib, "libdiscord-rpc.so")));
- }
- else if (Target.Platform == UnrealTargetPlatform.Mac)
- {
- string lib = Path.Combine(BaseDirectory, "Mac");
-
- // Include headers
- PublicIncludePaths.Add(Path.Combine(BaseDirectory, "Include"));
-
- // Add the import library
- PublicLibraryPaths.Add(lib);
- PublicAdditionalLibraries.Add(Path.Combine(lib, "libdiscord-rpc.dylib"));
- RuntimeDependencies.Add(new RuntimeDependency(Path.Combine(lib, "libdiscord-rpc.dylib")));
- }
- }
-}
\ No newline at end of file
diff --git a/deps/discord-rpc/examples/unrealstatus/Source/unrealstatus.Target.cs b/deps/discord-rpc/examples/unrealstatus/Source/unrealstatus.Target.cs
deleted file mode 100644
index 0c7c3c8889..0000000000
--- a/deps/discord-rpc/examples/unrealstatus/Source/unrealstatus.Target.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-// Fill out your copyright notice in the Description page of Project Settings.
-
-using UnrealBuildTool;
-using System.Collections.Generic;
-
-public class unrealstatusTarget : TargetRules
-{
- public unrealstatusTarget(TargetInfo Target) : base(Target)
- {
- Type = TargetType.Game;
-
- ExtraModuleNames.AddRange( new string[] { "unrealstatus" } );
- }
-}
diff --git a/deps/discord-rpc/examples/unrealstatus/Source/unrealstatus/unrealstatus.Build.cs b/deps/discord-rpc/examples/unrealstatus/Source/unrealstatus/unrealstatus.Build.cs
deleted file mode 100644
index 9560370eb0..0000000000
--- a/deps/discord-rpc/examples/unrealstatus/Source/unrealstatus/unrealstatus.Build.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-// Fill out your copyright notice in the Description page of Project Settings.
-
-using UnrealBuildTool;
-
-public class unrealstatus : ModuleRules
-{
- public unrealstatus(ReadOnlyTargetRules Target) : base(Target)
- {
- PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;
-
- PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore" });
-
- PrivateDependencyModuleNames.AddRange(new string[] { });
-
- // Uncomment if you are using Slate UI
- // PrivateDependencyModuleNames.AddRange(new string[] { "Slate", "SlateCore" });
-
- // Uncomment if you are using online features
- // PrivateDependencyModuleNames.Add("OnlineSubsystem");
-
- // To include OnlineSubsystemSteam, add it to the plugins section in your uproject file with the Enabled attribute set to true
- }
-}
diff --git a/deps/discord-rpc/examples/unrealstatus/Source/unrealstatus/unrealstatus.cpp b/deps/discord-rpc/examples/unrealstatus/Source/unrealstatus/unrealstatus.cpp
deleted file mode 100644
index 9dd5388652..0000000000
--- a/deps/discord-rpc/examples/unrealstatus/Source/unrealstatus/unrealstatus.cpp
+++ /dev/null
@@ -1,6 +0,0 @@
-// Fill out your copyright notice in the Description page of Project Settings.
-
-#include "unrealstatus.h"
-#include "Modules/ModuleManager.h"
-
-IMPLEMENT_PRIMARY_GAME_MODULE(FDefaultGameModuleImpl, unrealstatus, "unrealstatus");
diff --git a/deps/discord-rpc/examples/unrealstatus/Source/unrealstatus/unrealstatus.h b/deps/discord-rpc/examples/unrealstatus/Source/unrealstatus/unrealstatus.h
deleted file mode 100644
index 73407dd15a..0000000000
--- a/deps/discord-rpc/examples/unrealstatus/Source/unrealstatus/unrealstatus.h
+++ /dev/null
@@ -1,5 +0,0 @@
-// Fill out your copyright notice in the Description page of Project Settings.
-
-#pragma once
-
-#include "CoreMinimal.h"
diff --git a/deps/discord-rpc/examples/unrealstatus/Source/unrealstatus/unrealstatusGameModeBase.cpp b/deps/discord-rpc/examples/unrealstatus/Source/unrealstatus/unrealstatusGameModeBase.cpp
deleted file mode 100644
index 1af30948cd..0000000000
--- a/deps/discord-rpc/examples/unrealstatus/Source/unrealstatus/unrealstatusGameModeBase.cpp
+++ /dev/null
@@ -1,3 +0,0 @@
-// Fill out your copyright notice in the Description page of Project Settings.
-
-#include "unrealstatusGameModeBase.h"
diff --git a/deps/discord-rpc/examples/unrealstatus/Source/unrealstatus/unrealstatusGameModeBase.h b/deps/discord-rpc/examples/unrealstatus/Source/unrealstatus/unrealstatusGameModeBase.h
deleted file mode 100644
index 8dd9bd4740..0000000000
--- a/deps/discord-rpc/examples/unrealstatus/Source/unrealstatus/unrealstatusGameModeBase.h
+++ /dev/null
@@ -1,15 +0,0 @@
-// Fill out your copyright notice in the Description page of Project Settings.
-
-#pragma once
-
-#include "CoreMinimal.h"
-#include "GameFramework/GameModeBase.h"
-#include "unrealstatusGameModeBase.generated.h"
-
-/**
- *
- */
-UCLASS()
-class UNREALSTATUS_API AunrealstatusGameModeBase : public AGameModeBase {
- GENERATED_BODY()
-};
diff --git a/deps/discord-rpc/examples/unrealstatus/Source/unrealstatusEditor.Target.cs b/deps/discord-rpc/examples/unrealstatus/Source/unrealstatusEditor.Target.cs
deleted file mode 100644
index 2e8ad02286..0000000000
--- a/deps/discord-rpc/examples/unrealstatus/Source/unrealstatusEditor.Target.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-// Fill out your copyright notice in the Description page of Project Settings.
-
-using UnrealBuildTool;
-using System.Collections.Generic;
-
-public class unrealstatusEditorTarget : TargetRules
-{
- public unrealstatusEditorTarget(TargetInfo Target) : base(Target)
- {
- Type = TargetType.Editor;
-
- ExtraModuleNames.AddRange( new string[] { "unrealstatus" } );
- }
-}
diff --git a/deps/discord-rpc/examples/unrealstatus/unrealstatus.uproject b/deps/discord-rpc/examples/unrealstatus/unrealstatus.uproject
deleted file mode 100644
index 8a4a40b4e2..0000000000
--- a/deps/discord-rpc/examples/unrealstatus/unrealstatus.uproject
+++ /dev/null
@@ -1,19 +0,0 @@
-{
- "FileVersion": 3,
- "EngineAssociation": "4.18",
- "Category": "",
- "Description": "",
- "Modules": [
- {
- "Name": "unrealstatus",
- "Type": "Runtime",
- "LoadingPhase": "Default"
- }
- ],
- "TargetPlatforms": [
- "LinuxNoEditor",
- "MacNoEditor",
- "WindowsNoEditor",
- "AllDesktop"
- ]
-}
\ No newline at end of file
diff --git a/deps/discord-rpc/include/discord_register.h b/deps/discord-rpc/include/discord_register.h
index 16fb42f328..3bd96b1f48 100644
--- a/deps/discord-rpc/include/discord_register.h
+++ b/deps/discord-rpc/include/discord_register.h
@@ -1,18 +1,6 @@
#pragma once
-#if defined(DISCORD_DYNAMIC_LIB)
-#if defined(_WIN32)
-#if defined(DISCORD_BUILDING_SDK)
-#define DISCORD_EXPORT __declspec(dllexport)
-#else
-#define DISCORD_EXPORT __declspec(dllimport)
-#endif
-#else
-#define DISCORD_EXPORT __attribute__((visibility("default")))
-#endif
-#else
#define DISCORD_EXPORT
-#endif
#ifdef __cplusplus
extern "C" {
diff --git a/deps/discord-rpc/include/discord_rpc.h b/deps/discord-rpc/include/discord_rpc.h
index 7ca5c4280b..05c562911f 100644
--- a/deps/discord-rpc/include/discord_rpc.h
+++ b/deps/discord-rpc/include/discord_rpc.h
@@ -1,19 +1,20 @@
#pragma once
#include
-// clang-format off
+/* clang-format off */
# define DISCORD_EXPORT
-// clang-format on
+/* clang-format on */
#ifdef __cplusplus
extern "C" {
#endif
-typedef struct DiscordRichPresence {
- const char* state; /* max 128 bytes */
- const char* details; /* max 128 bytes */
+typedef struct DiscordRichPresence
+{
+ const char* state; /* max 128 bytes */
+ const char* details; /* max 128 bytes */
int64_t startTimestamp;
int64_t endTimestamp;
const char* largeImageKey; /* max 32 bytes */
@@ -29,14 +30,16 @@ typedef struct DiscordRichPresence {
int8_t instance;
} DiscordRichPresence;
-typedef struct DiscordUser {
+typedef struct DiscordUser
+{
const char* userId;
const char* username;
const char* discriminator;
const char* avatar;
} DiscordUser;
-typedef struct DiscordEventHandlers {
+typedef struct DiscordEventHandlers
+{
void (*ready)(const DiscordUser* request);
void (*disconnected)(int errorCode, const char* message);
void (*errored)(int errorCode, const char* message);
@@ -58,7 +61,8 @@ DISCORD_EXPORT void Discord_Shutdown(void);
/* checks for incoming messages, dispatches callbacks */
DISCORD_EXPORT void Discord_RunCallbacks(void);
-/* If you disable the lib starting its own io thread, you'll need to call this from your own */
+/* If you disable the lib starting its own I/O thread,
+ * you'll need to call this from your own */
#ifdef DISCORD_DISABLE_IO_THREAD
DISCORD_EXPORT void Discord_UpdateConnection(void);
#endif
@@ -66,7 +70,8 @@ DISCORD_EXPORT void Discord_UpdateConnection(void);
DISCORD_EXPORT void Discord_UpdatePresence(const DiscordRichPresence* presence);
DISCORD_EXPORT void Discord_ClearPresence(void);
-DISCORD_EXPORT void Discord_Respond(const char* userid, /* DISCORD_REPLY_ */ int reply);
+DISCORD_EXPORT void Discord_Respond(const char* userid,
+ /* DISCORD_REPLY_ */ int reply);
DISCORD_EXPORT void Discord_UpdateHandlers(DiscordEventHandlers* handlers);
diff --git a/deps/discord-rpc/src/connection.h b/deps/discord-rpc/src/connection.h
index a8f99b9f10..d3fa231d5e 100644
--- a/deps/discord-rpc/src/connection.h
+++ b/deps/discord-rpc/src/connection.h
@@ -1,11 +1,11 @@
#pragma once
-// This is to wrap the platform specific kinds of connect/read/write.
+/* This is to wrap the platform specific kinds of connect/read/write. */
#include
#include
-// not really connectiony, but need per-platform
+/* not really connectiony, but need per-platform */
int GetProcessId();
struct BaseConnection {
diff --git a/deps/discord-rpc/src/connection_win.cpp b/deps/discord-rpc/src/connection_win.cpp
index 4398e255e0..76ac52d08e 100644
--- a/deps/discord-rpc/src/connection_win.cpp
+++ b/deps/discord-rpc/src/connection_win.cpp
@@ -4,7 +4,6 @@
#define NOMCX
#define NOSERVICE
#define NOIME
-#include
#include
int GetProcessId()
@@ -48,7 +47,7 @@ bool BaseConnection::Open()
return true;
}
- auto lastError = GetLastError();
+ DWORD lastError = GetLastError();
if (lastError == ERROR_FILE_NOT_FOUND)
{
if (pipeName[pipeDigit] < L'9')
@@ -71,26 +70,24 @@ bool BaseConnection::Close()
{
auto self = reinterpret_cast(this);
::CloseHandle(self->pipe);
- self->pipe = INVALID_HANDLE_VALUE;
+ self->pipe = INVALID_HANDLE_VALUE;
self->isOpen = false;
return true;
}
bool BaseConnection::Write(const void* data, size_t length)
{
+ DWORD bytesWritten = 0;
+ const DWORD bytesLength = (DWORD)length;
if (length == 0)
return true;
auto self = reinterpret_cast(this);
- assert(self);
if (!self)
return false;
if (self->pipe == INVALID_HANDLE_VALUE)
return false;
- assert(data);
if (!data)
return false;
- const DWORD bytesLength = (DWORD)length;
- DWORD bytesWritten = 0;
return ::WriteFile(self->pipe, data, bytesLength,
&bytesWritten, nullptr) == TRUE &&
bytesWritten == bytesLength;
@@ -98,27 +95,27 @@ bool BaseConnection::Write(const void* data, size_t length)
bool BaseConnection::Read(void* data, size_t length)
{
- assert(data);
+ DWORD bytesAvailable = 0;
if (!data)
return false;
auto self = reinterpret_cast(this);
- assert(self);
if (!self)
return false;
if (self->pipe == INVALID_HANDLE_VALUE)
return false;
- DWORD bytesAvailable = 0;
- if (::PeekNamedPipe(self->pipe, nullptr, 0, nullptr, &bytesAvailable, nullptr)) {
+
+ if (::PeekNamedPipe(self->pipe, nullptr, 0, nullptr,
+ &bytesAvailable, nullptr))
+ {
if (bytesAvailable >= length)
{
DWORD bytesToRead = (DWORD)length;
- DWORD bytesRead = 0;
- if (::ReadFile(self->pipe, data, bytesToRead, &bytesRead, nullptr) == TRUE) {
- assert(bytesToRead == bytesRead);
+ DWORD bytesRead = 0;
+ if (::ReadFile(self->pipe, data, bytesToRead,
+ &bytesRead, nullptr) == TRUE)
return true;
- }
- else
- Close();
+
+ Close();
}
}
else
diff --git a/deps/discord-rpc/src/discord_register_linux.c b/deps/discord-rpc/src/discord_register_linux.c
index 3a869cdcbe..8eec618cb3 100644
--- a/deps/discord-rpc/src/discord_register_linux.c
+++ b/deps/discord-rpc/src/discord_register_linux.c
@@ -10,16 +10,8 @@
#include
#include
-
-static bool Mkdir(const char* path)
-{
- int result = mkdir(path, 0755);
- if (result == 0)
- return true;
- if (errno == EEXIST)
- return true;
- return false;
-}
+#include
+#include
/* we want to register games so we can run them from
* Discord client as discord-:// */
@@ -64,15 +56,15 @@ void Discord_Register(const char* applicationId, const char* command)
snprintf(desktopFilename, sizeof(desktopFilename), "/discord-%s.desktop", applicationId);
snprintf(desktopFilePath, sizeof(desktopFilePath), "%s/.local", home);
- if (!Mkdir(desktopFilePath))
+ if (!path_mkdir(desktopFilePath))
return;
- strcat(desktopFilePath, "/share");
- if (!Mkdir(desktopFilePath))
+ strlcat(desktopFilePath, "/share", sizeof(desktopFilePath));
+ if (!path_mkdir(desktopFilePath))
return;
- strcat(desktopFilePath, "/applications");
- if (!Mkdir(desktopFilePath))
+ strlcat(desktopFilePath, "/applications", sizeof(desktopFilePath));
+ if (!path_mkdir(desktopFilePath))
return;
- strcat(desktopFilePath, desktopFilename);
+ strlcat(desktopFilePath, desktopFilename, sizeof(desktopFilePath));
fp = fopen(desktopFilePath, "w");
if (!fp)
@@ -95,6 +87,6 @@ void Discord_RegisterSteamGame(
const char* steamId)
{
char command[256];
- sprintf(command, "xdg-open steam://rungameid/%s", steamId);
+ snprintf(command, sizeof(command), "xdg-open steam://rungameid/%s", steamId);
Discord_Register(applicationId, command);
}
diff --git a/deps/discord-rpc/src/discord_register_osx.m b/deps/discord-rpc/src/discord_register_osx.m
index 3649c3bc78..4975565296 100644
--- a/deps/discord-rpc/src/discord_register_osx.m
+++ b/deps/discord-rpc/src/discord_register_osx.m
@@ -7,26 +7,26 @@
static void RegisterCommand(const char* applicationId, const char* command)
{
- // There does not appear to be a way to register arbitrary commands on OSX, so instead we'll save the command
- // to a file in the Discord config path, and when it is needed, Discord can try to load the file there, open
- // the command therein (will pass to js's window.open, so requires a url-like thing)
+ /* There does not appear to be a way to register arbitrary commands on OSX, so instead we'll save the command
+ * to a file in the Discord config path, and when it is needed, Discord can try to load the file there, open
+ * the command therein (will pass to js's window.open, so requires a url-like thing)
+ */
- // Note: will not work for sandboxed apps
- NSString *home = NSHomeDirectory();
- if (!home) {
- return;
- }
+ /* Note: will not work for sandboxed apps */
+ NSString *home = NSHomeDirectory();
+ if (!home)
+ return;
- NSString *path = [[[[[[home stringByAppendingPathComponent:@"Library"]
- stringByAppendingPathComponent:@"Application Support"]
- stringByAppendingPathComponent:@"discord"]
- stringByAppendingPathComponent:@"games"]
- stringByAppendingPathComponent:[NSString stringWithUTF8String:applicationId]]
- stringByAppendingPathExtension:@"json"];
- [[NSFileManager defaultManager] createDirectoryAtPath:[path stringByDeletingLastPathComponent] withIntermediateDirectories:YES attributes:nil error:nil];
+ NSString *path = [[[[[[home stringByAppendingPathComponent:@"Library"]
+ stringByAppendingPathComponent:@"Application Support"]
+ stringByAppendingPathComponent:@"discord"]
+ stringByAppendingPathComponent:@"games"]
+ stringByAppendingPathComponent:[NSString stringWithUTF8String:applicationId]]
+ stringByAppendingPathExtension:@"json"];
+ [[NSFileManager defaultManager] createDirectoryAtPath:[path stringByDeletingLastPathComponent] withIntermediateDirectories:YES attributes:nil error:nil];
- NSString *jsonBuffer = [NSString stringWithFormat:@"{\"command\": \"%s\"}", command];
- [jsonBuffer writeToFile:path atomically:NO encoding:NSUTF8StringEncoding error:nil];
+ NSString *jsonBuffer = [NSString stringWithFormat:@"{\"command\": \"%s\"}", command];
+ [jsonBuffer writeToFile:path atomically:NO encoding:NSUTF8StringEncoding error:nil];
}
static void RegisterURL(const char* applicationId)
@@ -34,38 +34,42 @@ static void RegisterURL(const char* applicationId)
char url[256];
snprintf(url, sizeof(url), "discord-%s", applicationId);
CFStringRef cfURL = CFStringCreateWithCString(NULL, url, kCFStringEncodingUTF8);
-
NSString* myBundleId = [[NSBundle mainBundle] bundleIdentifier];
- if (!myBundleId) {
+
+ if (!myBundleId)
+ {
fprintf(stderr, "No bundle id found\n");
return;
}
NSURL* myURL = [[NSBundle mainBundle] bundleURL];
- if (!myURL) {
+ if (!myURL)
+ {
fprintf(stderr, "No bundle url found\n");
return;
}
OSStatus status = LSSetDefaultHandlerForURLScheme(cfURL, (__bridge CFStringRef)myBundleId);
- if (status != noErr) {
+ if (status != noErr)
+ {
fprintf(stderr, "Error in LSSetDefaultHandlerForURLScheme: %d\n", (int)status);
return;
}
status = LSRegisterURL((__bridge CFURLRef)myURL, true);
- if (status != noErr) {
+ if (status != noErr)
+ {
fprintf(stderr, "Error in LSRegisterURL: %d\n", (int)status);
}
}
void Discord_Register(const char* applicationId, const char* command)
{
- if (command) {
+ if (command)
RegisterCommand(applicationId, command);
- }
- else {
- // raii lite
+ else
+ {
+ /* RAII Lite */
@autoreleasepool {
RegisterURL(applicationId);
}
@@ -75,6 +79,6 @@ void Discord_Register(const char* applicationId, const char* command)
void Discord_RegisterSteamGame(const char* applicationId, const char* steamId)
{
char command[256];
- snprintf(command, 256, "steam://rungameid/%s", steamId);
+ snprintf(command, sizeof(command), "steam://rungameid/%s", steamId);
Discord_Register(applicationId, command);
}
diff --git a/deps/discord-rpc/src/discord_rpc.cpp b/deps/discord-rpc/src/discord_rpc.cpp
index 957b4e6897..f430746e83 100644
--- a/deps/discord-rpc/src/discord_rpc.cpp
+++ b/deps/discord-rpc/src/discord_rpc.cpp
@@ -34,17 +34,20 @@ struct QueuedMessage
struct User
{
- // snowflake (64bit int), turned into a ascii decimal string, at most 20 chars +1 null
- // terminator = 21
+ /* snowflake (64bit int), turned into a ASCII decimal string,
+ * at most 20 chars +1 null
+ * terminator = 21 */
char userId[32];
- // 32 unicode glyphs is max name size => 4 bytes per glyph in the worst case, +1 for null
- // terminator = 129
+ /* 32 unicode glyphs is max name size => 4 bytes per glyph
+ * in the worst case, +1 for null
+ * terminator = 129 */
char username[344];
- // 4 decimal digits + 1 null terminator = 5
+ /* 4 decimal digits + 1 null terminator = 5 */
char discriminator[8];
- // optional 'a_' + md5 hex digest (32 bytes) + null terminator = 35
+ /* optional 'a_' + md5 hex digest (32 bytes) + null terminator = 35 */
char avatar[128];
- // Rounded way up because I'm paranoid about games breaking from future changes in these sizes
+ /* Rounded way up because I'm paranoid about games breaking
+ * from future changes in these sizes */
};
static RpcConnection* Connection{nullptr};
@@ -68,8 +71,9 @@ static MsgQueue SendQueue;
static MsgQueue JoinAskQueue;
static User connectedUser;
-// We want to auto connect, and retry on failure, but not as fast as possible. This does expoential
-// backoff from 0.5 seconds to 1 minute
+/* We want to auto connect, and retry on failure,
+ * but not as fast as possible. This does exponential
+ * backoff from 0.5 seconds to 1 minute */
static Backoff ReconnectTimeMs(500, 60 * 1000);
static auto NextConnect = std::chrono::system_clock::now();
static int Pid{0};
@@ -118,7 +122,8 @@ public:
void Stop() {}
void Notify() {}
};
-#endif // DISCORD_DISABLE_IO_THREAD
+#endif /* DISCORD_DISABLE_IO_THREAD */
+
static IoThreadHolder* IoThread{nullptr};
static void UpdateReconnectTime()
@@ -146,7 +151,7 @@ static void Discord_UpdateConnection(void)
}
else
{
- // reads
+ /* reads */
for (;;)
{
@@ -160,7 +165,8 @@ static void Discord_UpdateConnection(void)
if (nonce)
{
- // in responses only -- should use to match up response when needed.
+ /* in responses only --
+ * should use to match up response when needed. */
if (evtName && strcmp(evtName, "ERROR") == 0)
{
@@ -172,8 +178,8 @@ static void Discord_UpdateConnection(void)
}
else
{
- // should have evt == name of event, optional data
- if (evtName == nullptr)
+ /* should have evt == name of event, optional data */
+ if (!evtName)
continue;
auto data = GetObjMember(&message, "data");
@@ -198,11 +204,12 @@ static void Discord_UpdateConnection(void)
}
else if (strcmp(evtName, "ACTIVITY_JOIN_REQUEST") == 0)
{
- auto user = GetObjMember(data, "user");
- auto userId = GetStrMember(user, "id");
+ auto user = GetObjMember(data, "user");
+ auto userId = GetStrMember(user, "id");
auto username = GetStrMember(user, "username");
- auto avatar = GetStrMember(user, "avatar");
- auto joinReq = JoinAskQueue.GetNextAddMessage();
+ auto avatar = GetStrMember(user, "avatar");
+ auto joinReq = JoinAskQueue.GetNextAddMessage();
+
if (userId && username && joinReq)
{
StringCopy(joinReq->userId, userId);
@@ -220,7 +227,7 @@ static void Discord_UpdateConnection(void)
}
}
- // writes
+ /* writes */
if (QueuedPresence.length)
{
QueuedMessage local;
@@ -229,8 +236,9 @@ static void Discord_UpdateConnection(void)
local.Copy(QueuedPresence);
QueuedPresence.length = 0;
}
- if (!Connection->Write(local.buffer, local.length)) {
- // if we fail to send, requeue
+ if (!Connection->Write(local.buffer, local.length))
+ {
+ /* if we fail to send, requeue */
std::lock_guard guard(PresenceMutex);
QueuedPresence.Copy(local);
}
@@ -263,7 +271,8 @@ static bool RegisterForEvent(const char* evtName)
static bool DeregisterForEvent(const char* evtName)
{
auto qmessage = SendQueue.GetNextAddMessage();
- if (qmessage) {
+ if (qmessage)
+ {
qmessage->length =
JsonWriteUnsubscribeCommand(qmessage->buffer, sizeof(qmessage->buffer), Nonce++, evtName);
SendQueue.CommitAdd();
@@ -274,13 +283,14 @@ static bool DeregisterForEvent(const char* evtName)
return false;
}
-extern "C" DISCORD_EXPORT void Discord_Initialize(const char* applicationId,
- DiscordEventHandlers* handlers,
- int autoRegister,
- const char* optionalSteamId)
+extern "C" DISCORD_EXPORT void Discord_Initialize(
+ const char* applicationId,
+ DiscordEventHandlers* handlers,
+ int autoRegister,
+ const char* optionalSteamId)
{
IoThread = new (std::nothrow) IoThreadHolder();
- if (IoThread == nullptr)
+ if (!IoThread)
return;
if (autoRegister)
@@ -353,7 +363,7 @@ extern "C" DISCORD_EXPORT void Discord_Shutdown(void)
Connection->onConnect = nullptr;
Connection->onDisconnect = nullptr;
Handlers = {};
- if (IoThread != nullptr)
+ if (IoThread)
{
IoThread->Stop();
delete IoThread;
@@ -382,7 +392,7 @@ extern "C" DISCORD_EXPORT void Discord_ClearPresence(void)
extern "C" DISCORD_EXPORT void Discord_Respond(const char* userId, /* DISCORD_REPLY_ */ int reply)
{
- // if we are not connected, let's not batch up stale messages for later
+ /* if we are not connected, let's not batch up stale messages for later */
if (!Connection || !Connection->IsOpen())
return;
auto qmessage = SendQueue.GetNextAddMessage();
@@ -398,9 +408,10 @@ extern "C" DISCORD_EXPORT void Discord_Respond(const char* userId, /* DISCORD_RE
extern "C" DISCORD_EXPORT void Discord_RunCallbacks(void)
{
- // Note on some weirdness: internally we might connect, get other signals, disconnect any number
- // of times inbetween calls here. Externally, we want the sequence to seem sane, so any other
- // signals are book-ended by calls to ready and disconnect.
+ /* Note on some weirdness: internally we might connect, get other signals, disconnect any number
+ * of times inbetween calls here. Externally, we want the sequence to seem sane, so any other
+ * signals are book-ended by calls to ready and disconnect.
+ */
if (!Connection)
return;
@@ -410,7 +421,7 @@ extern "C" DISCORD_EXPORT void Discord_RunCallbacks(void)
if (isConnected)
{
- // if we are connected, disconnect cb first
+ /* if we are connected, disconnect cb first */
std::lock_guard guard(HandlerMutex);
if (wasDisconnected && Handlers.disconnected)
Handlers.disconnected(LastDisconnectErrorCode, LastDisconnectErrorMessage);
@@ -450,11 +461,12 @@ extern "C" DISCORD_EXPORT void Discord_RunCallbacks(void)
Handlers.spectateGame(SpectateGameSecret);
}
- // Right now this batches up any requests and sends them all in a burst; I could imagine a world
- // where the implementer would rather sequentially accept/reject each one before the next invite
- // is sent. I left it this way because I could also imagine wanting to process these all and
- // maybe show them in one common dialog and/or start fetching the avatars in parallel, and if
- // not it should be trivial for the implementer to make a queue themselves.
+ /* Right now this batches up any requests and sends them all in a burst; I could imagine a world
+ * where the implementer would rather sequentially accept/reject each one before the next invite
+ * is sent. I left it this way because I could also imagine wanting to process these all and
+ * maybe show them in one common dialog and/or start fetching the avatars in parallel, and if
+ * not it should be trivial for the implementer to make a queue themselves.
+ */
while (JoinAskQueue.HavePendingSends())
{
auto req = JoinAskQueue.GetNextSendMessage();
@@ -471,7 +483,7 @@ extern "C" DISCORD_EXPORT void Discord_RunCallbacks(void)
if (!isConnected)
{
- // if we are not connected, disconnect message last
+ /* if we are not connected, disconnect message last */
std::lock_guard guard(HandlerMutex);
if (wasDisconnected && Handlers.disconnected)
Handlers.disconnected(LastDisconnectErrorCode, LastDisconnectErrorMessage);
diff --git a/deps/discord-rpc/src/rpc_connection.cpp b/deps/discord-rpc/src/rpc_connection.cpp
index 9e11b7ee4b..f93cb66278 100644
--- a/deps/discord-rpc/src/rpc_connection.cpp
+++ b/deps/discord-rpc/src/rpc_connection.cpp
@@ -54,7 +54,8 @@ void RpcConnection::Open()
sendFrame.length = (uint32_t)JsonWriteHandshakeObj(
sendFrame.message, sizeof(sendFrame.message), RpcVersion, appId);
- if (connection->Write(&sendFrame, sizeof(MessageFrameHeader) + sendFrame.length))
+ if (connection->Write(&sendFrame,
+ sizeof(MessageFrameHeader) + sendFrame.length))
state = State::SentHandshake;
else
Close();
@@ -84,12 +85,16 @@ bool RpcConnection::Write(const void* data, size_t length)
bool RpcConnection::Read(JsonDocument& message)
{
+ MessageFrame readFrame;
+
if (state != State::Connected && state != State::SentHandshake)
return false;
- MessageFrame readFrame;
+
for (;;)
{
- bool didRead = connection->Read(&readFrame, sizeof(MessageFrameHeader));
+ bool didRead = connection->Read(
+ &readFrame, sizeof(MessageFrameHeader));
+
if (!didRead)
{
if (!connection->isOpen)
@@ -117,13 +122,11 @@ bool RpcConnection::Read(JsonDocument& message)
switch (readFrame.opcode)
{
case Opcode::Close:
- {
- message.ParseInsitu(readFrame.message);
- lastErrorCode = GetIntMember(&message, "code");
- StringCopy(lastErrorMessage, GetStrMember(&message, "message", ""));
- Close();
- return false;
- }
+ message.ParseInsitu(readFrame.message);
+ lastErrorCode = GetIntMember(&message, "code");
+ StringCopy(lastErrorMessage, GetStrMember(&message, "message", ""));
+ Close();
+ return false;
case Opcode::Frame:
message.ParseInsitu(readFrame.message);
return true;
@@ -136,7 +139,7 @@ bool RpcConnection::Read(JsonDocument& message)
break;
case Opcode::Handshake:
default:
- // something bad happened
+ /* something bad happened */
lastErrorCode = (int)ErrorCode::ReadCorrupt;
StringCopy(lastErrorMessage, "Bad ipc frame");
Close();
diff --git a/deps/discord-rpc/src/rpc_connection.h b/deps/discord-rpc/src/rpc_connection.h
index bbdd05c792..a4ccb82638 100644
--- a/deps/discord-rpc/src/rpc_connection.h
+++ b/deps/discord-rpc/src/rpc_connection.h
@@ -3,57 +3,63 @@
#include "connection.h"
#include "serialization.h"
-// I took this from the buffer size libuv uses for named pipes; I suspect ours would usually be much
-// smaller.
+/* I took this from the buffer size libuv uses for named pipes;
+ * I suspect ours would usually be much smaller. */
constexpr size_t MaxRpcFrameSize = 64 * 1024;
-struct RpcConnection {
- enum class ErrorCode : int {
- Success = 0,
- PipeClosed = 1,
- ReadCorrupt = 2,
- };
+struct RpcConnection
+{
+ enum class ErrorCode : int
+ {
+ Success = 0,
+ PipeClosed = 1,
+ ReadCorrupt = 2,
+ };
- enum class Opcode : uint32_t {
- Handshake = 0,
- Frame = 1,
- Close = 2,
- Ping = 3,
- Pong = 4,
- };
+ enum class Opcode : uint32_t
+ {
+ Handshake = 0,
+ Frame = 1,
+ Close = 2,
+ Ping = 3,
+ Pong = 4,
+ };
- struct MessageFrameHeader {
- Opcode opcode;
- uint32_t length;
- };
+ struct MessageFrameHeader
+ {
+ Opcode opcode;
+ uint32_t length;
+ };
- struct MessageFrame : public MessageFrameHeader {
- char message[MaxRpcFrameSize - sizeof(MessageFrameHeader)];
- };
+ struct MessageFrame : public MessageFrameHeader
+ {
+ char message[MaxRpcFrameSize - sizeof(MessageFrameHeader)];
+ };
- enum class State : uint32_t {
- Disconnected,
- SentHandshake,
- AwaitingResponse,
- Connected,
- };
+ enum class State : uint32_t
+ {
+ Disconnected,
+ SentHandshake,
+ AwaitingResponse,
+ Connected,
+ };
- BaseConnection* connection{nullptr};
- State state{State::Disconnected};
- void (*onConnect)(JsonDocument& message){nullptr};
- void (*onDisconnect)(int errorCode, const char* message){nullptr};
- char appId[64]{};
- int lastErrorCode{0};
- char lastErrorMessage[256]{};
- RpcConnection::MessageFrame sendFrame;
+ BaseConnection* connection{nullptr};
+ State state{State::Disconnected};
+ void (*onConnect)(JsonDocument& message){nullptr};
+ void (*onDisconnect)(int errorCode, const char* message){nullptr};
+ char appId[64]{};
+ int lastErrorCode{0};
+ char lastErrorMessage[256]{};
+ RpcConnection::MessageFrame sendFrame;
- static RpcConnection* Create(const char* applicationId);
- static void Destroy(RpcConnection*&);
+ static RpcConnection* Create(const char* applicationId);
+ static void Destroy(RpcConnection*&);
- inline bool IsOpen() const { return state == State::Connected; }
+ inline bool IsOpen() const { return state == State::Connected; }
- void Open();
- void Close();
- bool Write(const void* data, size_t length);
- bool Read(JsonDocument& message);
+ void Open();
+ void Close();
+ bool Write(const void* data, size_t length);
+ bool Read(JsonDocument& message);
};
diff --git a/deps/discord-rpc/src/serialization.cpp b/deps/discord-rpc/src/serialization.cpp
index 6cc1e9013d..bcf7aa2624 100644
--- a/deps/discord-rpc/src/serialization.cpp
+++ b/deps/discord-rpc/src/serialization.cpp
@@ -5,25 +5,30 @@
template
void NumberToString(char* dest, T number)
{
- if (!number) {
+ char temp[32];
+ int place = 0;
+
+ if (!number)
+ {
*dest++ = '0';
*dest++ = 0;
return;
}
- if (number < 0) {
+
+ if (number < 0)
+ {
*dest++ = '-';
number = -number;
}
- char temp[32];
- int place = 0;
- while (number) {
+
+ while (number)
+ {
auto digit = number % 10;
number = number / 10;
temp[place++] = '0' + (char)digit;
}
- for (--place; place >= 0; --place) {
+ for (--place; place >= 0; --place)
*dest++ = temp[place];
- }
*dest = 0;
}
@@ -66,7 +71,8 @@ struct WriteArray {
template
void WriteOptionalString(JsonWriter& w, T& k, const char* value)
{
- if (value && value[0]) {
+ if (value && value[0])
+ {
w.Key(k, sizeof(T) - 1);
w.String(value);
}
@@ -74,8 +80,8 @@ void WriteOptionalString(JsonWriter& w, T& k, const char* value)
static void JsonWriteNonce(JsonWriter& writer, int nonce)
{
- WriteKey(writer, "nonce");
char nonceBuffer[32];
+ WriteKey(writer, "nonce");
NumberToString(nonceBuffer, nonce);
writer.String(nonceBuffer);
}
@@ -102,24 +108,28 @@ size_t JsonWriteRichPresenceObj(char* dest,
WriteKey(writer, "pid");
writer.Int(pid);
- if (presence != nullptr) {
+ if (presence)
+ {
WriteObject activity(writer, "activity");
WriteOptionalString(writer, "state", presence->state);
WriteOptionalString(writer, "details", presence->details);
- if (presence->startTimestamp || presence->endTimestamp) {
- WriteObject timestamps(writer, "timestamps");
+ if (presence->startTimestamp || presence->endTimestamp)
+ {
+ WriteObject timestamps(writer, "timestamps");
- if (presence->startTimestamp) {
- WriteKey(writer, "start");
- writer.Int64(presence->startTimestamp);
- }
+ if (presence->startTimestamp)
+ {
+ WriteKey(writer, "start");
+ writer.Int64(presence->startTimestamp);
+ }
- if (presence->endTimestamp) {
- WriteKey(writer, "end");
- writer.Int64(presence->endTimestamp);
- }
+ if (presence->endTimestamp)
+ {
+ WriteKey(writer, "end");
+ writer.Int64(presence->endTimestamp);
+ }
}
if ((presence->largeImageKey && presence->largeImageKey[0]) ||
@@ -133,20 +143,25 @@ size_t JsonWriteRichPresenceObj(char* dest,
WriteOptionalString(writer, "small_text", presence->smallImageText);
}
- if ((presence->partyId && presence->partyId[0]) || presence->partySize ||
- presence->partyMax) {
- WriteObject party(writer, "party");
- WriteOptionalString(writer, "id", presence->partyId);
- if (presence->partySize && presence->partyMax) {
- WriteArray size(writer, "size");
- writer.Int(presence->partySize);
- writer.Int(presence->partyMax);
- }
+ if ((
+ presence->partyId && presence->partyId[0]) ||
+ presence->partySize ||
+ presence->partyMax)
+ {
+ WriteObject party(writer, "party");
+ WriteOptionalString(writer, "id", presence->partyId);
+ if (presence->partySize && presence->partyMax)
+ {
+ WriteArray size(writer, "size");
+ writer.Int(presence->partySize);
+ writer.Int(presence->partyMax);
+ }
}
if ((presence->matchSecret && presence->matchSecret[0]) ||
(presence->joinSecret && presence->joinSecret[0]) ||
- (presence->spectateSecret && presence->spectateSecret[0])) {
+ (presence->spectateSecret && presence->spectateSecret[0]))
+ {
WriteObject secrets(writer, "secrets");
WriteOptionalString(writer, "match", presence->matchSecret);
WriteOptionalString(writer, "join", presence->joinSecret);
@@ -223,12 +238,10 @@ size_t JsonWriteJoinReply(char* dest, size_t maxLen, const char* userId, int rep
WriteObject obj(writer);
WriteKey(writer, "cmd");
- if (reply == DISCORD_REPLY_YES) {
+ if (reply == DISCORD_REPLY_YES)
writer.String("SEND_ACTIVITY_JOIN_INVITE");
- }
- else {
+ else
writer.String("CLOSE_ACTIVITY_JOIN_REQUEST");
- }
WriteKey(writer, "args");
{
diff --git a/deps/discord-rpc/src/serialization.h b/deps/discord-rpc/src/serialization.h
index da03adbcf1..d1aaa8109e 100644
--- a/deps/discord-rpc/src/serialization.h
+++ b/deps/discord-rpc/src/serialization.h
@@ -5,12 +5,12 @@
#ifdef _MSC_VER
#pragma warning(push)
-#pragma warning(disable : 4061) // enum is not explicitly handled by a case label
-#pragma warning(disable : 4365) // signed/unsigned mismatch
-#pragma warning(disable : 4464) // relative include path contains
-#pragma warning(disable : 4668) // is not defined as a preprocessor macro
-#pragma warning(disable : 6313) // Incorrect operator
-#endif // _MSC_VER
+#pragma warning(disable : 4061) /* enum is not explicitly handled by a case label */
+#pragma warning(disable : 4365) /* signed/unsigned mismatch */
+#pragma warning(disable : 4464) /* relative include path contains */
+#pragma warning(disable : 4668) /* is not defined as a preprocessor macro */
+#pragma warning(disable : 6313) /* Incorrect operator */
+#endif /* _MSC_VER */
#include "rapidjson/document.h"
#include "rapidjson/stringbuffer.h"
@@ -18,27 +18,26 @@
#ifdef _MSC_VER
#pragma warning(pop)
-#endif // _MSC_VER
+#endif /* _MSC_VER */
-// if only there was a standard library function for this
+/* if only there was a standard library function for this */
template
inline size_t StringCopy(char (&dest)[Len], const char* src)
{
- if (!src || !Len) {
- return 0;
- }
size_t copied;
char* out = dest;
- for (copied = 1; *src && copied < Len; ++copied) {
+ if (!src || !Len)
+ return 0;
+ for (copied = 1; *src && copied < Len; ++copied)
*out++ = *src++;
- }
*out = 0;
return copied - 1;
}
-size_t JsonWriteHandshakeObj(char* dest, size_t maxLen, int version, const char* applicationId);
+size_t JsonWriteHandshakeObj(char* dest, size_t maxLen,
+ int version, const char* applicationId);
-// Commands
+/* Commands */
struct DiscordRichPresence;
size_t JsonWriteRichPresenceObj(char* dest,
size_t maxLen,
@@ -51,50 +50,42 @@ size_t JsonWriteUnsubscribeCommand(char* dest, size_t maxLen, int nonce, const c
size_t JsonWriteJoinReply(char* dest, size_t maxLen, const char* userId, int reply, int nonce);
-// I want to use as few allocations as I can get away with, and to do that with RapidJson, you need
-// to supply some of your own allocators for stuff rather than use the defaults
+/* I want to use as few allocations as I can get away with, and to do that with RapidJson, you need
+ * to supply some of your own allocators for stuff rather than use the defaults
+ */
-class LinearAllocator {
-public:
- char* buffer_;
- char* end_;
- LinearAllocator()
- {
- assert(0); // needed for some default case in rapidjson, should not use
- }
- LinearAllocator(char* buffer, size_t size)
- : buffer_(buffer)
- , end_(buffer + size)
- {
- }
- static const bool kNeedFree = false;
- void* Malloc(size_t size)
- {
- char* res = buffer_;
- buffer_ += size;
- if (buffer_ > end_) {
+class LinearAllocator
+{
+ public:
+ char* buffer_;
+ char* end_;
+ LinearAllocator() { }
+ LinearAllocator(char* buffer, size_t size)
+ : buffer_(buffer)
+ , end_(buffer + size) { }
+ static const bool kNeedFree = false;
+ void* Malloc(size_t size)
+ {
+ char* res = buffer_;
+ buffer_ += size;
+ if (buffer_ > end_)
+ {
buffer_ = res;
return nullptr;
- }
- return res;
- }
- void* Realloc(void* originalPtr, size_t originalSize, size_t newSize)
- {
- if (newSize == 0) {
+ }
+ return res;
+ }
+ void* Realloc(void* originalPtr, size_t originalSize, size_t newSize)
+ {
+ if (newSize == 0)
return nullptr;
- }
- // allocate how much you need in the first place
- assert(!originalPtr && !originalSize);
- // unused parameter warning
- (void)(originalPtr);
- (void)(originalSize);
- return Malloc(newSize);
- }
- static void Free(void* ptr)
- {
- /* shrug */
- (void)ptr;
- }
+ return Malloc(newSize);
+ }
+ static void Free(void* ptr)
+ {
+ /* shrug */
+ (void)ptr;
+ }
};
template
@@ -102,13 +93,11 @@ class FixedLinearAllocator : public LinearAllocator {
public:
char fixedBuffer_[Size];
FixedLinearAllocator()
- : LinearAllocator(fixedBuffer_, Size)
- {
- }
+ : LinearAllocator(fixedBuffer_, Size) { }
static const bool kNeedFree = false;
};
-// wonder why this isn't a thing already, maybe I missed it
+/* wonder why this isn't a thing already, maybe I missed it */
class DirectStringBuffer {
public:
using Ch = char;
@@ -119,15 +108,12 @@ public:
DirectStringBuffer(char* buffer, size_t maxLen)
: buffer_(buffer)
, end_(buffer + maxLen)
- , current_(buffer)
- {
- }
+ , current_(buffer) { }
void Put(char c)
{
- if (current_ < end_) {
- *current_++ = c;
- }
+ if (current_ < end_)
+ *current_++ = c;
}
void Flush() {}
size_t GetSize() const { return (size_t)(current_ - buffer_); }
@@ -136,80 +122,84 @@ public:
using MallocAllocator = rapidjson::CrtAllocator;
using PoolAllocator = rapidjson::MemoryPoolAllocator;
using UTF8 = rapidjson::UTF8;
-// Writer appears to need about 16 bytes per nested object level (with 64bit size_t)
+/* Writer appears to need about 16 bytes per nested object level (with 64bit size_t) */
using StackAllocator = FixedLinearAllocator<2048>;
constexpr size_t WriterNestingLevels = 2048 / (2 * sizeof(size_t));
using JsonWriterBase =
rapidjson::Writer;
-class JsonWriter : public JsonWriterBase {
-public:
- DirectStringBuffer stringBuffer_;
- StackAllocator stackAlloc_;
+class JsonWriter : public JsonWriterBase
+{
+ public:
+ DirectStringBuffer stringBuffer_;
+ StackAllocator stackAlloc_;
- JsonWriter(char* dest, size_t maxLen)
- : JsonWriterBase(stringBuffer_, &stackAlloc_, WriterNestingLevels)
- , stringBuffer_(dest, maxLen)
- , stackAlloc_()
- {
- }
+ JsonWriter(char* dest, size_t maxLen)
+ : JsonWriterBase(stringBuffer_, &stackAlloc_, WriterNestingLevels)
+ , stringBuffer_(dest, maxLen)
+ , stackAlloc_()
+ {
+ }
- size_t Size() const { return stringBuffer_.GetSize(); }
+ size_t Size() const { return stringBuffer_.GetSize(); }
};
using JsonDocumentBase = rapidjson::GenericDocument;
-class JsonDocument : public JsonDocumentBase {
-public:
- static const int kDefaultChunkCapacity = 32 * 1024;
- // json parser will use this buffer first, then allocate more if needed; I seriously doubt we
- // send any messages that would use all of this, though.
- char parseBuffer_[32 * 1024];
- MallocAllocator mallocAllocator_;
- PoolAllocator poolAllocator_;
- StackAllocator stackAllocator_;
- JsonDocument()
- : JsonDocumentBase(rapidjson::kObjectType,
- &poolAllocator_,
- sizeof(stackAllocator_.fixedBuffer_),
- &stackAllocator_)
- , poolAllocator_(parseBuffer_, sizeof(parseBuffer_), kDefaultChunkCapacity, &mallocAllocator_)
- , stackAllocator_()
- {
- }
+class JsonDocument : public JsonDocumentBase
+{
+ public:
+ static const int kDefaultChunkCapacity = 32 * 1024;
+ /* json parser will use this buffer first, then allocate more if needed; I seriously doubt we
+ * send any messages that would use all of this, though. */
+ char parseBuffer_[32 * 1024];
+ MallocAllocator mallocAllocator_;
+ PoolAllocator poolAllocator_;
+ StackAllocator stackAllocator_;
+ JsonDocument()
+ : JsonDocumentBase(rapidjson::kObjectType,
+ &poolAllocator_,
+ sizeof(stackAllocator_.fixedBuffer_),
+ &stackAllocator_)
+ , poolAllocator_(parseBuffer_, sizeof(parseBuffer_), kDefaultChunkCapacity, &mallocAllocator_)
+ , stackAllocator_()
+ {
+ }
};
using JsonValue = rapidjson::GenericValue;
inline JsonValue* GetObjMember(JsonValue* obj, const char* name)
{
- if (obj) {
- auto member = obj->FindMember(name);
- if (member != obj->MemberEnd() && member->value.IsObject()) {
- return &member->value;
- }
- }
- return nullptr;
+ if (obj)
+ {
+ auto member = obj->FindMember(name);
+ if (member != obj->MemberEnd() && member->value.IsObject())
+ return &member->value;
+ }
+ return nullptr;
}
-inline int GetIntMember(JsonValue* obj, const char* name, int notFoundDefault = 0)
+inline int GetIntMember(JsonValue* obj,
+ const char* name,
+ int notFoundDefault = 0)
{
- if (obj) {
- auto member = obj->FindMember(name);
- if (member != obj->MemberEnd() && member->value.IsInt()) {
- return member->value.GetInt();
- }
- }
- return notFoundDefault;
+ if (obj)
+ {
+ auto member = obj->FindMember(name);
+ if (member != obj->MemberEnd() && member->value.IsInt())
+ return member->value.GetInt();
+ }
+ return notFoundDefault;
}
inline const char* GetStrMember(JsonValue* obj,
- const char* name,
- const char* notFoundDefault = nullptr)
+ const char* name,
+ const char* notFoundDefault = nullptr)
{
- if (obj) {
- auto member = obj->FindMember(name);
- if (member != obj->MemberEnd() && member->value.IsString()) {
- return member->value.GetString();
- }
- }
- return notFoundDefault;
+ if (obj)
+ {
+ auto member = obj->FindMember(name);
+ if (member != obj->MemberEnd() && member->value.IsString())
+ return member->value.GetString();
+ }
+ return notFoundDefault;
}
diff --git a/deps/rcheevos/src/rcheevos/trigger.c b/deps/rcheevos/src/rcheevos/trigger.c
index 0e76e031bb..fdb9002fb8 100644
--- a/deps/rcheevos/src/rcheevos/trigger.c
+++ b/deps/rcheevos/src/rcheevos/trigger.c
@@ -1,7 +1,10 @@
#include "internal.h"
#include
+#if !defined( __CELLOS_LV2__) && !defined(__MWERKS__)
#include
+#endif
+#include
void rc_parse_trigger_internal(rc_trigger_t* self, const char** memaddr, rc_parse_state_t* parse) {
rc_condset_t** next;
diff --git a/deps/rcheevos/src/rcheevos/value.c b/deps/rcheevos/src/rcheevos/value.c
index b9a7db49a5..fcbc6c21e2 100644
--- a/deps/rcheevos/src/rcheevos/value.c
+++ b/deps/rcheevos/src/rcheevos/value.c
@@ -1,6 +1,9 @@
#include "internal.h"
+#if !defined( __CELLOS_LV2__) && !defined(__MWERKS__)
#include
+#endif
+#include
static void rc_parse_cond_value(rc_value_t* self, const char** memaddr, rc_parse_state_t* parse) {
rc_condition_t** next;
diff --git a/discord/discord.c b/discord/discord.c
index 321a612edc..ff2d1d5d01 100644
--- a/discord/discord.c
+++ b/discord/discord.c
@@ -149,7 +149,7 @@ static bool discord_download_avatar(
strlcpy(transf->path, buf, sizeof(transf->path));
RARCH_LOG("[discord] downloading avatar from: %s\n", url_encoded);
- task_push_http_transfer(url_encoded, true, NULL, cb_generic_download, transf);
+ task_push_http_transfer_file(url_encoded, true, NULL, cb_generic_download, transf);
return false;
}
@@ -488,7 +488,7 @@ void discord_init(const char *discord_app_id)
Discord_Initialize(discord_app_id, &handlers, 0, NULL);
#ifdef _WIN32
- GetModuleFileNameA(NULL, full_path, sizeof(full_path));
+ fill_pathname_application_path(full_path, sizeof(full_path));
if (strstr(get_retroarch_launch_arguments(), full_path))
strlcpy(command, get_retroarch_launch_arguments(), sizeof(command));
else
diff --git a/disk_control_interface.c b/disk_control_interface.c
new file mode 100644
index 0000000000..2042afb94c
--- /dev/null
+++ b/disk_control_interface.c
@@ -0,0 +1,774 @@
+/* Copyright (C) 2010-2020 The RetroArch team
+ *
+ * ---------------------------------------------------------------------------------------
+ * The following license statement only applies to this file (disk_control_interface.c).
+ * ---------------------------------------------------------------------------------------
+ *
+ * Permission is hereby granted, free of charge,
+ * to any person obtaining a copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include
+#include
+
+#include "paths.h"
+#include "retroarch.h"
+#include "verbosity.h"
+#include "msg_hash.h"
+
+#include "disk_control_interface.h"
+
+/*****************/
+/* Configuration */
+/*****************/
+
+/* Sets all disk interface callback functions
+ * to NULL */
+static void disk_control_reset_callback(
+ disk_control_interface_t *disk_control)
+{
+ if (!disk_control)
+ return;
+
+ memset(&disk_control->cb, 0, sizeof(struct retro_disk_control_ext_callback));
+}
+
+/* Set v0 disk interface callback functions */
+void disk_control_set_callback(
+ disk_control_interface_t *disk_control,
+ const struct retro_disk_control_callback *cb)
+{
+ if (!disk_control)
+ return;
+
+ disk_control_reset_callback(disk_control);
+
+ if (!cb)
+ return;
+
+ disk_control->cb.set_eject_state = cb->set_eject_state;
+ disk_control->cb.get_eject_state = cb->get_eject_state;
+ disk_control->cb.get_image_index = cb->get_image_index;
+ disk_control->cb.set_image_index = cb->set_image_index;
+ disk_control->cb.get_num_images = cb->get_num_images;
+ disk_control->cb.replace_image_index = cb->replace_image_index;
+ disk_control->cb.add_image_index = cb->add_image_index;
+}
+
+/* Set v1+ disk interface callback functions */
+void disk_control_set_ext_callback(
+ disk_control_interface_t *disk_control,
+ const struct retro_disk_control_ext_callback *cb)
+{
+ if (!disk_control)
+ return;
+
+ disk_control_reset_callback(disk_control);
+
+ if (!cb)
+ return;
+
+ disk_control->cb.set_eject_state = cb->set_eject_state;
+ disk_control->cb.get_eject_state = cb->get_eject_state;
+ disk_control->cb.get_image_index = cb->get_image_index;
+ disk_control->cb.set_image_index = cb->set_image_index;
+ disk_control->cb.get_num_images = cb->get_num_images;
+ disk_control->cb.replace_image_index = cb->replace_image_index;
+ disk_control->cb.add_image_index = cb->add_image_index;
+
+ disk_control->cb.set_initial_image = cb->set_initial_image;
+ disk_control->cb.get_image_path = cb->get_image_path;
+ disk_control->cb.get_image_label = cb->get_image_label;
+}
+
+/**********/
+/* Status */
+/**********/
+
+/* Returns true if core supports basic disk
+ * control functionality
+ * - set_eject_state
+ * - get_eject_state
+ * - get_image_index
+ * - set_image_index
+ * - get_num_images */
+bool disk_control_enabled(
+ disk_control_interface_t *disk_control)
+{
+ if (!disk_control)
+ return false;
+
+ if (disk_control->cb.set_eject_state &&
+ disk_control->cb.get_eject_state &&
+ disk_control->cb.get_image_index &&
+ disk_control->cb.set_image_index &&
+ disk_control->cb.get_num_images)
+ return true;
+
+ return false;
+}
+
+/* Returns true if core supports disk append
+ * functionality
+ * - replace_image_index
+ * - add_image_index */
+bool disk_control_append_enabled(
+ disk_control_interface_t *disk_control)
+{
+ if (!disk_control)
+ return false;
+
+ if (disk_control->cb.replace_image_index &&
+ disk_control->cb.add_image_index)
+ return true;
+
+ return false;
+}
+
+/* Returns true if core supports image
+ * labels
+ * - get_image_label */
+bool disk_control_image_label_enabled(
+ disk_control_interface_t *disk_control)
+{
+ if (!disk_control)
+ return false;
+
+ if (disk_control->cb.get_image_label)
+ return true;
+
+ return false;
+}
+
+/* Returns true if core supports setting
+ * initial disk index
+ * - set_initial_image
+ * - get_image_path */
+bool disk_control_initial_image_enabled(
+ disk_control_interface_t *disk_control)
+{
+ if (!disk_control)
+ return false;
+
+ if (disk_control->cb.set_initial_image &&
+ disk_control->cb.get_image_path)
+ return true;
+
+ return false;
+}
+
+/***********/
+/* Getters */
+/***********/
+
+/* Returns true if disk is currently ejected */
+bool disk_control_get_eject_state(
+ disk_control_interface_t *disk_control)
+{
+ if (!disk_control)
+ return false;
+
+ if (!disk_control->cb.get_eject_state)
+ return false;
+
+ return disk_control->cb.get_eject_state();
+}
+
+/* Returns number of disk images registered
+ * by the core */
+unsigned disk_control_get_num_images(
+ disk_control_interface_t *disk_control)
+{
+ if (!disk_control)
+ return 0;
+
+ if (!disk_control->cb.get_num_images)
+ return 0;
+
+ return disk_control->cb.get_num_images();
+}
+
+/* Returns currently selected disk image index */
+unsigned disk_control_get_image_index(
+ disk_control_interface_t *disk_control)
+{
+ if (!disk_control)
+ return 0;
+
+ if (!disk_control->cb.get_image_index)
+ return 0;
+
+ return disk_control->cb.get_image_index();
+}
+
+/* Fetches core-provided disk image label
+ * (label is set to an empty string if core
+ * does not support image labels) */
+void disk_control_get_image_label(
+ disk_control_interface_t *disk_control,
+ unsigned index, char *label, size_t len)
+{
+ if (!label || len < 1)
+ return;
+
+ if (!disk_control)
+ goto error;
+
+ if (!disk_control->cb.get_image_label)
+ goto error;
+
+ if (!disk_control->cb.get_image_label(index, label, len))
+ goto error;
+
+ return;
+
+error:
+ label[0] = '\0';
+ return;
+}
+
+/***********/
+/* Setters */
+/***********/
+
+/* Sets the eject state of the virtual disk tray */
+bool disk_control_set_eject_state(
+ disk_control_interface_t *disk_control,
+ bool eject, bool verbose)
+{
+ bool error = false;
+ char msg[128];
+
+ msg[0] = '\0';
+
+ if (!disk_control)
+ return false;
+
+ if (!disk_control->cb.set_eject_state)
+ return false;
+
+ /* Set eject state */
+ if (disk_control->cb.set_eject_state(eject))
+ snprintf(
+ msg, sizeof(msg), "%s %s",
+ eject ? msg_hash_to_str(MSG_DISK_EJECTED) :
+ msg_hash_to_str(MSG_DISK_CLOSED),
+ msg_hash_to_str(MSG_VIRTUAL_DISK_TRAY));
+ else
+ {
+ error = true;
+ snprintf(
+ msg, sizeof(msg), "%s %s %s",
+ msg_hash_to_str(MSG_FAILED_TO),
+ eject ? msg_hash_to_str(MSG_VIRTUAL_DISK_TRAY_EJECT) :
+ msg_hash_to_str(MSG_VIRTUAL_DISK_TRAY_CLOSE),
+ msg_hash_to_str(MSG_VIRTUAL_DISK_TRAY));
+ }
+
+ if (!string_is_empty(msg))
+ {
+ if (error)
+ RARCH_ERR("%s\n", msg);
+ else
+ RARCH_LOG("%s\n", msg);
+
+ /* Errors should always be displayed */
+ if (verbose || error)
+ runloop_msg_queue_push(
+ msg, 1, error ? 180 : 60,
+ true, NULL,
+ MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
+ }
+
+ return !error;
+}
+
+/* Sets currently selected disk index
+ * NOTE: Will fail if disk is not currently ejected */
+bool disk_control_set_index(
+ disk_control_interface_t *disk_control,
+ unsigned index, bool verbose)
+{
+ bool error = false;
+ unsigned num_images = 0;
+ char msg[128];
+
+ msg[0] = '\0';
+
+ if (!disk_control)
+ return false;
+
+ if (!disk_control->cb.get_eject_state ||
+ !disk_control->cb.get_num_images ||
+ !disk_control->cb.set_image_index)
+ return false;
+
+ /* Ensure that disk is currently ejected */
+ if (!disk_control->cb.get_eject_state())
+ return false;
+
+ num_images = disk_control->cb.get_num_images();
+
+ if (disk_control->cb.set_image_index(index))
+ {
+ if (index < num_images)
+ snprintf(
+ msg, sizeof(msg), "%s: %u/%u",
+ msg_hash_to_str(MSG_SETTING_DISK_IN_TRAY),
+ index + 1, num_images);
+ else
+ strlcpy(
+ msg,
+ msg_hash_to_str(MSG_REMOVED_DISK_FROM_TRAY),
+ sizeof(msg));
+ }
+ else
+ {
+ error = true;
+
+ if (index < num_images)
+ snprintf(
+ msg, sizeof(msg), "%s %u/%u",
+ msg_hash_to_str(MSG_FAILED_TO_SET_DISK),
+ index + 1, num_images);
+ else
+ strlcpy(
+ msg,
+ msg_hash_to_str(MSG_FAILED_TO_REMOVE_DISK_FROM_TRAY),
+ sizeof(msg));
+ }
+
+ if (!string_is_empty(msg))
+ {
+ if (error)
+ RARCH_ERR("%s\n", msg);
+ else
+ RARCH_LOG("%s\n", msg);
+
+ /* Errors should always be displayed */
+ if (verbose || error)
+ runloop_msg_queue_push(
+ msg, 1, error ? 180 : 60,
+ true, NULL,
+ MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
+ }
+
+ /* If operation was successful, update disk
+ * index record (if enabled) */
+ if (!error && disk_control->record_enabled)
+ {
+ if (disk_control->cb.get_image_index &&
+ disk_control->cb.get_image_path)
+ {
+ bool image_path_valid = false;
+ unsigned new_image_index = 0;
+ char new_image_path[PATH_MAX_LENGTH];
+
+ new_image_path[0] = '\0';
+
+ /* Get current image index + path */
+ new_image_index = disk_control->cb.get_image_index();
+ image_path_valid = disk_control->cb.get_image_path(
+ new_image_index, new_image_path, sizeof(new_image_path));
+
+ if (image_path_valid)
+ disk_index_file_set(
+ &disk_control->index_record,
+ new_image_index, new_image_path);
+ else
+ disk_index_file_set(
+ &disk_control->index_record, 0, NULL);
+ }
+ }
+
+ return !error;
+}
+
+/* Increments selected disk index */
+bool disk_control_set_index_next(
+ disk_control_interface_t *disk_control,
+ bool verbose)
+{
+ unsigned num_images = 0;
+ unsigned image_index = 0;
+ bool disk_next_enable = false;
+
+ if (!disk_control)
+ return false;
+
+ if (!disk_control->cb.get_num_images ||
+ !disk_control->cb.get_image_index)
+ return false;
+
+ num_images = disk_control->cb.get_num_images();
+ image_index = disk_control->cb.get_image_index();
+ /* Would seem more sensible to check (num_images > 1)
+ * here, but seems we need to be able to cycle the
+ * same image for legacy reasons... */
+ disk_next_enable = (num_images > 0) && (num_images != UINT_MAX);
+
+ if (!disk_next_enable)
+ {
+ RARCH_ERR("%s.\n", msg_hash_to_str(MSG_GOT_INVALID_DISK_INDEX));
+ return false;
+ }
+
+ if (image_index < (num_images - 1))
+ image_index++;
+
+ return disk_control_set_index(disk_control, image_index, verbose);
+}
+
+/* Decrements selected disk index */
+bool disk_control_set_index_prev(
+ disk_control_interface_t *disk_control,
+ bool verbose)
+{
+ unsigned num_images = 0;
+ unsigned image_index = 0;
+ bool disk_prev_enable = false;
+
+ if (!disk_control)
+ return false;
+
+ if (!disk_control->cb.get_num_images ||
+ !disk_control->cb.get_image_index)
+ return false;
+
+ num_images = disk_control->cb.get_num_images();
+ image_index = disk_control->cb.get_image_index();
+ /* Would seem more sensible to check (num_images > 1)
+ * here, but seems we need to be able to cycle the
+ * same image for legacy reasons... */
+ disk_prev_enable = (num_images > 0);
+
+ if (!disk_prev_enable)
+ {
+ RARCH_ERR("%s.\n", msg_hash_to_str(MSG_GOT_INVALID_DISK_INDEX));
+ return false;
+ }
+
+ if (image_index > 0)
+ image_index--;
+
+ return disk_control_set_index(disk_control, image_index, verbose);
+}
+
+/* Appends specified image file to disk image list */
+bool disk_control_append_image(
+ disk_control_interface_t *disk_control,
+ const char *image_path)
+{
+ unsigned initial_index = 0;
+ unsigned new_index = 0;
+ const char *image_filename = NULL;
+ struct retro_game_info info = {0};
+ char msg[128];
+
+ msg[0] = '\0';
+
+ /* Sanity check. If any of these fail then a
+ * frontend error has occurred - we will not
+ * deal with that here */
+ if (!disk_control)
+ return false;
+
+ if (!disk_control->cb.get_image_index ||
+ !disk_control->cb.get_num_images ||
+ !disk_control->cb.add_image_index ||
+ !disk_control->cb.replace_image_index ||
+ !disk_control->cb.get_eject_state)
+ return false;
+
+ if (string_is_empty(image_path))
+ return false;
+
+ image_filename = path_basename(image_path);
+
+ if (string_is_empty(image_filename))
+ return false;
+
+ /* Cache initial image index */
+ initial_index = disk_control->cb.get_image_index();
+
+ /* Eject disk */
+ if (!disk_control_set_eject_state(disk_control, true, false))
+ goto error;
+
+ /* Append image */
+ if (!disk_control->cb.add_image_index())
+ goto error;
+
+ new_index = disk_control->cb.get_num_images();
+ if (new_index < 1)
+ goto error;
+ new_index--;
+
+ info.path = image_path;
+ if (!disk_control->cb.replace_image_index(new_index, &info))
+ goto error;
+
+ /* Set new index */
+ if (!disk_control_set_index(disk_control, new_index, false))
+ goto error;
+
+ /* Insert disk */
+ if (!disk_control_set_eject_state(disk_control, false, false))
+ goto error;
+
+ /* Display log */
+ snprintf(
+ msg, sizeof(msg), "%s: %s",
+ msg_hash_to_str(MSG_APPENDED_DISK), image_filename);
+
+ RARCH_LOG("%s\n", msg);
+ /* 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);
+
+ return true;
+
+error:
+ /* If we reach this point then everything is
+ * broken and the disk control interface is
+ * in an undefined state. Try to restore some
+ * sanity by reinserting the original disk...
+ * NOTE: If this fails then it's game over -
+ * just display the error notification and
+ * hope for the best... */
+ if (!disk_control->cb.get_eject_state())
+ disk_control_set_eject_state(disk_control, true, false);
+ disk_control_set_index(disk_control, initial_index, false);
+ disk_control_set_eject_state(disk_control, false, false);
+
+ snprintf(
+ msg, sizeof(msg), "%s: %s",
+ msg_hash_to_str(MSG_FAILED_TO_APPEND_DISK), image_filename);
+
+ runloop_msg_queue_push(
+ msg, 0, 180,
+ true, NULL,
+ MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
+
+ return false;
+}
+
+/*****************************/
+/* 'Initial index' functions */
+/*****************************/
+
+/* Attempts to set current core's initial disk index.
+ * > disk_control->record_enabled will be set to
+ * 'false' if core does not support initial
+ * index functionality
+ * > disk_control->index_record will be loaded
+ * from file (if an existing record is found)
+ * NOTE: Must be called immediately before
+ * loading content */
+bool disk_control_set_initial_index(
+ disk_control_interface_t *disk_control,
+ const char *content_path,
+ const char *dir_savefile)
+{
+ if (!disk_control)
+ return false;
+
+ if (string_is_empty(content_path))
+ goto error;
+
+ /* Check that 'initial index' functionality is enabled */
+ if (!disk_control->cb.set_initial_image ||
+ !disk_control->cb.get_num_images ||
+ !disk_control->cb.get_image_index ||
+ !disk_control->cb.get_image_path)
+ goto error;
+
+ /* Attempt to initialise disk index record (reading
+ * from disk, if file exists) */
+ disk_control->record_enabled = disk_index_file_init(
+ &disk_control->index_record,
+ content_path, dir_savefile);
+
+ /* If record is enabled and initial index is *not*
+ * zero, notify current core */
+ if (disk_control->record_enabled &&
+ (disk_control->index_record.image_index != 0))
+ {
+ if (!disk_control->cb.set_initial_image(
+ disk_control->index_record.image_index,
+ disk_control->index_record.image_path))
+ {
+ /* Note: We don't bother with an on-screen
+ * notification at this stage, since an error
+ * here may not matter (have to wait until
+ * disk index is verified) */
+ RARCH_ERR(
+ "Failed to set initial disk index: [%u] %s\n",
+ disk_control->index_record.image_index,
+ disk_control->index_record.image_path);
+ return false;
+ }
+ }
+
+ return true;
+
+error:
+ disk_control->record_enabled = false;
+ return false;
+}
+
+/* Checks that initial index has been set correctly
+ * and provides user notification.
+ * > Sets disk_control->initial_num_images if
+ * if functionality is supported by core
+ * NOTE: Must be called immediately after
+ * loading content */
+bool disk_control_verify_initial_index(disk_control_interface_t *disk_control)
+{
+ bool success = false;
+ unsigned image_index = 0;
+ char image_path[PATH_MAX_LENGTH];
+
+ image_path[0] = '\0';
+
+ if (!disk_control)
+ return false;
+
+ /* If index record is disabled, can return immediately */
+ if (!disk_control->record_enabled)
+ return false;
+
+ /* Check that 'initial index' functionality is enabled */
+ if (!disk_control->cb.set_initial_image ||
+ !disk_control->cb.get_num_images ||
+ !disk_control->cb.get_image_index ||
+ !disk_control->cb.get_image_path)
+ return false;
+
+ /* Cache initial number of images
+ * (required for error checking when saving
+ * disk index file) */
+ disk_control->initial_num_images =
+ disk_control->cb.get_num_images();
+
+ /* Get current image index + path */
+ image_index = disk_control->cb.get_image_index();
+
+ if (disk_control->cb.get_image_path(
+ image_index, image_path, sizeof(image_path)))
+ {
+ /* Check whether index + path match set
+ * values
+ * > Note that if set index was zero and
+ * set path was empty, we ignore the path
+ * read here (since this corresponds to a
+ * 'first run', where no existing disk index
+ * file was present) */
+ if ((image_index == disk_control->index_record.image_index) &&
+ (string_is_equal(image_path, disk_control->index_record.image_path) ||
+ ((disk_control->index_record.image_index == 0) &&
+ string_is_empty(disk_control->index_record.image_path))))
+ success = true;
+ }
+
+ /* If current disk is incorrect, notify user */
+ if (!success)
+ {
+ RARCH_ERR(
+ "Failed to set initial disk index:\n> Expected [%u] %s\n> Detected [%u] %s\n",
+ disk_control->index_record.image_index + 1,
+ disk_control->index_record.image_path,
+ image_index + 1,
+ image_path);
+
+ runloop_msg_queue_push(
+ msg_hash_to_str(MSG_FAILED_TO_SET_INITIAL_DISK),
+ 0, 60,
+ true, NULL,
+ MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
+
+ /* Since a failure here typically means that the
+ * original M3U content file has been altered,
+ * any existing disk index record file will be
+ * invalid. We therefore 'reset' and save the disk
+ * index record to prevent a repeat of the error on
+ * the next run */
+ disk_index_file_set(&disk_control->index_record, 0, NULL);
+ disk_index_file_save(&disk_control->index_record);
+ }
+ /* If current disk is correct and recorded image
+ * path is empty (i.e. first run), need to register
+ * current image path */
+ else if (string_is_empty(disk_control->index_record.image_path))
+ disk_index_file_set(
+ &disk_control->index_record, image_index, image_path);
+
+ /* Regardless of success/failure, notify user of
+ * current disk index *if* more than one disk
+ * is available */
+ if (disk_control->initial_num_images > 1)
+ {
+ char msg[128];
+
+ msg[0] = '\0';
+
+ snprintf(
+ msg, sizeof(msg), "%s: %u/%u",
+ msg_hash_to_str(MSG_SETTING_DISK_IN_TRAY),
+ image_index + 1, disk_control->initial_num_images);
+
+ RARCH_LOG("%s\n", msg);
+
+ runloop_msg_queue_push(
+ msg,
+ 0, 60,
+ true, NULL,
+ MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
+ }
+
+ return success;
+}
+
+/* Saves current disk index to file, if supported
+ * by current core */
+bool disk_control_save_image_index(disk_control_interface_t *disk_control)
+{
+ if (!disk_control)
+ return false;
+
+ /* If index record is disabled, can return immediately */
+ if (!disk_control->record_enabled)
+ return false;
+
+ /* If core started with less than two disks,
+ * then a disk index record is unnecessary */
+ if (disk_control->initial_num_images < 2)
+ return false;
+
+ /* If current index is greater than initial
+ * number of disks then user has appended a
+ * disk and it is currently active. This setup
+ * *cannot* be restored, so cancel the file save */
+ if (disk_control->index_record.image_index >=
+ disk_control->initial_num_images)
+ return false;
+
+ /* Save record */
+ return disk_index_file_save(&disk_control->index_record);
+}
diff --git a/disk_control_interface.h b/disk_control_interface.h
new file mode 100644
index 0000000000..b705838271
--- /dev/null
+++ b/disk_control_interface.h
@@ -0,0 +1,178 @@
+/* Copyright (C) 2010-2020 The RetroArch team
+ *
+ * ---------------------------------------------------------------------------------------
+ * The following license statement only applies to this file (disk_control_interface.h).
+ * ---------------------------------------------------------------------------------------
+ *
+ * Permission is hereby granted, free of charge,
+ * to any person obtaining a copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef __DISK_CONTROL_INTERFACE_H
+#define __DISK_CONTROL_INTERFACE_H
+
+#include
+#include
+
+#include
+
+#include "disk_index_file.h"
+
+RETRO_BEGIN_DECLS
+
+/* Holds all all objects to operate the disk
+ * control interface */
+typedef struct
+{
+ bool record_enabled;
+ disk_index_file_t index_record;
+ unsigned initial_num_images;
+ struct retro_disk_control_ext_callback cb;
+} disk_control_interface_t;
+
+/*****************/
+/* Configuration */
+/*****************/
+
+/* Set v0 disk interface callback functions */
+void disk_control_set_callback(
+ disk_control_interface_t *disk_control,
+ const struct retro_disk_control_callback *cb);
+
+/* Set v1+ disk interface callback functions */
+void disk_control_set_ext_callback(
+ disk_control_interface_t *disk_control,
+ const struct retro_disk_control_ext_callback *cb);
+
+/**********/
+/* Status */
+/**********/
+
+/* Returns true if core supports basic disk
+ * control functionality
+ * - set_eject_state
+ * - get_eject_state
+ * - get_image_index
+ * - set_image_index
+ * - get_num_images */
+bool disk_control_enabled(
+ disk_control_interface_t *disk_control);
+
+/* Returns true if core supports disk append
+ * functionality
+ * - replace_image_index
+ * - add_image_index */
+bool disk_control_append_enabled(
+ disk_control_interface_t *disk_control);
+
+/* Returns true if core supports image
+ * labels
+ * - get_image_label */
+bool disk_control_image_label_enabled(
+ disk_control_interface_t *disk_control);
+
+/* Returns true if core supports setting
+ * initial disk index
+ * - set_initial_image
+ * - get_image_path */
+bool disk_control_initial_image_enabled(
+ disk_control_interface_t *disk_control);
+
+/***********/
+/* Getters */
+/***********/
+
+/* Returns true if disk is currently ejected */
+bool disk_control_get_eject_state(
+ disk_control_interface_t *disk_control);
+
+/* Returns number of disk images registered
+ * by the core */
+unsigned disk_control_get_num_images(
+ disk_control_interface_t *disk_control);
+
+/* Returns currently selected disk image index */
+unsigned disk_control_get_image_index(
+ disk_control_interface_t *disk_control);
+
+/* Fetches core-provided disk image label
+ * (label is set to an empty string if core
+ * does not support image labels) */
+void disk_control_get_image_label(
+ disk_control_interface_t *disk_control,
+ unsigned index, char *label, size_t len);
+
+/***********/
+/* Setters */
+/***********/
+
+/* Sets the eject state of the virtual disk tray */
+bool disk_control_set_eject_state(
+ disk_control_interface_t *disk_control,
+ bool eject, bool verbose);
+
+/* Sets currently selected disk index
+ * NOTE: Will fail if disk is not currently ejected */
+bool disk_control_set_index(
+ disk_control_interface_t *disk_control,
+ unsigned index, bool verbose);
+
+/* Increments selected disk index */
+bool disk_control_set_index_next(
+ disk_control_interface_t *disk_control,
+ bool verbose);
+
+/* Decrements selected disk index */
+bool disk_control_set_index_prev(
+ disk_control_interface_t *disk_control,
+ bool verbose);
+
+/* Appends specified image file to disk image list */
+bool disk_control_append_image(
+ disk_control_interface_t *disk_control,
+ const char *image_path);
+
+/*****************************/
+/* 'Initial index' functions */
+/*****************************/
+
+/* Attempts to set current core's initial disk index.
+ * > disk_control->record_enabled will be set to
+ * 'false' if core does not support initial
+ * index functionality
+ * > disk_control->index_record will be loaded
+ * from file (if an existing record is found)
+ * NOTE: Must be called immediately before
+ * loading content */
+bool disk_control_set_initial_index(
+ disk_control_interface_t *disk_control,
+ const char *content_path,
+ const char *dir_savefile);
+
+/* Checks that initial index has been set correctly
+ * and provides user notification.
+ * > Sets disk_control->initial_num_images if
+ * if functionality is supported by core
+ * NOTE: Must be called immediately after
+ * loading content */
+bool disk_control_verify_initial_index(disk_control_interface_t *disk_control);
+
+/* Saves current disk index to file, if supported
+ * by current core */
+bool disk_control_save_image_index(disk_control_interface_t *disk_control);
+
+RETRO_END_DECLS
+
+#endif
diff --git a/disk_index_file.c b/disk_index_file.c
new file mode 100644
index 0000000000..6655336ec5
--- /dev/null
+++ b/disk_index_file.c
@@ -0,0 +1,523 @@
+/* Copyright (C) 2010-2020 The RetroArch team
+ *
+ * ---------------------------------------------------------------------------------------
+ * The following license statement only applies to this file (disk_index_file.c).
+ * ---------------------------------------------------------------------------------------
+ *
+ * Permission is hereby granted, free of charge,
+ * to any person obtaining a copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include
+#include
+#include
+#include
+
+#include "file_path_special.h"
+#include "verbosity.h"
+#include "msg_hash.h"
+
+#include "disk_index_file.h"
+
+/****************/
+/* JSON Helpers */
+/****************/
+
+typedef struct
+{
+ JSON_Parser parser;
+ JSON_Writer writer;
+ RFILE *file;
+ unsigned *current_entry_uint_val;
+ char **current_entry_str_val;
+ unsigned image_index;
+ char *image_path;
+} DCifJSONContext;
+
+static JSON_Parser_HandlerResult DCifJSONObjectMemberHandler(JSON_Parser parser, char *pValue, size_t length, JSON_StringAttributes attributes)
+{
+ DCifJSONContext *pCtx = (DCifJSONContext*)JSON_Parser_GetUserData(parser);
+ (void)attributes; /* unused */
+
+ if (pCtx->current_entry_str_val)
+ {
+ /* something went wrong */
+ RARCH_ERR("[disk index file] JSON parsing failed at line %d.\n", __LINE__);
+ return JSON_Parser_Abort;
+ }
+
+ if (length)
+ {
+ if (string_is_equal(pValue, "image_index"))
+ pCtx->current_entry_uint_val = &pCtx->image_index;
+ else if (string_is_equal(pValue, "image_path"))
+ pCtx->current_entry_str_val = &pCtx->image_path;
+ /* ignore unknown members */
+ }
+
+ return JSON_Parser_Continue;
+}
+
+static JSON_Parser_HandlerResult DCifJSONNumberHandler(JSON_Parser parser, char *pValue, size_t length, JSON_StringAttributes attributes)
+{
+ DCifJSONContext *pCtx = (DCifJSONContext*)JSON_Parser_GetUserData(parser);
+ (void)attributes; /* unused */
+
+ if (pCtx->current_entry_uint_val && length && !string_is_empty(pValue))
+ *pCtx->current_entry_uint_val = string_to_unsigned(pValue);
+ /* ignore unknown members */
+
+ pCtx->current_entry_uint_val = NULL;
+
+ return JSON_Parser_Continue;
+}
+
+static JSON_Parser_HandlerResult DCifJSONStringHandler(JSON_Parser parser, char *pValue, size_t length, JSON_StringAttributes attributes)
+{
+ DCifJSONContext *pCtx = (DCifJSONContext*)JSON_Parser_GetUserData(parser);
+ (void)attributes; /* unused */
+
+ if (pCtx->current_entry_str_val && length && !string_is_empty(pValue))
+ {
+ if (*pCtx->current_entry_str_val)
+ free(*pCtx->current_entry_str_val);
+
+ *pCtx->current_entry_str_val = strdup(pValue);
+ }
+ /* ignore unknown members */
+
+ pCtx->current_entry_str_val = NULL;
+
+ return JSON_Parser_Continue;
+}
+
+static JSON_Writer_HandlerResult DCifJSONOutputHandler(JSON_Writer writer, const char *pBytes, size_t length)
+{
+ DCifJSONContext *context = (DCifJSONContext*)JSON_Writer_GetUserData(writer);
+ (void)writer; /* unused */
+
+ return filestream_write(context->file, pBytes, length) == length ? JSON_Writer_Continue : JSON_Writer_Abort;
+}
+
+static void DCifJSONLogError(DCifJSONContext *pCtx)
+{
+ if (pCtx->parser && JSON_Parser_GetError(pCtx->parser) != JSON_Error_AbortedByHandler)
+ {
+ JSON_Error error = JSON_Parser_GetError(pCtx->parser);
+ JSON_Location errorLocation = { 0, 0, 0 };
+
+ (void)JSON_Parser_GetErrorLocation(pCtx->parser, &errorLocation);
+ RARCH_ERR("[disk index file] Error: Invalid JSON at line %d, column %d (input byte %d) - %s.\n",
+ (int)errorLocation.line + 1,
+ (int)errorLocation.column + 1,
+ (int)errorLocation.byte,
+ JSON_ErrorString(error));
+ }
+ else if (pCtx->writer && JSON_Writer_GetError(pCtx->writer) != JSON_Error_AbortedByHandler)
+ {
+ RARCH_ERR("[disk index file] Error: could not write output - %s.\n", JSON_ErrorString(JSON_Writer_GetError(pCtx->writer)));
+ }
+}
+
+/******************/
+/* Initialisation */
+/******************/
+
+/* Resets existing disk index record */
+static void disk_index_file_reset(disk_index_file_t *disk_index_file)
+{
+ if (!disk_index_file)
+ return;
+
+ disk_index_file->modified = false;
+ disk_index_file->image_index = 0;
+ disk_index_file->image_path[0] = '\0';
+ disk_index_file->file_path[0] = '\0';
+}
+
+/* Parses disk index file referenced by
+ * disk_index_file->file_path.
+ * Does nothing if disk index file does not exist. */
+static bool disk_index_file_read(disk_index_file_t *disk_index_file)
+{
+ bool success = false;
+ DCifJSONContext context = {0};
+ RFILE *file = NULL;
+
+ /* Sanity check */
+ if (!disk_index_file)
+ return false;
+
+ if (string_is_empty(disk_index_file->file_path))
+ return false;
+
+ if (!path_is_valid(disk_index_file->file_path))
+ return false;
+
+ /* Attempt to open disk index file */
+ file = filestream_open(
+ disk_index_file->file_path,
+ RETRO_VFS_FILE_ACCESS_READ,
+ RETRO_VFS_FILE_ACCESS_HINT_NONE);
+
+ if (!file)
+ {
+ RARCH_ERR(
+ "[disk index file] Failed to open disk index record file: %s\n",
+ disk_index_file->file_path);
+ return false;
+ }
+
+ /* Initialise JSON parser */
+ context.image_index = 0;
+ context.image_path = NULL;
+ context.parser = JSON_Parser_Create(NULL);
+ context.file = file;
+
+ if (!context.parser)
+ {
+ RARCH_ERR("[disk index file] Failed to create JSON parser.\n");
+ goto end;
+ }
+
+ /* Configure parser */
+ JSON_Parser_SetAllowBOM(context.parser, JSON_True);
+ JSON_Parser_SetNumberHandler(context.parser, &DCifJSONNumberHandler);
+ JSON_Parser_SetStringHandler(context.parser, &DCifJSONStringHandler);
+ JSON_Parser_SetObjectMemberHandler(context.parser, &DCifJSONObjectMemberHandler);
+ JSON_Parser_SetUserData(context.parser, &context);
+
+ /* Read file */
+ while (!filestream_eof(file))
+ {
+ /* Disk index files are tiny - use small chunk size */
+ char chunk[128] = {0};
+ int64_t length = filestream_read(file, chunk, sizeof(chunk));
+
+ /* Error checking... */
+ if (!length && !filestream_eof(file))
+ {
+ RARCH_ERR(
+ "[disk index file] Failed to read disk index file: %s\n",
+ disk_index_file->file_path);
+ JSON_Parser_Free(context.parser);
+ goto end;
+ }
+
+ /* Parse chunk */
+ if (!JSON_Parser_Parse(context.parser, chunk, length, JSON_False))
+ {
+ RARCH_ERR(
+ "[disk index file] Error parsing chunk of disk index file: %s\n---snip---\n%s\n---snip---\n",
+ disk_index_file->file_path, chunk);
+ DCifJSONLogError(&context);
+ JSON_Parser_Free(context.parser);
+ goto end;
+ }
+ }
+
+ /* Finalise parsing */
+ if (!JSON_Parser_Parse(context.parser, NULL, 0, JSON_True))
+ {
+ RARCH_WARN(
+ "[disk index file] Error parsing disk index file: %s\n",
+ disk_index_file->file_path);
+ DCifJSONLogError(&context);
+ JSON_Parser_Free(context.parser);
+ goto end;
+ }
+
+ /* Free parser */
+ JSON_Parser_Free(context.parser);
+
+ /* Copy values read from JSON file */
+ disk_index_file->image_index = context.image_index;
+
+ if (!string_is_empty(context.image_path))
+ strlcpy(
+ disk_index_file->image_path, context.image_path,
+ sizeof(disk_index_file->image_path));
+ else
+ disk_index_file->image_path[0] = '\0';
+
+ success = true;
+
+end:
+ /* Clean up leftover strings */
+ if (context.image_path)
+ free(context.image_path);
+
+ /* Close log file */
+ filestream_close(file);
+
+ return success;
+}
+
+/* Initialises existing disk index record, loading
+ * current parameters if a record file exists.
+ * Returns false if arguments are invalid. */
+bool disk_index_file_init(
+ disk_index_file_t *disk_index_file,
+ const char *content_path,
+ const char *dir_savefile)
+{
+ const char *content_file = NULL;
+ char content_name[PATH_MAX_LENGTH];
+ char disk_index_file_dir[PATH_MAX_LENGTH];
+ char disk_index_file_path[PATH_MAX_LENGTH];
+
+ content_name[0] = '\0';
+ disk_index_file_dir[0] = '\0';
+ disk_index_file_path[0] = '\0';
+
+ /* Sanity check */
+ if (!disk_index_file)
+ return false;
+
+ /* Disk index records are only valid when loading
+ * content (i.e. they do not apply to contentless
+ * cores) */
+ if (string_is_empty(content_path))
+ goto error;
+
+ /* Build disk index file path */
+
+ /* > Get content name */
+ content_file = path_basename(content_path);
+ if (string_is_empty(content_file))
+ goto error;
+
+ strlcpy(content_name, content_file, sizeof(content_name));
+ path_remove_extension(content_name);
+ if (string_is_empty(content_name))
+ goto error;
+
+ /* > Get disk index file directory */
+ if (!string_is_empty(dir_savefile))
+ strlcpy(disk_index_file_dir, dir_savefile, sizeof(disk_index_file_dir));
+ else
+ {
+ /* Use content directory */
+ strlcpy(disk_index_file_dir, content_path, sizeof(disk_index_file_dir));
+ path_basedir(disk_index_file_dir);
+ }
+
+ /* > Create directory, if required */
+ if (!path_is_directory(disk_index_file_dir))
+ {
+ if (!path_mkdir(disk_index_file_dir))
+ {
+ RARCH_ERR(
+ "[disk index file] failed to create directory for disk index file: %s\n",
+ disk_index_file_dir);
+ goto error;
+ }
+ }
+
+ /* > Generate final path */
+ fill_pathname_join(
+ disk_index_file_path, disk_index_file_dir,
+ content_name, sizeof(disk_index_file_path));
+ strlcat(
+ disk_index_file_path,
+ file_path_str(FILE_PATH_DISK_CONTROL_INDEX_EXTENSION),
+ sizeof(disk_index_file_path));
+ if (string_is_empty(disk_index_file_path))
+ goto error;
+
+ /* All is well - reset disk_index_file_t and
+ * attempt to load values from file */
+ disk_index_file_reset(disk_index_file);
+ strlcpy(
+ disk_index_file->file_path,
+ disk_index_file_path,
+ sizeof(disk_index_file->file_path));
+
+ /* > If file does not exist (or some other
+ * error occurs) then this is a new record
+ * - in this case, 'modified' flag should
+ * be set to 'true' */
+ if (!disk_index_file_read(disk_index_file))
+ disk_index_file->modified = true;
+
+ return true;
+
+error:
+ disk_index_file_reset(disk_index_file);
+ return false;
+}
+
+/***********/
+/* Setters */
+/***********/
+
+/* Sets image index and path */
+void disk_index_file_set(
+ disk_index_file_t *disk_index_file,
+ unsigned image_index,
+ const char *image_path)
+{
+ if (!disk_index_file)
+ return;
+
+ /* Check whether image index should be updated */
+ if (disk_index_file->image_index != image_index)
+ {
+ disk_index_file->image_index = image_index;
+ disk_index_file->modified = true;
+ }
+
+ /* Check whether image path should be updated */
+ if (!string_is_empty(image_path))
+ {
+ if (!string_is_equal(disk_index_file->image_path, image_path))
+ {
+ strlcpy(
+ disk_index_file->image_path, image_path,
+ sizeof(disk_index_file->image_path));
+ disk_index_file->modified = true;
+ }
+ }
+ else if (!string_is_empty(disk_index_file->image_path))
+ {
+ disk_index_file->image_path[0] = '\0';
+ disk_index_file->modified = true;
+ }
+}
+
+/**********/
+/* Saving */
+/**********/
+
+/* Saves specified disk index file to disk */
+bool disk_index_file_save(disk_index_file_t *disk_index_file)
+{
+ char value_string[32];
+ DCifJSONContext context = {0};
+ RFILE *file = NULL;
+ bool success = false;
+ int n;
+
+ value_string[0] = '\0';
+
+ /* Sanity check */
+ if (!disk_index_file)
+ return false;
+
+ /* > Only save file if record has been modified.
+ * We return true in this case - since there
+ * was nothing to write, there can be no
+ * 'failure' */
+ if (!disk_index_file->modified)
+ return true;
+
+ if (string_is_empty(disk_index_file->file_path))
+ return false;
+
+ RARCH_LOG(
+ "[disk index file] Saving disk index file: %s\n",
+ disk_index_file->file_path);
+
+ /* Attempt to open disk index file */
+ file = filestream_open(
+ disk_index_file->file_path,
+ RETRO_VFS_FILE_ACCESS_WRITE,
+ RETRO_VFS_FILE_ACCESS_HINT_NONE);
+
+ if (!file)
+ {
+ RARCH_ERR(
+ "[disk index file] Failed to open disk index file: %s\n",
+ disk_index_file->file_path);
+ return false;
+ }
+
+ /* Initialise JSON writer */
+ context.writer = JSON_Writer_Create(NULL);
+ context.file = file;
+
+ if (!context.writer)
+ {
+ RARCH_ERR("[disk index file] Failed to create JSON writer.\n");
+ goto end;
+ }
+
+ /* Configure JSON writer */
+ JSON_Writer_SetOutputEncoding(context.writer, JSON_UTF8);
+ JSON_Writer_SetOutputHandler(context.writer, &DCifJSONOutputHandler);
+ JSON_Writer_SetUserData(context.writer, &context);
+
+ /* Write output file */
+ JSON_Writer_WriteStartObject(context.writer);
+ JSON_Writer_WriteNewLine(context.writer);
+
+ /* > Version entry */
+ JSON_Writer_WriteSpace(context.writer, 2);
+ JSON_Writer_WriteString(context.writer, "version",
+ STRLEN_CONST("version"), JSON_UTF8);
+ JSON_Writer_WriteColon(context.writer);
+ JSON_Writer_WriteSpace(context.writer, 1);
+ JSON_Writer_WriteString(context.writer, "1.0",
+ STRLEN_CONST("1.0"), JSON_UTF8);
+ JSON_Writer_WriteComma(context.writer);
+ JSON_Writer_WriteNewLine(context.writer);
+
+ /* > image index entry */
+ n = snprintf(
+ value_string, sizeof(value_string),
+ "%u", disk_index_file->image_index);
+ if ((n < 0) || (n >= 32))
+ n = 0; /* Silence GCC warnings... */
+
+ JSON_Writer_WriteSpace(context.writer, 2);
+ JSON_Writer_WriteString(context.writer, "image_index",
+ STRLEN_CONST("image_index"), JSON_UTF8);
+ JSON_Writer_WriteColon(context.writer);
+ JSON_Writer_WriteSpace(context.writer, 1);
+ JSON_Writer_WriteNumber(context.writer, value_string,
+ strlen(value_string), JSON_UTF8);
+ JSON_Writer_WriteComma(context.writer);
+ JSON_Writer_WriteNewLine(context.writer);
+
+ /* > image path entry */
+ JSON_Writer_WriteSpace(context.writer, 2);
+ JSON_Writer_WriteString(context.writer, "image_path",
+ STRLEN_CONST("image_path"), JSON_UTF8);
+ JSON_Writer_WriteColon(context.writer);
+ JSON_Writer_WriteSpace(context.writer, 1);
+ JSON_Writer_WriteString(context.writer,
+ disk_index_file->image_path,
+ strlen(disk_index_file->image_path), JSON_UTF8);
+ JSON_Writer_WriteNewLine(context.writer);
+
+ /* > Finalise */
+ JSON_Writer_WriteEndObject(context.writer);
+ JSON_Writer_WriteNewLine(context.writer);
+
+ /* Free JSON writer */
+ JSON_Writer_Free(context.writer);
+
+ /* Changes have been written - record
+ * is no longer considered to be in a
+ * 'modified' state */
+ disk_index_file->modified = false;
+ success = true;
+
+end:
+ /* Close disk index file */
+ filestream_close(file);
+
+ return success;
+}
diff --git a/disk_index_file.h b/disk_index_file.h
new file mode 100644
index 0000000000..109bc82c12
--- /dev/null
+++ b/disk_index_file.h
@@ -0,0 +1,76 @@
+/* Copyright (C) 2010-2020 The RetroArch team
+ *
+ * ---------------------------------------------------------------------------------------
+ * The following license statement only applies to this file (disk_index_file.h).
+ * ---------------------------------------------------------------------------------------
+ *
+ * Permission is hereby granted, free of charge,
+ * to any person obtaining a copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef __DISK_INDEX_FILE_H
+#define __DISK_INDEX_FILE_H
+
+#include
+#include
+#include
+
+#include
+
+RETRO_BEGIN_DECLS
+
+/* Holds all parameters required for recording
+ * the last disk image selected via the disk
+ * control interface */
+typedef struct
+{
+ bool modified;
+ unsigned image_index;
+ char image_path[PATH_MAX_LENGTH];
+ char file_path[PATH_MAX_LENGTH];
+} disk_index_file_t;
+
+/******************/
+/* Initialisation */
+/******************/
+
+/* Initialises existing disk index record, loading
+ * current parameters if a record file exists.
+ * Returns false if arguments are invalid. */
+bool disk_index_file_init(
+ disk_index_file_t *disk_index_file,
+ const char *content_path,
+ const char *dir_savefile);
+
+/***********/
+/* Setters */
+/***********/
+
+/* Sets image index and path */
+void disk_index_file_set(
+ disk_index_file_t *disk_index_file,
+ unsigned image_index,
+ const char *image_path);
+
+/**********/
+/* Saving */
+/**********/
+
+/* Saves specified disk index file to disk */
+bool disk_index_file_save(disk_index_file_t *disk_index_file);
+
+RETRO_END_DECLS
+
+#endif
diff --git a/file_path_special.h b/file_path_special.h
index a6b13d2671..12e85bb806 100644
--- a/file_path_special.h
+++ b/file_path_special.h
@@ -95,7 +95,8 @@ enum file_path_enum
FILE_PATH_CORE_INFO_EXTENSION,
FILE_PATH_RUNTIME_EXTENSION,
FILE_PATH_DEFAULT_EVENT_LOG,
- FILE_PATH_EVENT_LOG_EXTENSION
+ FILE_PATH_EVENT_LOG_EXTENSION,
+ FILE_PATH_DISK_CONTROL_INDEX_EXTENSION
};
enum application_special_type
diff --git a/file_path_str.c b/file_path_str.c
index 97e7e16887..dc09b6f360 100644
--- a/file_path_str.c
+++ b/file_path_str.c
@@ -227,6 +227,9 @@ const char *file_path_str(enum file_path_enum enum_idx)
case FILE_PATH_EVENT_LOG_EXTENSION:
str = ".log";
break;
+ case FILE_PATH_DISK_CONTROL_INDEX_EXTENSION:
+ str = ".ldci";
+ break;
case FILE_PATH_UNKNOWN:
default:
break;
diff --git a/frontend/drivers/platform_switch.c b/frontend/drivers/platform_switch.c
index 92685e5aa2..250a505511 100644
--- a/frontend/drivers/platform_switch.c
+++ b/frontend/drivers/platform_switch.c
@@ -63,7 +63,7 @@ bool platform_switch_has_focus = true;
/* Splash */
static uint32_t *splashData = NULL;
-static bool psmInitialized = false;
+static bool psmInitialized = false;
static AppletHookCookie applet_hook_cookie;
@@ -71,12 +71,19 @@ static AppletHookCookie applet_hook_cookie;
extern bool nxlink_connected;
#endif
-void libnx_apply_overclock() {
- const size_t profiles_count = sizeof(SWITCH_CPU_PROFILES) / sizeof(SWITCH_CPU_PROFILES[1]);
- if (config_get_ptr()->uints.libnx_overclock >= 0 && config_get_ptr()->uints.libnx_overclock <= profiles_count){
- if(hosversionBefore(8, 0, 0)) {
+void libnx_apply_overclock(void)
+{
+ const size_t profiles_count = sizeof(SWITCH_CPU_PROFILES)
+ / sizeof(SWITCH_CPU_PROFILES[1]);
+
+ if (config_get_ptr()->uints.libnx_overclock >= 0 && config_get_ptr()->uints.libnx_overclock <= profiles_count)
+ {
+ if (hosversionBefore(8, 0, 0))
+ {
pcvSetClockRate(PcvModule_CpuBus, SWITCH_CPU_SPEEDS_VALUES[config_get_ptr()->uints.libnx_overclock]);
- } else {
+ }
+ else
+ {
ClkrstSession session = {0};
clkrstOpenSession(&session, PcvModuleId_CpuBus, 3);
clkrstSetClockRate(&session, SWITCH_CPU_SPEEDS_VALUES[config_get_ptr()->uints.libnx_overclock]);
@@ -85,52 +92,59 @@ void libnx_apply_overclock() {
}
}
-static void on_applet_hook(AppletHookType hook, void *param) {
+static void on_applet_hook(AppletHookType hook, void *param)
+{
u32 performance_mode;
AppletFocusState focus_state;
/* Exit request */
switch (hook)
{
- case AppletHookType_OnExitRequest:
- RARCH_LOG("Got AppletHook OnExitRequest, exiting.\n");
- retroarch_main_quit();
- break;
+ case AppletHookType_OnExitRequest:
+ RARCH_LOG("Got AppletHook OnExitRequest, exiting.\n");
+ retroarch_main_quit();
+ break;
- /* Focus state*/
- case AppletHookType_OnFocusState:
- focus_state = appletGetFocusState();
- RARCH_LOG("Got AppletHook OnFocusState - new focus state is %d\n", focus_state);
- platform_switch_has_focus = focus_state == AppletFocusState_Focused;
- if(!platform_switch_has_focus) {
- if(hosversionBefore(8, 0, 0)) {
- pcvSetClockRate(PcvModule_CpuBus, 1020000000);
- } else {
- ClkrstSession session = {0};
- clkrstOpenSession(&session, PcvModuleId_CpuBus, 3);
- clkrstSetClockRate(&session, 1020000000);
- clkrstCloseSession(&session);
+ /* Focus state*/
+ case AppletHookType_OnFocusState:
+ focus_state = appletGetFocusState();
+ RARCH_LOG("Got AppletHook OnFocusState - new focus state is %d\n", focus_state);
+ platform_switch_has_focus = focus_state == AppletFocusState_Focused;
+
+ if (!platform_switch_has_focus)
+ {
+ if (hosversionBefore(8, 0, 0))
+ {
+ pcvSetClockRate(PcvModule_CpuBus, 1020000000);
+ }
+ else
+ {
+ ClkrstSession session = {0};
+ clkrstOpenSession(&session, PcvModuleId_CpuBus, 3);
+ clkrstSetClockRate(&session, 1020000000);
+ clkrstCloseSession(&session);
+ }
}
- } else {
+ else
+ libnx_apply_overclock();
+ break;
+
+ /* Performance mode */
+ case AppletHookType_OnPerformanceMode:
+ /* 0 == Handheld, 1 == Docked
+ * Since CPU doesn't change we just re-apply */
+ performance_mode = appletGetPerformanceMode();
libnx_apply_overclock();
- }
- break;
+ break;
- /* Performance mode */
- case AppletHookType_OnPerformanceMode:
- // 0 == Handheld, 1 == Docked
- // Since CPU doesn't change we just re-apply
- performance_mode = appletGetPerformanceMode();
- libnx_apply_overclock();
- break;
-
- default:
- break;
+ default:
+ break;
}
}
#endif /* HAVE_LIBNX */
+#ifdef IS_SALAMANDER
static void get_first_valid_core(char *path_return)
{
DIR *dir;
@@ -140,11 +154,11 @@ static void get_first_valid_core(char *path_return)
path_return[0] = '\0';
dir = opendir(SD_PREFIX "/retroarch/cores");
- if (dir != NULL)
+ if (dir)
{
- while ((ent = readdir(dir)) != NULL)
+ while ((ent = readdir(dir)))
{
- if (ent == NULL)
+ if (!ent)
break;
if (strlen(ent->d_name) > strlen(extension) && !strcmp(ent->d_name + strlen(ent->d_name) - strlen(extension), extension))
{
@@ -157,8 +171,10 @@ static void get_first_valid_core(char *path_return)
closedir(dir);
}
}
+#endif
-static void frontend_switch_get_environment_settings(int *argc, char *argv[], void *args, void *params_data)
+static void frontend_switch_get_environment_settings(
+ int *argc, char *argv[], void *args, void *params_data)
{
unsigned i;
(void)args;
@@ -266,10 +282,13 @@ static void frontend_switch_deinit(void *data)
#ifdef HAVE_LIBNX
nifmExit();
- if(hosversionBefore(8, 0, 0)) {
+ if (hosversionBefore(8, 0, 0))
+ {
pcvSetClockRate(PcvModule_CpuBus, 1020000000);
pcvExit();
- } else {
+ }
+ else
+ {
ClkrstSession session = {0};
clkrstOpenSession(&session, PcvModuleId_CpuBus, 3);
clkrstSetClockRate(&session, 1020000000);
@@ -548,26 +567,21 @@ ssize_t readlink(const char *restrict path, char *restrict buf, size_t bufsize)
/* Taken from glibc */
char *realpath(const char *name, char *resolved)
{
- char *rpath, *dest, *extra_buf = NULL;
+ char *rpath, *dest = NULL;
const char *start, *end, *rpath_limit;
long int path_max;
- int num_links = 0;
- if (name == NULL)
- {
- /* As per Single Unix Specification V2 we must return an error if
- either parameter is a null pointer. We extend this to allow
- the RESOLVED parameter to be NULL in case the we are expected to
- allocate the room for the return value. */
+ /* As per Single Unix Specification V2 we must return an error if
+ either parameter is a null pointer. We extend this to allow
+ the RESOLVED parameter to be NULL in case the we are expected to
+ allocate the room for the return value. */
+ if (!name)
return NULL;
- }
+ /* As per Single Unix Specification V2 we must return an error if
+ the name argument points to an empty string. */
if (name[0] == '\0')
- {
- /* As per Single Unix Specification V2 we must return an error if
- the name argument points to an empty string. */
return NULL;
- }
#ifdef PATH_MAX
path_max = PATH_MAX;
@@ -577,10 +591,10 @@ char *realpath(const char *name, char *resolved)
path_max = 1024;
#endif
- if (resolved == NULL)
+ if (!resolved)
{
rpath = malloc(path_max);
- if (rpath == NULL)
+ if (!rpath)
return NULL;
}
else
@@ -650,7 +664,7 @@ char *realpath(const char *name, char *resolved)
else
new_size += path_max;
new_rpath = (char *)realloc(rpath, new_size);
- if (new_rpath == NULL)
+ if (!new_rpath)
goto error;
rpath = new_rpath;
rpath_limit = rpath + new_size;
@@ -669,7 +683,7 @@ char *realpath(const char *name, char *resolved)
return rpath;
error:
- if (resolved == NULL)
+ if (!resolved)
free(rpath);
return NULL;
}
@@ -688,12 +702,10 @@ static void frontend_switch_init(void *data)
{
#ifdef HAVE_LIBNX
bool recording_supported = false;
- uint32_t width = 0;
- uint32_t height = 0;
- nifmInitialize();
+ nifmInitialize(NifmServiceType_User);
- if(hosversionBefore(8, 0, 0))
+ if (hosversionBefore(8, 0, 0))
pcvInitialize();
else
clkrstInitialize();
@@ -703,7 +715,7 @@ static void frontend_switch_init(void *data)
appletSetFocusHandlingMode(AppletFocusHandlingMode_NoSuspend);
appletIsGamePlayRecordingSupported(&recording_supported);
- if(recording_supported)
+ if (recording_supported)
appletInitializeGamePlayRecording();
#ifdef NXLINK
@@ -723,65 +735,6 @@ static void frontend_switch_init(void *data)
RARCH_WARN("Error initializing psm\n");
}
-#if 0
-#ifndef HAVE_OPENGL
- /* Load splash */
- if (!splashData)
- {
- rarch_system_info_t *sys_info = runloop_get_system_info();
- retro_get_system_info(sys_info);
-
- if (sys_info)
- {
- const char *core_name = sys_info->info.library_name;
- char *full_core_splash_path = (char*)malloc(PATH_MAX);
-
- snprintf(full_core_splash_path,
- PATH_MAX, "/retroarch/rgui/splash/%s.png", core_name);
-
- rpng_load_image_argb((const char *)
- full_core_splash_path, &splashData, &width, &height);
-
- if (splashData)
- {
- argb_to_rgba8(splashData, height, width);
- frontend_switch_showsplash();
- }
- else
- {
- rpng_load_image_argb(
- "/retroarch/rgui/splash/RetroArch.png",
- &splashData, &width, &height);
-
- if (splashData)
- {
- argb_to_rgba8(splashData, height, width);
- frontend_switch_showsplash();
- }
- }
-
- free(full_core_splash_path);
- }
- else
- {
- rpng_load_image_argb(
- "/retroarch/rgui/splash/RetroArch.png",
- &splashData, &width, &height);
-
- if (splashData)
- {
- argb_to_rgba8(splashData, height, width);
- frontend_switch_showsplash();
- }
- }
- }
- else
- {
- frontend_switch_showsplash();
- }
-#endif
-#endif
-
#endif /* HAVE_LIBNX (splash) */
}
diff --git a/frontend/frontend_driver.c b/frontend/frontend_driver.c
index 8b8c68c845..1fc6f96a8e 100644
--- a/frontend/frontend_driver.c
+++ b/frontend/frontend_driver.c
@@ -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[] = {
diff --git a/gfx/common/egl_common.c b/gfx/common/egl_common.c
index 2b6905b63a..791f1b86e2 100644
--- a/gfx/common/egl_common.c
+++ b/gfx/common/egl_common.c
@@ -564,7 +564,6 @@ bool egl_init_context(egl_ctx_data_t *egl,
EGLint *count, const EGLint *attrib_ptr,
egl_accept_config_cb_t cb)
{
- int config_index = -1;
EGLDisplay dpy = get_egl_display(platform, display_data);
if (dpy == EGL_NO_DISPLAY)
diff --git a/gfx/common/gl_core_common.h b/gfx/common/gl_core_common.h
index a20236de76..b068d4c308 100644
--- a/gfx/common/gl_core_common.h
+++ b/gfx/common/gl_core_common.h
@@ -139,6 +139,30 @@ typedef struct gl_core
void gl_core_bind_scratch_vbo(gl_core_t *gl, const void *data, size_t size);
+GLuint gl_core_compile_shader(GLenum stage, const char *source);
+
+void gl_core_framebuffer_clear(GLuint id);
+
+void gl_core_framebuffer_copy(
+ GLuint fb_id,
+ GLuint quad_program,
+ GLuint quad_vbo,
+ GLint flat_ubo_vertex,
+ struct Size2D size,
+ GLuint image);
+
+void gl_core_framebuffer_copy_partial(
+ GLuint fb_id,
+ GLuint quad_program,
+ GLint flat_ubo_vertex,
+ struct Size2D size,
+ GLuint image,
+ float rx, float ry);
+
+void gl_core_build_default_matrix(float *data);
+
+uint32_t gl_core_get_cross_compiler_target_version(void);
+
RETRO_END_DECLS
#endif
diff --git a/gfx/common/vulkan_common.c b/gfx/common/vulkan_common.c
index b48f46c839..f8b410b6cd 100644
--- a/gfx/common/vulkan_common.c
+++ b/gfx/common/vulkan_common.c
@@ -3175,3 +3175,313 @@ bool vulkan_create_swapchain(gfx_ctx_vulkan_data_t *vk,
return true;
}
+
+void vulkan_initialize_render_pass(VkDevice device, VkFormat format,
+ VkRenderPass *render_pass)
+{
+ VkRenderPassCreateInfo rp_info = {
+ VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO };
+ VkAttachmentReference color_ref = { 0,
+ VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL };
+ VkAttachmentDescription attachment = {0};
+ VkSubpassDescription subpass = {0};
+
+ /* We will always write to the entire framebuffer,
+ * so we don't really need to clear. */
+ attachment.format = format;
+ attachment.samples = VK_SAMPLE_COUNT_1_BIT;
+ attachment.loadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE;
+ attachment.storeOp = VK_ATTACHMENT_STORE_OP_STORE;
+ attachment.stencilLoadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE;
+ attachment.stencilStoreOp = VK_ATTACHMENT_STORE_OP_DONT_CARE;
+
+ attachment.initialLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
+ attachment.finalLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
+
+ subpass.pipelineBindPoint = VK_PIPELINE_BIND_POINT_GRAPHICS;
+ subpass.colorAttachmentCount = 1;
+ subpass.pColorAttachments = &color_ref;
+
+ rp_info.attachmentCount = 1;
+ rp_info.pAttachments = &attachment;
+ rp_info.subpassCount = 1;
+ rp_info.pSubpasses = &subpass;
+
+ vkCreateRenderPass(device, &rp_info, NULL, render_pass);
+}
+
+void vulkan_set_uniform_buffer(
+ VkDevice device,
+ VkDescriptorSet set,
+ unsigned binding,
+ VkBuffer buffer,
+ VkDeviceSize offset,
+ VkDeviceSize range)
+{
+ VkDescriptorBufferInfo buffer_info;
+ VkWriteDescriptorSet write = { VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET };
+
+ buffer_info.buffer = buffer;
+ buffer_info.offset = offset;
+ buffer_info.range = range;
+
+ write.dstSet = set;
+ write.dstBinding = binding;
+ write.descriptorCount = 1;
+ write.descriptorType = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER;
+ write.pBufferInfo = &buffer_info;
+
+ vkUpdateDescriptorSets(device, 1, &write, 0, NULL);
+}
+
+void vulkan_framebuffer_generate_mips(
+ VkFramebuffer framebuffer,
+ VkImage image,
+ struct Size2D size,
+ VkCommandBuffer cmd,
+ unsigned levels
+ )
+{
+ unsigned i;
+ /* This is run every frame, so make sure
+ * we aren't opting into the "lazy" way of doing this. :) */
+ VkImageMemoryBarrier barriers[2] = {
+ { VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER },
+ { VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER },
+ };
+
+ /* First, transfer the input mip level to TRANSFER_SRC_OPTIMAL.
+ * This should allow the surface to stay compressed.
+ * All subsequent mip-layers are now transferred into DST_OPTIMAL from
+ * UNDEFINED at this point.
+ */
+
+ /* Input */
+ barriers[0].srcAccessMask = VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT;
+ barriers[0].dstAccessMask = VK_ACCESS_TRANSFER_READ_BIT;
+ barriers[0].oldLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
+ barriers[0].newLayout = VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL;
+ barriers[0].srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
+ barriers[0].dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
+ barriers[0].image = image;
+ barriers[0].subresourceRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
+ barriers[0].subresourceRange.baseMipLevel = 0;
+ barriers[0].subresourceRange.levelCount = 1;
+ barriers[0].subresourceRange.layerCount = VK_REMAINING_ARRAY_LAYERS;
+
+ /* The rest of the mip chain */
+ barriers[1].srcAccessMask = 0;
+ barriers[1].dstAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT;
+ barriers[1].oldLayout = VK_IMAGE_LAYOUT_UNDEFINED;
+ barriers[1].newLayout = VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL;
+ barriers[1].srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
+ barriers[1].dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
+ barriers[1].image = image;
+ barriers[1].subresourceRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
+ barriers[1].subresourceRange.baseMipLevel = 1;
+ barriers[1].subresourceRange.levelCount = VK_REMAINING_MIP_LEVELS;
+ barriers[1].subresourceRange.layerCount = VK_REMAINING_ARRAY_LAYERS;
+
+ vkCmdPipelineBarrier(cmd,
+ VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT,
+ VK_PIPELINE_STAGE_TRANSFER_BIT,
+ false,
+ 0,
+ NULL,
+ 0,
+ NULL,
+ 2,
+ barriers);
+
+ for (i = 1; i < levels; i++)
+ {
+ unsigned src_width, src_height, target_width, target_height;
+ VkImageBlit blit_region = {0};
+
+ /* For subsequent passes, we have to transition
+ * from DST_OPTIMAL to SRC_OPTIMAL,
+ * but only do so one mip-level at a time. */
+ if (i > 1)
+ {
+ barriers[0].srcAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT;
+ barriers[0].dstAccessMask = VK_ACCESS_TRANSFER_READ_BIT;
+ barriers[0].subresourceRange.baseMipLevel = i - 1;
+ barriers[0].subresourceRange.levelCount = 1;
+ barriers[0].oldLayout = VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL;
+ barriers[0].newLayout = VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL;
+
+ vkCmdPipelineBarrier(cmd,
+ VK_PIPELINE_STAGE_TRANSFER_BIT,
+ VK_PIPELINE_STAGE_TRANSFER_BIT,
+ false,
+ 0,
+ NULL,
+ 0,
+ NULL,
+ 1,
+ barriers);
+ }
+
+ src_width = MAX(size.width >> (i - 1), 1u);
+ src_height = MAX(size.height >> (i - 1), 1u);
+ target_width = MAX(size.width >> i, 1u);
+ target_height = MAX(size.height >> i, 1u);
+
+ blit_region.srcSubresource.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
+ blit_region.srcSubresource.mipLevel = i - 1;
+ blit_region.srcSubresource.baseArrayLayer = 0;
+ blit_region.srcSubresource.layerCount = 1;
+ blit_region.dstSubresource = blit_region.srcSubresource;
+ blit_region.dstSubresource.mipLevel = i;
+ blit_region.srcOffsets[1].x = src_width;
+ blit_region.srcOffsets[1].y = src_height;
+ blit_region.srcOffsets[1].z = 1;
+ blit_region.dstOffsets[1].x = target_width;
+ blit_region.dstOffsets[1].y = target_height;
+ blit_region.dstOffsets[1].z = 1;
+
+ vkCmdBlitImage(cmd,
+ image, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL,
+ image, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,
+ 1, &blit_region, VK_FILTER_LINEAR);
+ }
+
+ /* We are now done, and we have all mip-levels except
+ * the last in TRANSFER_SRC_OPTIMAL,
+ * and the last one still on TRANSFER_DST_OPTIMAL,
+ * so do a final barrier which
+ * moves everything to SHADER_READ_ONLY_OPTIMAL in
+ * one go along with the execution barrier to next pass.
+ * Read-to-read memory barrier, so only need execution
+ * barrier for first transition.
+ */
+ barriers[0].srcAccessMask = VK_ACCESS_TRANSFER_READ_BIT;
+ barriers[0].dstAccessMask = VK_ACCESS_SHADER_READ_BIT;
+ barriers[0].subresourceRange.baseMipLevel = 0;
+ barriers[0].subresourceRange.levelCount = levels - 1;
+ barriers[0].oldLayout = VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL;
+ barriers[0].newLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL;
+
+ /* This is read-after-write barrier. */
+ barriers[1].srcAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT;
+ barriers[1].dstAccessMask = VK_ACCESS_SHADER_READ_BIT;
+ barriers[1].subresourceRange.baseMipLevel = levels - 1;
+ barriers[1].subresourceRange.levelCount = 1;
+ barriers[1].oldLayout = VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL;
+ barriers[1].newLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL;
+
+ vkCmdPipelineBarrier(cmd,
+ VK_PIPELINE_STAGE_TRANSFER_BIT,
+ VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT,
+ false,
+ 0,
+ NULL,
+ 0,
+ NULL,
+ 2, barriers);
+
+ /* Next pass will wait for ALL_GRAPHICS_BIT, and since
+ * we have dstStage as FRAGMENT_SHADER,
+ * the dependency chain will ensure we don't start
+ * next pass until the mipchain is complete. */
+}
+
+void vulkan_framebuffer_copy(VkImage image,
+ struct Size2D size,
+ VkCommandBuffer cmd,
+ VkImage src_image, VkImageLayout src_layout)
+{
+ VkImageCopy region;
+
+ vulkan_image_layout_transition_levels(cmd, image,VK_REMAINING_MIP_LEVELS,
+ VK_IMAGE_LAYOUT_UNDEFINED, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,
+ 0, VK_ACCESS_TRANSFER_WRITE_BIT,
+ VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT,
+ VK_PIPELINE_STAGE_TRANSFER_BIT);
+
+ memset(®ion, 0, sizeof(region));
+
+ region.srcSubresource.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
+ region.srcSubresource.layerCount = 1;
+ region.dstSubresource = region.srcSubresource;
+ region.extent.width = size.width;
+ region.extent.height = size.height;
+ region.extent.depth = 1;
+
+ vkCmdCopyImage(cmd,
+ src_image, src_layout,
+ image, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,
+ 1, ®ion);
+
+ vulkan_image_layout_transition_levels(cmd,
+ image,
+ VK_REMAINING_MIP_LEVELS,
+ VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,
+ VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL,
+ VK_ACCESS_TRANSFER_WRITE_BIT,
+ VK_ACCESS_SHADER_READ_BIT,
+ VK_PIPELINE_STAGE_TRANSFER_BIT,
+ VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT);
+}
+
+void vulkan_framebuffer_clear(VkImage image, VkCommandBuffer cmd)
+{
+ VkClearColorValue color;
+ VkImageSubresourceRange range;
+
+ vulkan_image_layout_transition_levels(cmd,
+ image,
+ VK_REMAINING_MIP_LEVELS,
+ VK_IMAGE_LAYOUT_UNDEFINED,
+ VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,
+ 0,
+ VK_ACCESS_TRANSFER_WRITE_BIT,
+ VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT,
+ VK_PIPELINE_STAGE_TRANSFER_BIT);
+
+ memset(&color, 0, sizeof(color));
+ memset(&range, 0, sizeof(range));
+
+ range.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
+ range.levelCount = 1;
+ range.layerCount = 1;
+
+ vkCmdClearColorImage(cmd,
+ image,
+ VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,
+ &color,
+ 1,
+ &range);
+
+ vulkan_image_layout_transition_levels(cmd,
+ image,
+ VK_REMAINING_MIP_LEVELS,
+ VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,
+ VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL,
+ VK_ACCESS_TRANSFER_WRITE_BIT,
+ VK_ACCESS_SHADER_READ_BIT,
+ VK_PIPELINE_STAGE_TRANSFER_BIT,
+ VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT);
+}
+
+void vulkan_pass_set_texture(
+ VkDevice device,
+ VkDescriptorSet set, VkSampler sampler,
+ unsigned binding,
+ VkImageView imageView, VkImageLayout imageLayout)
+{
+ VkDescriptorImageInfo image_info;
+ VkWriteDescriptorSet write = { VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET };
+
+ image_info.sampler = sampler;
+ image_info.imageView = imageView;
+ image_info.imageLayout = imageLayout;
+
+ write.dstSet = set;
+ write.dstBinding = binding;
+ write.descriptorCount = 1;
+ write.descriptorType = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER;
+ write.pImageInfo = &image_info;
+
+ vkUpdateDescriptorSets(device, 1, &write, 0, NULL);
+}
diff --git a/gfx/common/vulkan_common.h b/gfx/common/vulkan_common.h
index 048c739aaa..7fa4813989 100644
--- a/gfx/common/vulkan_common.h
+++ b/gfx/common/vulkan_common.h
@@ -42,6 +42,7 @@
#include
#include
+#include "../video_defines.h"
#include "../../driver.h"
#include "../../retroarch.h"
#include "../../verbosity.h"
@@ -592,6 +593,38 @@ bool vulkan_create_swapchain(gfx_ctx_vulkan_data_t *vk,
unsigned width, unsigned height,
unsigned swap_interval);
+void vulkan_set_uniform_buffer(
+ VkDevice device,
+ VkDescriptorSet set,
+ unsigned binding,
+ VkBuffer buffer,
+ VkDeviceSize offset,
+ VkDeviceSize range);
+
+void vulkan_framebuffer_generate_mips(
+ VkFramebuffer framebuffer,
+ VkImage image,
+ struct Size2D size,
+ VkCommandBuffer cmd,
+ unsigned levels
+ );
+
+void vulkan_framebuffer_copy(VkImage image,
+ struct Size2D size,
+ VkCommandBuffer cmd,
+ VkImage src_image, VkImageLayout src_layout);
+
+void vulkan_framebuffer_clear(VkImage image, VkCommandBuffer cmd);
+
+void vulkan_initialize_render_pass(VkDevice device,
+ VkFormat format, VkRenderPass *render_pass);
+
+void vulkan_pass_set_texture(
+ VkDevice device,
+ VkDescriptorSet set, VkSampler sampler,
+ unsigned binding,
+ VkImageView imageView, VkImageLayout imageLayout);
+
RETRO_END_DECLS
#endif
diff --git a/gfx/common/win32_common.c b/gfx/common/win32_common.c
index ccb2bfa30d..22b8593233 100644
--- a/gfx/common/win32_common.c
+++ b/gfx/common/win32_common.c
@@ -89,6 +89,28 @@
#define EDS_ROTATEDMODE 4
#endif
+/* These are defined in later SDKs, thus ifdeffed. */
+
+#ifndef WM_MOUSEHWHEEL
+#define WM_MOUSEHWHEEL 0x20e
+#endif
+
+#ifndef WM_MOUSEWHEEL
+#define WM_MOUSEWHEEL 0x020A
+#endif
+
+#ifndef WM_POINTERUPDATE
+#define WM_POINTERUPDATE 0x0245
+#endif
+
+#ifndef WM_POINTERDOWN
+#define WM_POINTERDOWN 0x0246
+#endif
+
+#ifndef WM_POINTERUP
+#define WM_POINTERUP 0x0247
+#endif
+
const GUID GUID_DEVINTERFACE_HID = { 0x4d1e55b2, 0xf16f, 0x11Cf, { 0x88, 0xcb, 0x00, 0x11, 0x11, 0x00, 0x00, 0x30 } };
#if defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x501
static HDEVNOTIFY notification_handler;
@@ -203,7 +225,7 @@ typedef LONG (WINAPI *GETDISPLAYCONFIGBUFFERSIZES)(UINT32, UINT32*, UINT32*);
static bool g_win32_resized = false;
bool g_win32_restore_desktop = false;
static bool doubleclick_on_titlebar = false;
-static bool g_taskbar_is_created = false;
+static bool taskbar_is_created = false;
bool g_win32_inited = false;
static bool g_win32_quit = false;
@@ -273,7 +295,7 @@ static HMONITOR win32_monitor_all[MAX_MONITORS];
bool win32_taskbar_is_created(void)
{
- return g_taskbar_is_created;
+ return taskbar_is_created;
}
bool doubleclick_on_titlebar_pressed(void)
@@ -500,9 +522,10 @@ bool win32_load_content_from_gui(const char *szFilename)
{
bool okay = false;
settings_t *settings = config_get_ptr();
+ bool video_is_fs = settings->bools.video_fullscreen;
/* Fullscreen: Show mouse cursor for dialog */
- if (settings->bools.video_fullscreen)
+ if (video_is_fs)
video_driver_show_mouse();
/* Pick one core that could be compatible, ew */
@@ -515,7 +538,7 @@ bool win32_load_content_from_gui(const char *szFilename)
}
/* Fullscreen: Hide mouse cursor after dialog */
- if (settings->bools.video_fullscreen)
+ if (video_is_fs)
video_driver_hide_mouse();
return okay;
}
@@ -604,14 +627,222 @@ static void win32_save_position(void)
}
}
+static bool win32_browser(
+ HWND owner,
+ char *filename,
+ size_t filename_size,
+ const char *extensions,
+ const char *title,
+ const char *initial_dir)
+{
+ bool result = false;
+ const ui_browser_window_t *browser =
+ ui_companion_driver_get_browser_window_ptr();
+
+ if (browser)
+ {
+ ui_browser_window_state_t browser_state;
+
+ /* These need to be big enough to hold the
+ * path/name of any file the user may select.
+ * FIXME: We should really handle the
+ * error case when this isn't big enough. */
+ char new_title[PATH_MAX];
+ char new_file[32768];
+
+ new_title[0] = '\0';
+ new_file[0] = '\0';
+
+ if (!string_is_empty(title))
+ strlcpy(new_title, title, sizeof(new_title));
+
+ if (filename && *filename)
+ strlcpy(new_file, filename, sizeof(new_file));
+
+ /* OPENFILENAME.lpstrFilters is actually const,
+ * so this cast should be safe */
+ browser_state.filters = (char*)extensions;
+ browser_state.title = new_title;
+ browser_state.startdir = strdup(initial_dir);
+ browser_state.path = new_file;
+ browser_state.window = owner;
+
+ result = browser->open(&browser_state);
+
+ if (filename && browser_state.path)
+ strlcpy(filename, browser_state.path, filename_size);
+
+ free(browser_state.startdir);
+ }
+
+ return result;
+}
+
+
+static LRESULT win32_menu_loop(HWND owner, WPARAM wparam)
+{
+ WPARAM mode = wparam & 0xffff;
+
+ switch (mode)
+ {
+ case ID_M_LOAD_CORE:
+ {
+ char win32_file[PATH_MAX_LENGTH] = {0};
+ settings_t *settings = config_get_ptr();
+ char *title_cp = NULL;
+ size_t converted = 0;
+ const char *extensions = "Libretro core (.dll)\0*.dll\0All Files\0*.*\0\0";
+ const char *title = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_CORE_LIST);
+ const char *initial_dir = settings->paths.directory_libretro;
+
+ /* Convert UTF8 to UTF16, then back to the
+ * local code page.
+ * This is needed for proper multi-byte
+ * string display until Unicode is
+ * fully supported.
+ */
+ wchar_t *title_wide = utf8_to_utf16_string_alloc(title);
+
+ if (title_wide)
+ title_cp = utf16_to_utf8_string_alloc(title_wide);
+
+ if (!win32_browser(owner, win32_file, sizeof(win32_file),
+ extensions, title_cp, initial_dir))
+ {
+ if (title_wide)
+ free(title_wide);
+ if (title_cp)
+ free(title_cp);
+ break;
+ }
+
+ if (title_wide)
+ free(title_wide);
+ if (title_cp)
+ free(title_cp);
+ path_set(RARCH_PATH_CORE, win32_file);
+ command_event(CMD_EVENT_LOAD_CORE, NULL);
+ }
+ break;
+ case ID_M_LOAD_CONTENT:
+ {
+ char win32_file[PATH_MAX_LENGTH] = {0};
+ char *title_cp = NULL;
+ size_t converted = 0;
+ const char *extensions = "All Files (*.*)\0*.*\0\0";
+ const char *title = msg_hash_to_str(
+ MENU_ENUM_LABEL_VALUE_LOAD_CONTENT_LIST);
+ settings_t *settings = config_get_ptr();
+ const char *initial_dir = settings->paths.directory_menu_content;
+
+ /* Convert UTF8 to UTF16, then back to the
+ * local code page.
+ * This is needed for proper multi-byte
+ * string display until Unicode is
+ * fully supported.
+ */
+ wchar_t *title_wide = utf8_to_utf16_string_alloc(title);
+
+ if (title_wide)
+ title_cp = utf16_to_utf8_string_alloc(title_wide);
+
+ if (!win32_browser(owner, win32_file, sizeof(win32_file),
+ extensions, title_cp, initial_dir))
+ {
+ if (title_wide)
+ free(title_wide);
+ if (title_cp)
+ free(title_cp);
+ break;
+ }
+
+ if (title_wide)
+ free(title_wide);
+ if (title_cp)
+ free(title_cp);
+ win32_load_content_from_gui(win32_file);
+ }
+ break;
+ case ID_M_RESET:
+ command_event(CMD_EVENT_RESET, NULL);
+ break;
+ case ID_M_MUTE_TOGGLE:
+ command_event(CMD_EVENT_AUDIO_MUTE_TOGGLE, NULL);
+ break;
+ case ID_M_MENU_TOGGLE:
+ command_event(CMD_EVENT_MENU_TOGGLE, NULL);
+ break;
+ case ID_M_PAUSE_TOGGLE:
+ command_event(CMD_EVENT_PAUSE_TOGGLE, NULL);
+ break;
+ case ID_M_LOAD_STATE:
+ command_event(CMD_EVENT_LOAD_STATE, NULL);
+ break;
+ case ID_M_SAVE_STATE:
+ command_event(CMD_EVENT_SAVE_STATE, NULL);
+ break;
+ case ID_M_DISK_CYCLE:
+ command_event(CMD_EVENT_DISK_EJECT_TOGGLE, NULL);
+ break;
+ case ID_M_DISK_NEXT:
+ command_event(CMD_EVENT_DISK_NEXT, NULL);
+ break;
+ case ID_M_DISK_PREV:
+ command_event(CMD_EVENT_DISK_PREV, NULL);
+ break;
+ case ID_M_FULL_SCREEN:
+ command_event(CMD_EVENT_FULLSCREEN_TOGGLE, NULL);
+ break;
+ case ID_M_MOUSE_GRAB:
+ command_event(CMD_EVENT_GRAB_MOUSE_TOGGLE, NULL);
+ break;
+ case ID_M_TAKE_SCREENSHOT:
+ command_event(CMD_EVENT_TAKE_SCREENSHOT, NULL);
+ break;
+ case ID_M_QUIT:
+ PostMessage(owner, WM_CLOSE, 0, 0);
+ break;
+ case ID_M_TOGGLE_DESKTOP:
+ command_event(CMD_EVENT_UI_COMPANION_TOGGLE, NULL);
+ break;
+ default:
+ if (mode >= ID_M_WINDOW_SCALE_1X && mode <= ID_M_WINDOW_SCALE_10X)
+ {
+ unsigned idx = (mode - (ID_M_WINDOW_SCALE_1X-1));
+ rarch_ctl(RARCH_CTL_SET_WINDOWED_SCALE, &idx);
+ command_event(CMD_EVENT_RESIZE_WINDOWED_SCALE, NULL);
+ }
+ else if (mode == ID_M_STATE_INDEX_AUTO)
+ {
+ signed idx = -1;
+ settings_t *settings = config_get_ptr();
+ configuration_set_int(
+ settings, settings->ints.state_slot, idx);
+ }
+ else if (mode >= (ID_M_STATE_INDEX_AUTO+1)
+ && mode <= (ID_M_STATE_INDEX_AUTO+10))
+ {
+ signed idx = (mode - (ID_M_STATE_INDEX_AUTO+1));
+ settings_t *settings = config_get_ptr();
+ configuration_set_int(
+ settings, settings->ints.state_slot, idx);
+ }
+ break;
+ }
+
+ return 0L;
+}
+
static LRESULT CALLBACK WndProcCommon(bool *quit, HWND hwnd, UINT message,
WPARAM wparam, LPARAM lparam)
{
- if (message == WM_NCLBUTTONDBLCLK)
- doubleclick_on_titlebar = true;
+ bool keydown = true;
switch (message)
{
+ case WM_NCLBUTTONDBLCLK:
+ doubleclick_on_titlebar = true;
+ break;
case WM_SYSCOMMAND:
/* Prevent screensavers, etc, while running. */
switch (wparam)
@@ -653,13 +884,15 @@ static LRESULT CALLBACK WndProcCommon(bool *quit, HWND hwnd, UINT message,
return TRUE;
case WM_KEYUP:
case WM_SYSKEYUP:
+ /* Key released */
+ keydown = false;
+ /* fall-through */
case WM_KEYDOWN:
case WM_SYSKEYDOWN:
*quit = true;
{
uint16_t mod = 0;
unsigned keycode = 0;
- bool keydown = true;
unsigned keysym = (lparam >> 16) & 0xff;
#if _WIN32_WINNT >= 0x0501 /* XP */
settings_t *settings = config_get_ptr();
@@ -679,7 +912,8 @@ static LRESULT CALLBACK WndProcCommon(bool *quit, HWND hwnd, UINT message,
mod |= RETROKMOD_META;
#if _WIN32_WINNT >= 0x0501 /* XP */
- if (settings && string_is_equal(settings->arrays.input_driver, "raw"))
+ if (settings &&
+ string_is_equal(settings->arrays.input_driver, "raw"))
keysym = (unsigned)wparam;
else
#endif
@@ -693,10 +927,6 @@ static LRESULT CALLBACK WndProcCommon(bool *quit, HWND hwnd, UINT message,
#endif
}
- /* Key released? */
- if (message == WM_KEYUP || message == WM_SYSKEYUP)
- keydown = false;
-
keycode = input_keymaps_translate_keysym_to_rk(keysym);
input_keyboard_event(keydown, keycode,
@@ -757,11 +987,36 @@ LRESULT CALLBACK WndProcD3D(HWND hwnd, UINT message,
LRESULT ret;
bool quit = false;
- if (message == WM_NCLBUTTONDBLCLK)
- doubleclick_on_titlebar = true;
-
switch (message)
{
+ case WM_MOUSEMOVE:
+ case WM_POINTERDOWN:
+ case WM_POINTERUP:
+ case WM_POINTERUPDATE:
+ case WM_DEVICECHANGE:
+ case WM_MOUSEWHEEL:
+ case WM_MOUSEHWHEEL:
+#if _WIN32_WINNT >= 0x0500 /* 2K */
+ if (g_taskbar_message && message == g_taskbar_message)
+ taskbar_is_created = true;
+#endif
+#ifdef HAVE_DINPUT
+ if (input_get_ptr() == &input_dinput)
+ {
+ void* input_data = input_get_data();
+ if (input_data && dinput_handle_message(input_data,
+ message, wparam, lparam))
+ return 0;
+ }
+#endif
+ break;
+ case WM_NCLBUTTONDBLCLK:
+ doubleclick_on_titlebar = true;
+#if _WIN32_WINNT >= 0x0500 /* 2K */
+ if (g_taskbar_message && message == g_taskbar_message)
+ taskbar_is_created = true;
+#endif
+ break;
case WM_DROPFILES:
case WM_SYSCOMMAND:
case WM_CHAR:
@@ -778,6 +1033,10 @@ LRESULT CALLBACK WndProcD3D(HWND hwnd, UINT message,
ret = WndProcCommon(&quit, hwnd, message, wparam, lparam);
if (quit)
return ret;
+#if _WIN32_WINNT >= 0x0500 /* 2K */
+ if (g_taskbar_message && message == g_taskbar_message)
+ taskbar_is_created = true;
+#endif
break;
case WM_CREATE:
{
@@ -791,20 +1050,6 @@ LRESULT CALLBACK WndProcD3D(HWND hwnd, UINT message,
return 0;
}
-#if _WIN32_WINNT >= 0x0500 /* 2K */
- if (g_taskbar_message && message == g_taskbar_message)
- g_taskbar_is_created = true;
-#endif
-
-#ifdef HAVE_DINPUT
- if (input_get_ptr() == &input_dinput)
- {
- void* input_data = input_get_data();
- if (input_data && dinput_handle_message(input_data,
- message, wparam, lparam))
- return 0;
- }
-#endif
return DefWindowProc(hwnd, message, wparam, lparam);
}
#endif
@@ -816,11 +1061,32 @@ LRESULT CALLBACK WndProcGL(HWND hwnd, UINT message,
LRESULT ret;
bool quit = false;
- if (message == WM_NCLBUTTONDBLCLK)
- doubleclick_on_titlebar = true;
-
switch (message)
{
+ case WM_MOUSEMOVE:
+ case WM_POINTERDOWN:
+ case WM_POINTERUP:
+ case WM_POINTERUPDATE:
+ case WM_DEVICECHANGE:
+ case WM_MOUSEWHEEL:
+ case WM_MOUSEHWHEEL:
+#if _WIN32_WINNT >= 0x0500 /* 2K */
+ if (g_taskbar_message && message == g_taskbar_message)
+ taskbar_is_created = true;
+#endif
+#ifdef HAVE_DINPUT
+ if (dinput_wgl && dinput_handle_message(dinput_wgl,
+ message, wparam, lparam))
+ return 0;
+#endif
+ break;
+ case WM_NCLBUTTONDBLCLK:
+ doubleclick_on_titlebar = true;
+#if _WIN32_WINNT >= 0x0500 /* 2K */
+ if (g_taskbar_message && message == g_taskbar_message)
+ taskbar_is_created = true;
+#endif
+ break;
case WM_DROPFILES:
case WM_SYSCOMMAND:
case WM_CHAR:
@@ -838,25 +1104,18 @@ LRESULT CALLBACK WndProcGL(HWND hwnd, UINT message,
hwnd, message, wparam, lparam);
if (quit)
return ret;
+#if _WIN32_WINNT >= 0x0500 /* 2K */
+ if (g_taskbar_message && message == g_taskbar_message)
+ taskbar_is_created = true;
+#endif
break;
case WM_CREATE:
create_graphics_context(hwnd, &g_win32_quit);
-
if (DragAcceptFiles_func)
DragAcceptFiles_func(hwnd, true);
return 0;
}
-#if _WIN32_WINNT >= 0x0500 /* 2K */
- if (g_taskbar_message && message == g_taskbar_message)
- g_taskbar_is_created = true;
-#endif
-
-#ifdef HAVE_DINPUT
- if (dinput_wgl && dinput_handle_message(dinput_wgl,
- message, wparam, lparam))
- return 0;
-#endif
return DefWindowProc(hwnd, message, wparam, lparam);
}
#endif
@@ -868,11 +1127,32 @@ LRESULT CALLBACK WndProcGDI(HWND hwnd, UINT message,
LRESULT ret;
bool quit = false;
- if (message == WM_NCLBUTTONDBLCLK)
- doubleclick_on_titlebar = true;
-
switch (message)
{
+ case WM_MOUSEMOVE:
+ case WM_POINTERDOWN:
+ case WM_POINTERUP:
+ case WM_POINTERUPDATE:
+ case WM_DEVICECHANGE:
+ case WM_MOUSEWHEEL:
+ case WM_MOUSEHWHEEL:
+#if _WIN32_WINNT >= 0x0500 /* 2K */
+ if (g_taskbar_message && message == g_taskbar_message)
+ taskbar_is_created = true;
+#endif
+#ifdef HAVE_DINPUT
+ if (dinput_gdi && dinput_handle_message(dinput_gdi,
+ message, wparam, lparam))
+ return 0;
+#endif
+ break;
+ case WM_NCLBUTTONDBLCLK:
+ doubleclick_on_titlebar = true;
+#if _WIN32_WINNT >= 0x0500 /* 2K */
+ if (g_taskbar_message && message == g_taskbar_message)
+ taskbar_is_created = true;
+#endif
+ break;
case WM_PAINT:
{
gdi_t *gdi = (gdi_t*)video_driver_get_ptr(false);
@@ -906,6 +1186,10 @@ LRESULT CALLBACK WndProcGDI(HWND hwnd, UINT message,
SelectObject(gdi->memDC, gdi->bmp_old);
}
+#if _WIN32_WINNT >= 0x0500 /* 2K */
+ if (g_taskbar_message && message == g_taskbar_message)
+ taskbar_is_created = true;
+#endif
break;
}
case WM_DROPFILES:
@@ -924,25 +1208,18 @@ LRESULT CALLBACK WndProcGDI(HWND hwnd, UINT message,
ret = WndProcCommon(&quit, hwnd, message, wparam, lparam);
if (quit)
return ret;
+#if _WIN32_WINNT >= 0x0500 /* 2K */
+ if (g_taskbar_message && message == g_taskbar_message)
+ taskbar_is_created = true;
+#endif
break;
case WM_CREATE:
create_gdi_context(hwnd, &g_win32_quit);
-
if (DragAcceptFiles_func)
DragAcceptFiles_func(hwnd, true);
return 0;
}
-#if _WIN32_WINNT >= 0x0500 /* 2K */
- if (g_taskbar_message && message == g_taskbar_message)
- g_taskbar_is_created = true;
-#endif
-
-#ifdef HAVE_DINPUT
- if (dinput_gdi && dinput_handle_message(dinput_gdi,
- message, wparam, lparam))
- return 0;
-#endif
return DefWindowProc(hwnd, message, wparam, lparam);
}
#endif
@@ -979,7 +1256,7 @@ bool win32_window_create(void *data, unsigned style,
#if defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x0500 /* 2K */
g_taskbar_message = RegisterWindowMessage("TaskbarButtonCreated");
- ZeroMemory(¬ification_filter, sizeof(notification_filter) );
+ memset(¬ification_filter, 0, sizeof(notification_filter));
notification_filter.dbcc_size = sizeof(DEV_BROADCAST_DEVICEINTERFACE);
notification_filter.dbcc_devicetype = DBT_DEVTYP_DEVICEINTERFACE;
notification_filter.dbcc_classguid = GUID_DEVINTERFACE_HID;
diff --git a/gfx/common/win32_common.h b/gfx/common/win32_common.h
index cd16046d98..f7fe71c6d3 100644
--- a/gfx/common/win32_common.h
+++ b/gfx/common/win32_common.h
@@ -138,8 +138,6 @@ LRESULT CALLBACK WndProcGDI(HWND hwnd, UINT message,
BOOL IsIconic(HWND hwnd);
#endif
-LRESULT win32_menu_loop(HWND owner, WPARAM wparam);
-
bool win32_load_content_from_gui(const char *szFilename);
void win32_setup_pixel_format(HDC hdc, bool supports_gl);
diff --git a/gfx/display_servers/dispserv_x11.c b/gfx/display_servers/dispserv_x11.c
index 253a14254c..7fbfc1510c 100644
--- a/gfx/display_servers/dispserv_x11.c
+++ b/gfx/display_servers/dispserv_x11.c
@@ -36,7 +36,6 @@
#include "../video_display_server.h"
#include "../common/x11_common.h"
-#include "../../configuration.h"
#include "../../retroarch.h"
#include "../video_crt_switch.h" /* needed to set aspect for low res in linux */
diff --git a/gfx/drivers/gl_core.c b/gfx/drivers/gl_core.c
index 3ad3782c8d..0579f396e4 100644
--- a/gfx/drivers/gl_core.c
+++ b/gfx/drivers/gl_core.c
@@ -53,6 +53,131 @@
static const struct video_ortho gl_core_default_ortho = {0, 1, 0, 1, -1, 1};
+void gl_core_build_default_matrix(float *data)
+{
+ data[0] = 2.0f;
+ data[1] = 0.0f;
+ data[2] = 0.0f;
+ data[3] = 0.0f;
+ data[4] = 0.0f;
+ data[5] = 2.0f;
+ data[6] = 0.0f;
+ data[7] = 0.0f;
+ data[8] = 0.0f;
+ data[9] = 0.0f;
+ data[10] = 2.0f;
+ data[11] = 0.0f;
+ data[12] = -1.0f;
+ data[13] = -1.0f;
+ data[14] = 0.0f;
+ data[15] = 1.0f;
+}
+
+void gl_core_framebuffer_copy(
+ GLuint fb_id,
+ GLuint quad_program,
+ GLuint quad_vbo,
+ GLint flat_ubo_vertex,
+ struct Size2D size,
+ GLuint image)
+{
+ glBindFramebuffer(GL_FRAMEBUFFER, fb_id);
+ glActiveTexture(GL_TEXTURE2);
+ glBindTexture(GL_TEXTURE_2D, image);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+ glViewport(0, 0, size.width, size.height);
+ glClear(GL_COLOR_BUFFER_BIT);
+
+ glUseProgram(quad_program);
+ if (flat_ubo_vertex >= 0)
+ {
+ float mvp[16];
+ gl_core_build_default_matrix(mvp);
+ glUniform4fv(flat_ubo_vertex, 4, mvp);
+ }
+
+ /* Draw quad */
+ glDisable(GL_CULL_FACE);
+ glDisable(GL_BLEND);
+ glDisable(GL_DEPTH_TEST);
+ glEnableVertexAttribArray(0);
+ glEnableVertexAttribArray(1);
+ glBindBuffer(GL_ARRAY_BUFFER, quad_vbo);
+ glVertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, 4 * sizeof(float),
+ (void *)((uintptr_t)(0)));
+ glVertexAttribPointer(1, 2, GL_FLOAT, GL_FALSE, 4 * sizeof(float),
+ (void *)((uintptr_t)(2 * sizeof(float))));
+ glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
+ glBindBuffer(GL_ARRAY_BUFFER, 0);
+ glDisableVertexAttribArray(0);
+ glDisableVertexAttribArray(1);
+
+ glUseProgram(0);
+ glBindTexture(GL_TEXTURE_2D, 0);
+ glBindFramebuffer(GL_FRAMEBUFFER, 0);
+}
+
+void gl_core_framebuffer_copy_partial(
+ GLuint fb_id,
+ GLuint quad_program,
+ GLint flat_ubo_vertex,
+ struct Size2D size,
+ GLuint image,
+ float rx, float ry)
+{
+ GLuint vbo;
+ const float quad_data[] = {
+ 0.0f, 0.0f, 0.0f, 0.0f,
+ 1.0f, 0.0f, rx, 0.0f,
+ 0.0f, 1.0f, 0.0f, ry,
+ 1.0f, 1.0f, rx, ry,
+ };
+
+ glBindFramebuffer(GL_FRAMEBUFFER, fb_id);
+ glActiveTexture(GL_TEXTURE2);
+ glBindTexture(GL_TEXTURE_2D, image);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+ glViewport(0, 0, size.width, size.height);
+ glClear(GL_COLOR_BUFFER_BIT);
+
+ glUseProgram(quad_program);
+ if (flat_ubo_vertex >= 0)
+ {
+ float mvp[16];
+ gl_core_build_default_matrix(mvp);
+ glUniform4fv(flat_ubo_vertex, 4, mvp);
+ }
+ glDisable(GL_CULL_FACE);
+ glDisable(GL_BLEND);
+ glDisable(GL_DEPTH_TEST);
+ glEnableVertexAttribArray(0);
+ glEnableVertexAttribArray(1);
+
+ /* A bit crude, but heeeey. */
+ glGenBuffers(1, &vbo);
+ glBindBuffer(GL_ARRAY_BUFFER, vbo);
+
+ glBufferData(GL_ARRAY_BUFFER, sizeof(quad_data), quad_data, GL_STREAM_DRAW);
+ glVertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, 4 * sizeof(float),
+ (void *)((uintptr_t)(0)));
+ glVertexAttribPointer(1, 2, GL_FLOAT, GL_FALSE, 4 * sizeof(float),
+ (void *)((uintptr_t)(2 * sizeof(float))));
+ glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
+ glBindBuffer(GL_ARRAY_BUFFER, 0);
+ glDeleteBuffers(1, &vbo);
+ glDisableVertexAttribArray(0);
+ glDisableVertexAttribArray(1);
+ glUseProgram(0);
+ glBindTexture(GL_TEXTURE_2D, 0);
+ glBindFramebuffer(GL_FRAMEBUFFER, 0);
+}
+
static void gl_core_deinit_fences(gl_core_t *gl)
{
unsigned i;
@@ -171,6 +296,92 @@ static void gl_core_fence_iterate(gl_core_t *gl, unsigned hard_sync_frames)
}
}
+uint32_t gl_core_get_cross_compiler_target_version(void)
+{
+ const char *version = (const char*)glGetString(GL_VERSION);
+ unsigned major = 0;
+ unsigned minor = 0;
+
+#ifdef HAVE_OPENGLES3
+ if (!version || sscanf(version, "OpenGL ES %u.%u", &major, &minor) != 2)
+ return 300;
+
+ if (major == 2 && minor == 0)
+ return 100;
+#else
+ if (!version || sscanf(version, "%u.%u", &major, &minor) != 2)
+ return 150;
+
+ if (major == 3)
+ {
+ switch (minor)
+ {
+ case 2:
+ return 150;
+ case 1:
+ return 140;
+ case 0:
+ return 130;
+ }
+ }
+ else if (major == 2)
+ {
+ switch (minor)
+ {
+ case 1:
+ return 120;
+ case 0:
+ return 110;
+ }
+ }
+#endif
+
+ return 100 * major + 10 * minor;
+}
+
+GLuint gl_core_compile_shader(GLenum stage, const char *source)
+{
+ GLint status;
+ GLuint shader = glCreateShader(stage);
+ const char *ptr = source;
+
+ glShaderSource(shader, 1, &ptr, NULL);
+ glCompileShader(shader);
+
+ glGetShaderiv(shader, GL_COMPILE_STATUS, &status);
+
+ if (!status)
+ {
+ GLint length;
+ glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &length);
+ if (length > 0)
+ {
+ char *info_log = (char*)malloc(length);
+
+ if (info_log)
+ {
+ glGetShaderInfoLog(shader, length, &length, info_log);
+ RARCH_ERR("[GLCore]: Failed to compile shader: %s\n", info_log);
+ free(info_log);
+ glDeleteShader(shader);
+ return 0;
+ }
+ }
+ }
+
+ return shader;
+}
+
+
+void gl_core_framebuffer_clear(GLuint id)
+{
+ glBindFramebuffer(GL_FRAMEBUFFER, id);
+ glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
+ glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
+ glClear(GL_COLOR_BUFFER_BIT);
+ glBindFramebuffer(GL_FRAMEBUFFER, 0);
+}
+
void gl_core_bind_scratch_vbo(gl_core_t *gl, const void *data, size_t size)
{
if (!gl->scratch_vbos[gl->scratch_vbo_index])
diff --git a/gfx/drivers/vulkan.c b/gfx/drivers/vulkan.c
index d99a7dd559..e4a648518e 100644
--- a/gfx/drivers/vulkan.c
+++ b/gfx/drivers/vulkan.c
@@ -85,10 +85,10 @@ static void vulkan_init_render_pass(
{
VkRenderPassCreateInfo rp_info = {
VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO };
- VkAttachmentDescription attachment = {0};
- VkSubpassDescription subpass = {0};
VkAttachmentReference color_ref = { 0,
VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL };
+ VkAttachmentDescription attachment = {0};
+ VkSubpassDescription subpass = {0};
/* Backbuffer format. */
attachment.format = vk->context->swapchain_format;
diff --git a/gfx/drivers_context/wayland_ctx.c b/gfx/drivers_context/wayland_ctx.c
index 58c6bac247..e996afd7e7 100644
--- a/gfx/drivers_context/wayland_ctx.c
+++ b/gfx/drivers_context/wayland_ctx.c
@@ -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);
diff --git a/gfx/drivers_context/wgl_ctx.c b/gfx/drivers_context/wgl_ctx.c
index b8ae57e35e..e93dc784cb 100644
--- a/gfx/drivers_context/wgl_ctx.c
+++ b/gfx/drivers_context/wgl_ctx.c
@@ -652,9 +652,9 @@ static void *gfx_ctx_wgl_init(video_frame_info_t *video_info, void *video_driver
#ifdef HAVE_DYNAMIC
#ifdef HAVE_OPENGL
- dll_handle = dylib_load("libGLESv2.dll");
-#else
dll_handle = dylib_load("OpenGL32.dll");
+#else
+ dll_handle = dylib_load("libGLESv2.dll");
#endif
#endif
diff --git a/gfx/drivers_shader/glslang_util.c b/gfx/drivers_shader/glslang_util.c
index 3baf4af719..5d67146a9a 100644
--- a/gfx/drivers_shader/glslang_util.c
+++ b/gfx/drivers_shader/glslang_util.c
@@ -48,6 +48,56 @@ static void get_include_file(
strlcpy(include_file, start, len);
}
+bool slang_texture_semantic_is_array(enum slang_texture_semantic sem)
+{
+ switch (sem)
+ {
+ case SLANG_TEXTURE_SEMANTIC_ORIGINAL_HISTORY:
+ case SLANG_TEXTURE_SEMANTIC_PASS_OUTPUT:
+ case SLANG_TEXTURE_SEMANTIC_PASS_FEEDBACK:
+ case SLANG_TEXTURE_SEMANTIC_USER:
+ return true;
+
+ default:
+ break;
+ }
+
+ return false;
+}
+
+enum slang_texture_semantic slang_name_to_texture_semantic_array(
+ const char *name, const char **names,
+ unsigned *index)
+{
+ unsigned i = 0;
+ while (*names)
+ {
+ const char *n = *names;
+ enum slang_texture_semantic semantic = (enum slang_texture_semantic)(i);
+
+ if (slang_texture_semantic_is_array(semantic))
+ {
+ size_t baselen = strlen(n);
+ int cmp = strncmp(n, name, baselen);
+
+ if (cmp == 0)
+ {
+ *index = (unsigned)strtoul(name + baselen, NULL, 0);
+ return semantic;
+ }
+ }
+ else if (string_is_equal(name, n))
+ {
+ *index = 0;
+ return semantic;
+ }
+
+ i++;
+ names++;
+ }
+ return SLANG_INVALID_TEXTURE_SEMANTIC;
+}
+
bool glslang_read_shader_file(const char *path,
struct string_list *output, bool root_file)
{
diff --git a/gfx/drivers_shader/glslang_util.h b/gfx/drivers_shader/glslang_util.h
index d5ce6b5778..6116435087 100644
--- a/gfx/drivers_shader/glslang_util.h
+++ b/gfx/drivers_shader/glslang_util.h
@@ -21,6 +21,8 @@
#include
+#include "slang_reflection.h"
+
typedef enum glslang_format
{
SLANG_FORMAT_UNKNOWN = 0,
@@ -75,6 +77,12 @@ enum glslang_format glslang_find_format(const char *fmt);
bool glslang_read_shader_file(const char *path,
struct string_list *output, bool root_file);
+bool slang_texture_semantic_is_array(enum slang_texture_semantic sem);
+
+enum slang_texture_semantic slang_name_to_texture_semantic_array(
+ const char *name, const char **names,
+ unsigned *index);
+
RETRO_END_DECLS
#endif
diff --git a/gfx/drivers_shader/shader_gl_core.cpp b/gfx/drivers_shader/shader_gl_core.cpp
index abf89a5617..67c010d88f 100644
--- a/gfx/drivers_shader/shader_gl_core.cpp
+++ b/gfx/drivers_shader/shader_gl_core.cpp
@@ -32,6 +32,8 @@
#include "slang_reflection.hpp"
#include "spirv_glsl.hpp"
+#include "../common/gl_core_common.h"
+
#include "../../retroarch.h"
#include "../../verbosity.h"
#include "../../msg_hash.h"
@@ -54,82 +56,6 @@ static bool gl_core_shader_set_unique_map(unordered_map &m,
return true;
}
-static GLuint gl_core_compile_shader(GLenum stage, const char *source)
-{
- GLint status;
- GLuint shader = glCreateShader(stage);
- const char *ptr = source;
-
- glShaderSource(shader, 1, &ptr, nullptr);
- glCompileShader(shader);
-
- glGetShaderiv(shader, GL_COMPILE_STATUS, &status);
-
- if (!status)
- {
- GLint length;
- glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &length);
- if (length > 0)
- {
- char *info_log = (char*)malloc(length);
-
- if (info_log)
- {
- glGetShaderInfoLog(shader, length, &length, info_log);
- RARCH_ERR("[GLCore]: Failed to compile shader: %s\n", info_log);
- free(info_log);
- glDeleteShader(shader);
- return 0;
- }
- }
- }
-
- return shader;
-}
-
-static uint32_t gl_core_get_cross_compiler_target_version()
-{
- const char *version = (const char*)glGetString(GL_VERSION);
- unsigned major = 0;
- unsigned minor = 0;
-
-#ifdef HAVE_OPENGLES3
- if (!version || sscanf(version, "OpenGL ES %u.%u", &major, &minor) != 2)
- return 300;
-
- if (major == 2 && minor == 0)
- return 100;
-#else
- if (!version || sscanf(version, "%u.%u", &major, &minor) != 2)
- return 150;
-
- if (major == 3)
- {
- switch (minor)
- {
- case 2:
- return 150;
- case 1:
- return 140;
- case 0:
- return 130;
- }
- }
- else if (major == 2)
- {
- switch (minor)
- {
- case 1:
- return 120;
- case 0:
- return 110;
- }
- }
-#endif
-
- return 100 * major + 10 * minor;
-}
-
GLuint gl_core_cross_compile_program(
const uint32_t *vertex, size_t vertex_size,
const uint32_t *fragment, size_t fragment_size,
@@ -345,7 +271,7 @@ GLuint gl_core_cross_compile_program(
return program;
}
-namespace gl_core
+namespace gl_core_shader
{
static const uint32_t opaque_vert[] =
#include "../drivers/vulkan_shaders/opaque.vert.inc"
@@ -355,15 +281,6 @@ static const uint32_t opaque_frag[] =
#include "../drivers/vulkan_shaders/opaque.frag.inc"
;
-struct ConfigDeleter
-{
- void operator()(config_file_t *conf)
- {
- if (conf)
- config_file_free(conf);
- }
-};
-
static unsigned num_miplevels(unsigned width, unsigned height)
{
unsigned size = MAX(width, height);
@@ -376,25 +293,6 @@ static unsigned num_miplevels(unsigned width, unsigned height)
return levels;
}
-static void build_default_matrix(float *data)
-{
- data[0] = 2.0f;
- data[1] = 0.0f;
- data[2] = 0.0f;
- data[3] = 0.0f;
- data[4] = 0.0f;
- data[5] = 2.0f;
- data[6] = 0.0f;
- data[7] = 0.0f;
- data[8] = 0.0f;
- data[9] = 0.0f;
- data[10] = 2.0f;
- data[11] = 0.0f;
- data[12] = -1.0f;
- data[13] = -1.0f;
- data[14] = 0.0f;
- data[15] = 1.0f;
-}
static void build_vec4(float *data, unsigned width, unsigned height)
{
@@ -404,11 +302,6 @@ static void build_vec4(float *data, unsigned width, unsigned height)
data[3] = 1.0f / float(height);
}
-struct Size2D
-{
- unsigned width, height;
-};
-
struct Texture
{
gl_core_filter_chain_texture texture;
@@ -545,20 +438,9 @@ public:
StaticTexture(StaticTexture&&) = delete;
void operator=(StaticTexture&&) = delete;
- void set_id(string name)
- {
- id = move(name);
- }
-
- const string &get_id() const
- {
- return id;
- }
-
- const Texture &get_texture() const
- {
- return texture;
- }
+ void set_id(string name) { id = move(name); }
+ const string &get_id() const { return id; }
+ const Texture &get_texture() const { return texture; }
private:
string id;
@@ -566,8 +448,9 @@ private:
Texture texture;
};
-StaticTexture::StaticTexture(string id_, GLuint image_, unsigned width, unsigned height, bool linear, bool mipmap,
- GLenum address)
+StaticTexture::StaticTexture(string id_, GLuint image_,
+ unsigned width, unsigned height, bool linear, bool mipmap,
+ GLenum address)
: id(std::move(id_)), image(image_)
{
texture.texture.width = width;
@@ -629,8 +512,9 @@ CommonResources::CommonResources()
glBufferData(GL_ARRAY_BUFFER, sizeof(quad_data), quad_data, GL_STATIC_DRAW);
glBindBuffer(GL_ARRAY_BUFFER, 0);
- quad_program = gl_core_cross_compile_program(opaque_vert, sizeof(opaque_vert),
- opaque_frag, sizeof(opaque_frag), &quad_loc, true);
+ quad_program = gl_core_cross_compile_program(
+ opaque_vert, sizeof(opaque_vert),
+ opaque_frag, sizeof(opaque_frag), &quad_loc, true);
}
CommonResources::~CommonResources()
@@ -657,13 +541,7 @@ public:
GLuint get_image() const { return image; }
GLuint get_framebuffer() const { return framebuffer; }
- void clear();
- void copy(const CommonResources &common, GLuint image);
- void copy_partial(const CommonResources &common, GLuint image, float rx, float ry);
- bool is_complete() const
- {
- return complete;
- }
+ bool is_complete() const { return complete; }
unsigned get_levels() const { return levels; }
@@ -780,117 +658,6 @@ void Framebuffer::init()
glBindTexture(GL_TEXTURE_2D, 0);
}
-void Framebuffer::clear()
-{
- if (!complete)
- return;
-
- glBindFramebuffer(GL_FRAMEBUFFER, framebuffer);
- glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
- glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
- glClear(GL_COLOR_BUFFER_BIT);
- glBindFramebuffer(GL_FRAMEBUFFER, 0);
-}
-
-void Framebuffer::copy(const CommonResources &common, GLuint image)
-{
- if (!complete)
- return;
-
- glBindFramebuffer(GL_FRAMEBUFFER, framebuffer);
- glActiveTexture(GL_TEXTURE2);
- glBindTexture(GL_TEXTURE_2D, image);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
- glViewport(0, 0, size.width, size.height);
- glClear(GL_COLOR_BUFFER_BIT);
-
- glUseProgram(common.quad_program);
- if (common.quad_loc.flat_ubo_vertex >= 0)
- {
- float mvp[16];
- build_default_matrix(mvp);
- glUniform4fv(common.quad_loc.flat_ubo_vertex, 4, mvp);
- }
-
- /* Draw quad */
- glDisable(GL_CULL_FACE);
- glDisable(GL_BLEND);
- glDisable(GL_DEPTH_TEST);
- glEnableVertexAttribArray(0);
- glEnableVertexAttribArray(1);
- glBindBuffer(GL_ARRAY_BUFFER, common.quad_vbo);
- glVertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, 4 * sizeof(float),
- reinterpret_cast(uintptr_t(0)));
- glVertexAttribPointer(1, 2, GL_FLOAT, GL_FALSE, 4 * sizeof(float),
- reinterpret_cast(uintptr_t(2 * sizeof(float))));
- glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
- glBindBuffer(GL_ARRAY_BUFFER, 0);
- glDisableVertexAttribArray(0);
- glDisableVertexAttribArray(1);
-
- glUseProgram(0);
- glBindTexture(GL_TEXTURE_2D, 0);
- glBindFramebuffer(GL_FRAMEBUFFER, 0);
-}
-
-void Framebuffer::copy_partial(const CommonResources &common, GLuint image, float rx, float ry)
-{
- GLuint vbo;
- if (!complete)
- return;
-
- glBindFramebuffer(GL_FRAMEBUFFER, framebuffer);
- glActiveTexture(GL_TEXTURE2);
- glBindTexture(GL_TEXTURE_2D, image);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
- glViewport(0, 0, size.width, size.height);
- glClear(GL_COLOR_BUFFER_BIT);
-
- glUseProgram(common.quad_program);
- if (common.quad_loc.flat_ubo_vertex >= 0)
- {
- float mvp[16];
- build_default_matrix(mvp);
- glUniform4fv(common.quad_loc.flat_ubo_vertex, 4, mvp);
- }
- glDisable(GL_CULL_FACE);
- glDisable(GL_BLEND);
- glDisable(GL_DEPTH_TEST);
- glEnableVertexAttribArray(0);
- glEnableVertexAttribArray(1);
-
- /* A bit crude, but heeeey. */
- glGenBuffers(1, &vbo);
- glBindBuffer(GL_ARRAY_BUFFER, vbo);
-
- const float quad_data[] = {
- 0.0f, 0.0f, 0.0f, 0.0f,
- 1.0f, 0.0f, rx, 0.0f,
- 0.0f, 1.0f, 0.0f, ry,
- 1.0f, 1.0f, rx, ry,
- };
-
- glBufferData(GL_ARRAY_BUFFER, sizeof(quad_data), quad_data, GL_STREAM_DRAW);
- glVertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, 4 * sizeof(float),
- reinterpret_cast(uintptr_t(0)));
- glVertexAttribPointer(1, 2, GL_FLOAT, GL_FALSE, 4 * sizeof(float),
- reinterpret_cast(uintptr_t(2 * sizeof(float))));
- glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
- glBindBuffer(GL_ARRAY_BUFFER, 0);
- glDeleteBuffers(1, &vbo);
- glDisableVertexAttribArray(0);
- glDisableVertexAttribArray(1);
- glUseProgram(0);
- glBindTexture(GL_TEXTURE_2D, 0);
- glBindFramebuffer(GL_FRAMEBUFFER, 0);
-}
-
Framebuffer::~Framebuffer()
{
if (framebuffer != 0)
@@ -1329,8 +1096,7 @@ Size2D Pass::get_output_size(const Size2D &original, const Size2D &source) const
void Pass::end_frame()
{
- if (framebuffer_feedback)
- swap(framebuffer, framebuffer_feedback);
+ swap(framebuffer, framebuffer_feedback);
}
void Pass::build_semantic_vec4(uint8_t *data, slang_semantic semantic,
@@ -1553,17 +1319,20 @@ void Pass::set_shader(GLenum stage,
const uint32_t *spirv,
size_t spirv_words)
{
- if (stage == GL_VERTEX_SHADER)
+ switch (stage)
{
- vertex_shader.clear();
- vertex_shader.insert(end(vertex_shader),
- spirv, spirv + spirv_words);
- }
- else if (stage == GL_FRAGMENT_SHADER)
- {
- fragment_shader.clear();
- fragment_shader.insert(end(fragment_shader),
- spirv, spirv + spirv_words);
+ case GL_VERTEX_SHADER:
+ vertex_shader.clear();
+ vertex_shader.insert(end(vertex_shader),
+ spirv, spirv + spirv_words);
+ break;
+ case GL_FRAGMENT_SHADER:
+ fragment_shader.clear();
+ fragment_shader.insert(end(fragment_shader),
+ spirv, spirv + spirv_words);
+ break;
+ default:
+ break;
}
}
@@ -1572,7 +1341,8 @@ void Pass::add_parameter(unsigned index, const std::string &id)
parameters.push_back({ id, index, unsigned(parameters.size()) });
}
-void Pass::set_semantic_texture(slang_texture_semantic semantic, const Texture &texture)
+void Pass::set_semantic_texture(slang_texture_semantic semantic,
+ const Texture &texture)
{
if (reflection.semantic_textures[semantic][0].texture)
{
@@ -1619,7 +1389,7 @@ void Pass::build_semantics(uint8_t *buffer,
memcpy(buffer + offset,
mvp, sizeof(float) * 16);
else
- build_default_matrix(reinterpret_cast(
+ gl_core_build_default_matrix(reinterpret_cast(
buffer + offset));
}
@@ -1632,7 +1402,7 @@ void Pass::build_semantics(uint8_t *buffer,
memcpy(push_constant_buffer.data() + offset,
mvp, sizeof(float) * 16);
else
- build_default_matrix(reinterpret_cast(
+ gl_core_build_default_matrix(reinterpret_cast(
push_constant_buffer.data() + offset));
}
@@ -1848,24 +1618,23 @@ public:
void set_frame_direction(int32_t direction);
void set_pass_name(unsigned pass, const char *name);
- void add_static_texture(unique_ptr texture);
+ void add_static_texture(unique_ptr texture);
void add_parameter(unsigned pass, unsigned parameter_index, const std::string &id);
void set_num_passes(unsigned passes);
private:
- vector> passes;
+ vector> passes;
vector pass_info;
vector>> deferred_calls;
- std::unique_ptr copy_framebuffer;
- gl_core::CommonResources common;
+ std::unique_ptr copy_framebuffer;
+ gl_core_shader::CommonResources common;
gl_core_filter_chain_texture input_texture = {};
bool init_history();
bool init_feedback();
bool init_alias();
- vector> original_history;
- void update_history();
+ vector> original_history;
bool require_clear = false;
void clear_history_and_feedback();
void update_feedback_info();
@@ -1879,7 +1648,7 @@ void gl_core_filter_chain::update_history_info()
for (i = 0; i < original_history.size(); i++)
{
- gl_core::Texture *source = (gl_core::Texture*)
+ gl_core_shader::Texture *source = (gl_core_shader::Texture*)
&common.original_history[i];
if (!source)
@@ -1897,16 +1666,14 @@ void gl_core_filter_chain::update_history_info()
void gl_core_filter_chain::update_feedback_info()
{
unsigned i;
- if (common.framebuffer_feedback.empty())
- return;
for (i = 0; i < passes.size() - 1; i++)
{
- gl_core::Framebuffer *fb = passes[i]->get_feedback_framebuffer();
+ gl_core_shader::Framebuffer *fb = passes[i]->get_feedback_framebuffer();
if (!fb)
continue;
- gl_core::Texture *source = (gl_core::Texture*)
+ gl_core_shader::Texture *source = (gl_core_shader::Texture*)
&common.framebuffer_feedback[i];
if (!source)
@@ -1934,21 +1701,22 @@ void gl_core_filter_chain::build_offscreen_passes(const gl_core_viewport &vp)
}
update_history_info();
- update_feedback_info();
+ if (!common.framebuffer_feedback.empty())
+ update_feedback_info();
- const gl_core::Texture original = {
+ const gl_core_shader::Texture original = {
input_texture,
passes.front()->get_source_filter(),
passes.front()->get_mip_filter(),
passes.front()->get_address_mode(),
};
- gl_core::Texture source = original;
+ gl_core_shader::Texture source = original;
for (i = 0; i < passes.size() - 1; i++)
{
passes[i]->build_commands(original, source, vp, nullptr);
- const gl_core::Framebuffer &fb = passes[i]->get_framebuffer();
+ const gl_core_shader::Framebuffer &fb = passes[i]->get_framebuffer();
source.texture.image = fb.get_image();
source.texture.width = fb.get_size().width;
@@ -1961,25 +1729,6 @@ void gl_core_filter_chain::build_offscreen_passes(const gl_core_viewport &vp)
}
}
-void gl_core_filter_chain::update_history()
-{
- unique_ptr tmp;
- unique_ptr &back = original_history.back();
- swap(back, tmp);
-
- if (input_texture.width != tmp->get_size().width ||
- input_texture.height != tmp->get_size().height ||
- (input_texture.format != 0
- && input_texture.format != tmp->get_format()))
- tmp->set_size({ input_texture.width, input_texture.height }, input_texture.format);
-
- tmp->copy(common, input_texture.image);
-
- /* Should ring buffer, but we don't have *that* many passes. */
- move_backward(begin(original_history), end(original_history) - 1, end(original_history));
- swap(original_history.front(), tmp);
-}
-
void gl_core_filter_chain::end_frame()
{
/* If we need to keep old frames, copy it after fragment is complete.
@@ -1987,7 +1736,31 @@ void gl_core_filter_chain::end_frame()
* pass is the last that reads from
* the history and dispatch the copy earlier. */
if (!original_history.empty())
- update_history();
+ {
+ /* Update history */
+ unique_ptr tmp;
+ unique_ptr &back = original_history.back();
+ swap(back, tmp);
+
+ if (input_texture.width != tmp->get_size().width ||
+ input_texture.height != tmp->get_size().height ||
+ (input_texture.format != 0
+ && input_texture.format != tmp->get_format()))
+ tmp->set_size({ input_texture.width, input_texture.height }, input_texture.format);
+
+ if (tmp->is_complete())
+ gl_core_framebuffer_copy(
+ tmp->get_framebuffer(),
+ common.quad_program,
+ common.quad_vbo,
+ common.quad_loc.flat_ubo_vertex,
+ tmp->get_size(),
+ input_texture.image);
+
+ /* Should ring buffer, but we don't have *that* many passes. */
+ move_backward(begin(original_history), end(original_history) - 1, end(original_history));
+ swap(original_history.front(), tmp);
+ }
}
void gl_core_filter_chain::build_viewport_pass(
@@ -2002,8 +1775,8 @@ void gl_core_filter_chain::build_viewport_pass(
require_clear = false;
}
- gl_core::Texture source;
- const gl_core::Texture original = {
+ gl_core_shader::Texture source;
+ const gl_core_shader::Texture original = {
input_texture,
passes.front()->get_source_filter(),
passes.front()->get_mip_filter(),
@@ -2021,7 +1794,7 @@ void gl_core_filter_chain::build_viewport_pass(
}
else
{
- const gl_core::Framebuffer &fb = passes[passes.size() - 2]
+ const gl_core_shader::Framebuffer &fb = passes[passes.size() - 2]
->get_framebuffer();
source.texture.image = fb.get_image();
source.texture.width = fb.get_size().width;
@@ -2035,7 +1808,11 @@ void gl_core_filter_chain::build_viewport_pass(
/* For feedback FBOs, swap current and previous. */
for (i = 0; i < passes.size(); i++)
- passes[i]->end_frame();
+ {
+ gl_core_shader::Framebuffer *fb = passes[i]->get_feedback_framebuffer();
+ if (fb)
+ passes[i]->end_frame();
+ }
}
bool gl_core_filter_chain::init_history()
@@ -2065,7 +1842,7 @@ bool gl_core_filter_chain::init_history()
common.original_history.resize(required_images);
for (i = 0; i < required_images; i++)
- original_history.emplace_back(new gl_core::Framebuffer(0, 1));
+ original_history.emplace_back(new gl_core_shader::Framebuffer(0, 1));
RARCH_LOG("[GLCore]: Using history of %u frames.\n", unsigned(required_images));
@@ -2186,7 +1963,7 @@ void gl_core_filter_chain::set_num_passes(unsigned num_passes)
for (i = 0; i < num_passes; i++)
{
- passes.emplace_back(new gl_core::Pass(i + 1 == num_passes));
+ passes.emplace_back(new gl_core_shader::Pass(i + 1 == num_passes));
passes.back()->set_common_resources(&common);
passes.back()->set_pass_number(i);
}
@@ -2235,12 +2012,15 @@ void gl_core_filter_chain::clear_history_and_feedback()
{
unsigned i;
for (i = 0; i < original_history.size(); i++)
- original_history[i]->clear();
+ {
+ if (original_history[i]->is_complete())
+ gl_core_framebuffer_clear(original_history[i]->get_framebuffer());
+ }
for (i = 0; i < passes.size(); i++)
{
- gl_core::Framebuffer *fb = passes[i]->get_feedback_framebuffer();
- if (fb)
- fb->clear();
+ gl_core_shader::Framebuffer *fb = passes[i]->get_feedback_framebuffer();
+ if (fb && fb->is_complete())
+ gl_core_framebuffer_clear(fb->get_framebuffer());
}
}
@@ -2255,7 +2035,7 @@ void gl_core_filter_chain::set_input_texture(
input_texture.padded_height != input_texture.height)
{
if (!copy_framebuffer)
- copy_framebuffer.reset(new gl_core::Framebuffer(texture.format, 1));
+ copy_framebuffer.reset(new gl_core_shader::Framebuffer(texture.format, 1));
if (input_texture.width != copy_framebuffer->get_size().width ||
input_texture.height != copy_framebuffer->get_size().height ||
@@ -2263,16 +2043,22 @@ void gl_core_filter_chain::set_input_texture(
input_texture.format != copy_framebuffer->get_format()))
copy_framebuffer->set_size({ input_texture.width, input_texture.height }, input_texture.format);
- copy_framebuffer->copy_partial(common, input_texture.image,
- float(input_texture.width)
- / input_texture.padded_width,
- float(input_texture.height)
- / input_texture.padded_height);
+ if (copy_framebuffer->is_complete())
+ gl_core_framebuffer_copy_partial(
+ copy_framebuffer->get_framebuffer(),
+ common.quad_program,
+ common.quad_loc.flat_ubo_vertex,
+ copy_framebuffer->get_size(),
+ input_texture.image,
+ float(input_texture.width)
+ / input_texture.padded_width,
+ float(input_texture.height)
+ / input_texture.padded_height);
input_texture.image = copy_framebuffer->get_image();
}
}
-void gl_core_filter_chain::add_static_texture(unique_ptr texture)
+void gl_core_filter_chain::add_static_texture(unique_ptr texture)
{
common.luts.push_back(move(texture));
}
@@ -2301,7 +2087,7 @@ void gl_core_filter_chain::set_pass_name(unsigned pass, const char *name)
passes[pass]->set_name(name);
}
-static unique_ptr gl_core_filter_chain_load_lut(
+static unique_ptr gl_core_filter_chain_load_lut(
gl_core_filter_chain *chain,
const video_shader_lut *shader)
{
@@ -2316,7 +2102,7 @@ static unique_ptr gl_core_filter_chain_load_lut(
if (!image_texture_load(&image, shader->path))
return {};
- unsigned levels = shader->mipmap ? gl_core::num_miplevels(image.width, image.height) : 1;
+ unsigned levels = shader->mipmap ? gl_core_shader::num_miplevels(image.width, image.height) : 1;
glGenTextures(1, &tex);
glBindTexture(GL_TEXTURE_2D, tex);
@@ -2337,11 +2123,11 @@ static unique_ptr gl_core_filter_chain_load_lut(
if (image.pixels)
image_texture_free(&image);
- return unique_ptr(new gl_core::StaticTexture(shader->id,
+ return unique_ptr(new gl_core_shader::StaticTexture(shader->id,
tex, image.width, image.height,
shader->filter != RARCH_FILTER_NEAREST,
levels > 1,
- gl_core::address_to_gl(gl_core::wrap_to_address(shader->wrap))));
+ gl_core_shader::address_to_gl(gl_core_shader::wrap_to_address(shader->wrap))));
}
static bool gl_core_filter_chain_load_luts(
@@ -2351,7 +2137,7 @@ static bool gl_core_filter_chain_load_luts(
unsigned i;
for (i = 0; i < shader->luts; i++)
{
- unique_ptr image = gl_core_filter_chain_load_lut(chain, &shader->lut[i]);
+ unique_ptr image = gl_core_filter_chain_load_lut(chain, &shader->lut[i]);
if (!image)
{
RARCH_ERR("[GLCore]: Failed to load LUT \"%s\".\n", shader->lut[i].path);
@@ -2386,11 +2172,11 @@ gl_core_filter_chain_t *gl_core_filter_chain_create_default(
chain->set_pass_info(0, pass_info);
chain->set_shader(0, GL_VERTEX_SHADER,
- gl_core::opaque_vert,
- sizeof(gl_core::opaque_vert) / sizeof(uint32_t));
+ gl_core_shader::opaque_vert,
+ sizeof(gl_core_shader::opaque_vert) / sizeof(uint32_t));
chain->set_shader(0, GL_FRAGMENT_SHADER,
- gl_core::opaque_frag,
- sizeof(gl_core::opaque_frag) / sizeof(uint32_t));
+ gl_core_shader::opaque_frag,
+ sizeof(gl_core_shader::opaque_frag) / sizeof(uint32_t));
if (!chain->init())
return nullptr;
@@ -2402,25 +2188,28 @@ gl_core_filter_chain_t *gl_core_filter_chain_create_from_preset(
const char *path, gl_core_filter_chain_filter filter)
{
unsigned i;
+ config_file_t *conf = NULL;
unique_ptr shader{ new video_shader() };
if (!shader)
return nullptr;
- unique_ptr conf{ video_shader_read_preset(path) };
- if (!conf)
+ if (!(conf = video_shader_read_preset(path)))
return nullptr;
- if (!video_shader_read_conf_preset(conf.get(), shader.get()))
+ if (!video_shader_read_conf_preset(conf, shader.get()))
+ {
+ config_file_free(conf);
return nullptr;
+ }
bool last_pass_is_fbo = shader->pass[shader->passes - 1].fbo.valid;
unique_ptr chain{ new gl_core_filter_chain(shader->passes + (last_pass_is_fbo ? 1 : 0)) };
if (!chain)
- return nullptr;
+ goto error;
if (shader->luts && !gl_core_filter_chain_load_luts(chain.get(), shader.get()))
- return nullptr;
+ goto error;
shader->num_parameters = 0;
@@ -2446,7 +2235,7 @@ gl_core_filter_chain_t *gl_core_filter_chain_create_from_preset(
{
RARCH_ERR("Failed to compile shader: \"%s\".\n",
pass->source.path);
- return nullptr;
+ goto error;
}
for (auto &meta_param : output.meta.parameters)
@@ -2454,7 +2243,7 @@ gl_core_filter_chain_t *gl_core_filter_chain_create_from_preset(
if (shader->num_parameters >= GFX_MAX_PARAMETERS)
{
RARCH_ERR("[GLCore]: Exceeded maximum number of parameters.\n");
- return nullptr;
+ goto error;
}
auto itr = find_if(shader->parameters, shader->parameters + shader->num_parameters,
@@ -2475,20 +2264,20 @@ gl_core_filter_chain_t *gl_core_filter_chain_create_from_preset(
{
RARCH_ERR("[GLCore]: Duplicate parameters found for \"%s\", but arguments do not match.\n",
itr->id);
- return nullptr;
+ goto error;
}
chain->add_parameter(i, itr - shader->parameters, meta_param.id);
}
else
{
- auto ¶m = shader->parameters[shader->num_parameters];
- strlcpy(param.id, meta_param.id.c_str(), sizeof(param.id));
- strlcpy(param.desc, meta_param.desc.c_str(), sizeof(param.desc));
- param.current = meta_param.initial;
- param.initial = meta_param.initial;
- param.minimum = meta_param.minimum;
- param.maximum = meta_param.maximum;
- param.step = meta_param.step;
+ video_shader_parameter *param = &shader->parameters[shader->num_parameters];
+ strlcpy(param->id, meta_param.id.c_str(), sizeof(param->id));
+ strlcpy(param->desc, meta_param.desc.c_str(), sizeof(param->desc));
+ param->current = meta_param.initial;
+ param->initial = meta_param.initial;
+ param->minimum = meta_param.minimum;
+ param->maximum = meta_param.maximum;
+ param->step = meta_param.step;
chain->add_parameter(i, shader->num_parameters, meta_param.id);
shader->num_parameters++;
}
@@ -2521,7 +2310,7 @@ gl_core_filter_chain_t *gl_core_filter_chain_create_from_preset(
pass->filter == RARCH_FILTER_LINEAR ? GL_CORE_FILTER_CHAIN_LINEAR :
GL_CORE_FILTER_CHAIN_NEAREST;
}
- pass_info.address = gl_core::wrap_to_address(pass->wrap);
+ pass_info.address = gl_core_shader::wrap_to_address(pass->wrap);
pass_info.max_levels = 1;
/* TODO: Expose max_levels in slangp.
@@ -2561,7 +2350,7 @@ gl_core_filter_chain_t *gl_core_filter_chain_create_from_preset(
}
else
{
- pass_info.rt_format = gl_core::convert_glslang_format(output.meta.rt_format);
+ pass_info.rt_format = gl_core_shader::convert_glslang_format(output.meta.rt_format);
RARCH_LOG("[slang]: Using render target format %s for pass output #%u.\n",
glslang_format_to_string(output.meta.rt_format), i);
}
@@ -2575,7 +2364,7 @@ gl_core_filter_chain_t *gl_core_filter_chain_create_from_preset(
else if (pass->fbo.fp_fbo)
output.meta.rt_format = SLANG_FORMAT_R16G16B16A16_SFLOAT;
- pass_info.rt_format = gl_core::convert_glslang_format(output.meta.rt_format);
+ pass_info.rt_format = gl_core_shader::convert_glslang_format(output.meta.rt_format);
RARCH_LOG("[slang]: Using render target format %s for pass output #%u.\n",
glslang_format_to_string(output.meta.rt_format), i);
@@ -2640,24 +2429,29 @@ gl_core_filter_chain_t *gl_core_filter_chain_create_from_preset(
chain->set_shader(shader->passes,
GL_VERTEX_SHADER,
- gl_core::opaque_vert,
- sizeof(gl_core::opaque_vert) / sizeof(uint32_t));
+ gl_core_shader::opaque_vert,
+ sizeof(gl_core_shader::opaque_vert) / sizeof(uint32_t));
chain->set_shader(shader->passes,
GL_FRAGMENT_SHADER,
- gl_core::opaque_frag,
- sizeof(gl_core::opaque_frag) / sizeof(uint32_t));
+ gl_core_shader::opaque_frag,
+ sizeof(gl_core_shader::opaque_frag) / sizeof(uint32_t));
}
- if (!video_shader_resolve_current_parameters(conf.get(), shader.get()))
- return nullptr;
+ if (!video_shader_resolve_current_parameters(conf, shader.get()))
+ goto error;
chain->set_shader_preset(move(shader));
if (!chain->init())
- return nullptr;
+ goto error;
+ config_file_free(conf);
return chain.release();
+
+error:
+ config_file_free(conf);
+ return nullptr;
}
struct video_shader *gl_core_filter_chain_get_preset(
diff --git a/gfx/drivers_shader/shader_vulkan.cpp b/gfx/drivers_shader/shader_vulkan.cpp
index 6d6ce40ae5..4200f12fac 100644
--- a/gfx/drivers_shader/shader_vulkan.cpp
+++ b/gfx/drivers_shader/shader_vulkan.cpp
@@ -116,11 +116,6 @@ static void build_vec4(float *data, unsigned width, unsigned height)
data[3] = 1.0f / float(height);
}
-struct Size2D
-{
- unsigned width, height;
-};
-
struct Texture
{
vulkan_filter_chain_texture texture;
@@ -129,26 +124,6 @@ struct Texture
vulkan_filter_chain_address address;
};
-static vulkan_filter_chain_address wrap_to_address(gfx_wrap_type type)
-{
- switch (type)
- {
- case RARCH_WRAP_BORDER:
- return VULKAN_FILTER_CHAIN_ADDRESS_CLAMP_TO_BORDER;
- case RARCH_WRAP_REPEAT:
- return VULKAN_FILTER_CHAIN_ADDRESS_REPEAT;
- case RARCH_WRAP_MIRRORED_REPEAT:
- return VULKAN_FILTER_CHAIN_ADDRESS_MIRRORED_REPEAT;
- case RARCH_WRAP_EDGE:
- default:
- break;
- }
-
- return VULKAN_FILTER_CHAIN_ADDRESS_CLAMP_TO_EDGE;
-}
-
-
-
class DeferredDisposer
{
public:
@@ -256,21 +231,17 @@ class Framebuffer
VkFramebuffer get_framebuffer() const { return framebuffer; }
VkRenderPass get_render_pass() const { return render_pass; }
- void clear(VkCommandBuffer cmd);
- void copy(VkCommandBuffer cmd, VkImage image, VkImageLayout layout);
-
unsigned get_levels() const { return levels; }
- void generate_mips(VkCommandBuffer cmd);
private:
- const VkPhysicalDeviceMemoryProperties &memory_properties;
- VkDevice device = VK_NULL_HANDLE;
- VkImage image = VK_NULL_HANDLE;
- VkImageView view = VK_NULL_HANDLE;
- VkImageView fb_view = VK_NULL_HANDLE;
Size2D size;
VkFormat format;
unsigned max_levels;
+ const VkPhysicalDeviceMemoryProperties &memory_properties;
+ VkDevice device = VK_NULL_HANDLE;
+ VkImage image = VK_NULL_HANDLE;
+ VkImageView view = VK_NULL_HANDLE;
+ VkImageView fb_view = VK_NULL_HANDLE;
unsigned levels = 0;
VkFramebuffer framebuffer = VK_NULL_HANDLE;
@@ -278,14 +249,12 @@ class Framebuffer
struct
{
- size_t size = 0;
- uint32_t type = 0;
- VkDeviceMemory memory = VK_NULL_HANDLE;
+ size_t size = 0;
+ uint32_t type = 0;
+ VkDeviceMemory memory = VK_NULL_HANDLE;
} memory;
void init(DeferredDisposer *disposer);
- void init_framebuffer();
- void init_render_pass();
};
struct CommonResources
@@ -296,10 +265,10 @@ struct CommonResources
unique_ptr vbo;
unique_ptr ubo;
- uint8_t *ubo_mapped = nullptr;
+ uint8_t *ubo_mapped = nullptr;
size_t ubo_sync_index_stride = 0;
- size_t ubo_offset = 0;
- size_t ubo_alignment = 1;
+ size_t ubo_offset = 0;
+ size_t ubo_alignment = 1;
VkSampler samplers[VULKAN_FILTER_CHAIN_COUNT][VULKAN_FILTER_CHAIN_COUNT][VULKAN_FILTER_CHAIN_ADDRESS_COUNT];
@@ -440,10 +409,10 @@ class Pass
Size2D get_output_size(const Size2D &original_size,
const Size2D &max_source) const;
- VkPipeline pipeline = VK_NULL_HANDLE;
+ VkPipeline pipeline = VK_NULL_HANDLE;
VkPipelineLayout pipeline_layout = VK_NULL_HANDLE;
VkDescriptorSetLayout set_layout = VK_NULL_HANDLE;
- VkDescriptorPool pool = VK_NULL_HANDLE;
+ VkDescriptorPool pool = VK_NULL_HANDLE;
vector sets;
CommonResources *common = nullptr;
@@ -462,20 +431,12 @@ class Pass
bool init_pipeline();
bool init_pipeline_layout();
- void set_texture(VkDescriptorSet set, unsigned binding,
- const Texture &texture);
-
void set_semantic_texture(VkDescriptorSet set, slang_texture_semantic semantic,
const Texture &texture);
void set_semantic_texture_array(VkDescriptorSet set,
slang_texture_semantic semantic, unsigned index,
const Texture &texture);
- void set_uniform_buffer(VkDescriptorSet set, unsigned binding,
- VkBuffer buffer,
- VkDeviceSize offset,
- VkDeviceSize range);
-
slang_reflection reflection;
void build_semantics(VkDescriptorSet set, uint8_t *buffer,
const float *mvp, const Texture &original, const Texture &source);
@@ -495,12 +456,12 @@ class Pass
void build_semantic_texture_array(VkDescriptorSet set, uint8_t *buffer,
slang_texture_semantic semantic, unsigned index, const Texture &texture);
- uint64_t frame_count = 0;
- int32_t frame_direction = 1;
+ uint64_t frame_count = 0;
+ int32_t frame_direction = 1;
unsigned frame_count_period = 0;
- unsigned pass_number = 0;
+ unsigned pass_number = 0;
- size_t ubo_offset = 0;
+ size_t ubo_offset = 0;
string pass_name;
struct Parameter
@@ -802,7 +763,8 @@ void vulkan_filter_chain::update_history(DeferredDisposer &disposer,
&& input_texture.format != tmp->get_format()))
tmp->set_size(disposer, { input_texture.width, input_texture.height }, input_texture.format);
- tmp->copy(cmd, input_texture.image, src_layout);
+ vulkan_framebuffer_copy(tmp->get_image(), tmp->get_size(),
+ cmd, input_texture.image, src_layout);
/* Transition input texture back. */
if (input_texture.layout != VK_IMAGE_LAYOUT_GENERAL)
@@ -839,6 +801,8 @@ void vulkan_filter_chain::build_viewport_pass(
VkCommandBuffer cmd, const VkViewport &vp, const float *mvp)
{
unsigned i;
+ Texture source;
+
/* First frame, make sure our history and
* feedback textures are in a clean state. */
if (require_clear)
@@ -847,7 +811,6 @@ void vulkan_filter_chain::build_viewport_pass(
require_clear = false;
}
- Texture source;
DeferredDisposer disposer(deferred_calls[current_sync_index]);
const Texture original = {
input_texture,
@@ -938,8 +901,9 @@ bool vulkan_filter_chain::init_feedback()
bool use_feedback = false;
for (auto &pass : passes)
{
- auto &r = pass->get_reflection();
- auto &feedbacks = r.semantic_textures[SLANG_TEXTURE_SEMANTIC_PASS_FEEDBACK];
+ const slang_reflection &r = pass->get_reflection();
+ auto &feedbacks = r.semantic_textures[
+ SLANG_TEXTURE_SEMANTIC_PASS_FEEDBACK];
if (i < feedbacks.size() && feedbacks[i].texture)
{
@@ -982,19 +946,23 @@ bool vulkan_filter_chain::init_alias()
j = &passes[i] - passes.data();
- if (!vk_shader_set_unique_map(common.texture_semantic_map, name,
+ if (!vk_shader_set_unique_map(
+ common.texture_semantic_map, name,
slang_texture_semantic_map{ SLANG_TEXTURE_SEMANTIC_PASS_OUTPUT, j }))
return false;
- if (!vk_shader_set_unique_map(common.texture_semantic_uniform_map, name + "Size",
+ if (!vk_shader_set_unique_map(
+ common.texture_semantic_uniform_map, name + "Size",
slang_texture_semantic_map{ SLANG_TEXTURE_SEMANTIC_PASS_OUTPUT, j }))
return false;
- if (!vk_shader_set_unique_map(common.texture_semantic_map, name + "Feedback",
+ if (!vk_shader_set_unique_map(
+ common.texture_semantic_map, name + "Feedback",
slang_texture_semantic_map{ SLANG_TEXTURE_SEMANTIC_PASS_FEEDBACK, j }))
return false;
- if (!vk_shader_set_unique_map(common.texture_semantic_uniform_map, name + "FeedbackSize",
+ if (!vk_shader_set_unique_map(
+ common.texture_semantic_uniform_map, name + "FeedbackSize",
slang_texture_semantic_map{ SLANG_TEXTURE_SEMANTIC_PASS_FEEDBACK, j }))
return false;
}
@@ -1002,12 +970,14 @@ bool vulkan_filter_chain::init_alias()
for (i = 0; i < common.luts.size(); i++)
{
j = &common.luts[i] - common.luts.data();
- if (!vk_shader_set_unique_map(common.texture_semantic_map,
+ if (!vk_shader_set_unique_map(
+ common.texture_semantic_map,
common.luts[i]->get_id(),
slang_texture_semantic_map{ SLANG_TEXTURE_SEMANTIC_USER, j }))
return false;
- if (!vk_shader_set_unique_map(common.texture_semantic_uniform_map,
+ if (!vk_shader_set_unique_map(
+ common.texture_semantic_uniform_map,
common.luts[i]->get_id() + "Size",
slang_texture_semantic_map{ SLANG_TEXTURE_SEMANTIC_USER, j }))
return false;
@@ -1056,13 +1026,13 @@ void vulkan_filter_chain::add_parameter(unsigned pass,
bool vulkan_filter_chain::init_ubo()
{
unsigned i;
+ VkPhysicalDeviceProperties props;
common.ubo.reset();
- common.ubo_offset = 0;
+ common.ubo_offset = 0;
- VkPhysicalDeviceProperties props;
vkGetPhysicalDeviceProperties(gpu, &props);
- common.ubo_alignment = props.limits.minUniformBufferOffsetAlignment;
+ common.ubo_alignment = props.limits.minUniformBufferOffsetAlignment;
/* Who knows. :) */
if (common.ubo_alignment == 0)
@@ -1071,16 +1041,17 @@ bool vulkan_filter_chain::init_ubo()
for (i = 0; i < passes.size(); i++)
passes[i]->allocate_buffers();
- common.ubo_offset = (common.ubo_offset + common.ubo_alignment - 1) &
+ common.ubo_offset =
+ (common.ubo_offset + common.ubo_alignment - 1) &
~(common.ubo_alignment - 1);
common.ubo_sync_index_stride = common.ubo_offset;
if (common.ubo_offset != 0)
- common.ubo = unique_ptr(new Buffer(device,
+ common.ubo = unique_ptr(new Buffer(device,
memory_properties, common.ubo_offset * deferred_calls.size(),
VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT));
- common.ubo_mapped = static_cast(common.ubo->map());
+ common.ubo_mapped = static_cast(common.ubo->map());
return true;
}
@@ -1121,12 +1092,12 @@ void vulkan_filter_chain::clear_history_and_feedback(VkCommandBuffer cmd)
{
unsigned i;
for (i = 0; i < original_history.size(); i++)
- original_history[i]->clear(cmd);
+ vulkan_framebuffer_clear(original_history[i]->get_image(), cmd);
for (i = 0; i < passes.size(); i++)
{
Framebuffer *fb = passes[i]->get_feedback_framebuffer();
if (fb)
- fb->clear(cmd);
+ vulkan_framebuffer_clear(fb->get_image(), cmd);
}
}
@@ -1136,7 +1107,8 @@ void vulkan_filter_chain::set_input_texture(
input_texture = texture;
}
-void vulkan_filter_chain::add_static_texture(unique_ptr texture)
+void vulkan_filter_chain::add_static_texture(
+ unique_ptr texture)
{
common.luts.push_back(move(texture));
}
@@ -1148,7 +1120,8 @@ void vulkan_filter_chain::set_frame_count(uint64_t count)
passes[i]->set_frame_count(count);
}
-void vulkan_filter_chain::set_frame_count_period(unsigned pass, unsigned period)
+void vulkan_filter_chain::set_frame_count_period(
+ unsigned pass, unsigned period)
{
passes[pass]->set_frame_count_period(period);
}
@@ -1192,23 +1165,26 @@ static unique_ptr vulkan_filter_chain_load_lut(
if (!image_texture_load(&image, shader->path))
return {};
- image_info.imageType = VK_IMAGE_TYPE_2D;
- image_info.format = VK_FORMAT_B8G8R8A8_UNORM;
- image_info.extent.width = image.width;
- image_info.extent.height = image.height;
- image_info.extent.depth = 1;
- image_info.mipLevels = shader->mipmap ? num_miplevels(image.width, image.height) : 1;
- image_info.arrayLayers = 1;
- image_info.samples = VK_SAMPLE_COUNT_1_BIT;
- image_info.tiling = VK_IMAGE_TILING_OPTIMAL;
- image_info.usage = VK_IMAGE_USAGE_SAMPLED_BIT |
- VK_IMAGE_USAGE_TRANSFER_SRC_BIT |
- VK_IMAGE_USAGE_TRANSFER_DST_BIT;
- image_info.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED;
+ image_info.imageType = VK_IMAGE_TYPE_2D;
+ image_info.format = VK_FORMAT_B8G8R8A8_UNORM;
+ image_info.extent.width = image.width;
+ image_info.extent.height = image.height;
+ image_info.extent.depth = 1;
+ image_info.mipLevels = shader->mipmap
+ ? num_miplevels(image.width, image.height) : 1;
+ image_info.arrayLayers = 1;
+ image_info.samples = VK_SAMPLE_COUNT_1_BIT;
+ image_info.tiling = VK_IMAGE_TILING_OPTIMAL;
+ image_info.usage = VK_IMAGE_USAGE_SAMPLED_BIT |
+ VK_IMAGE_USAGE_TRANSFER_SRC_BIT |
+ VK_IMAGE_USAGE_TRANSFER_DST_BIT;
+ image_info.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED;
+
vkCreateImage(info->device, &image_info, nullptr, &tex);
vkGetImageMemoryRequirements(info->device, tex, &mem_reqs);
- alloc.allocationSize = mem_reqs.size;
- alloc.memoryTypeIndex = vulkan_find_memory_type(
+
+ alloc.allocationSize = mem_reqs.size;
+ alloc.memoryTypeIndex = vulkan_find_memory_type(
&*info->memory_properties,
mem_reqs.memoryTypeBits,
VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT);
@@ -1230,37 +1206,46 @@ static unique_ptr vulkan_filter_chain_load_lut(
view_info.subresourceRange.layerCount = 1;
vkCreateImageView(info->device, &view_info, nullptr, &view);
- buffer = unique_ptr(new Buffer(info->device, *info->memory_properties,
- image.width * image.height * sizeof(uint32_t), VK_BUFFER_USAGE_TRANSFER_SRC_BIT));
- ptr = buffer->map();
+ buffer =
+ unique_ptr(new Buffer(info->device, *info->memory_properties,
+ image.width * image.height * sizeof(uint32_t), VK_BUFFER_USAGE_TRANSFER_SRC_BIT));
+ ptr = buffer->map();
memcpy(ptr, image.pixels, image.width * image.height * sizeof(uint32_t));
buffer->unmap();
- vulkan_image_layout_transition_levels(cmd, tex,VK_REMAINING_MIP_LEVELS,
+ vulkan_image_layout_transition_levels(cmd, tex,
+ VK_REMAINING_MIP_LEVELS,
VK_IMAGE_LAYOUT_UNDEFINED,
- shader->mipmap ? VK_IMAGE_LAYOUT_GENERAL : VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,
- 0, VK_ACCESS_TRANSFER_WRITE_BIT,
- VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT);
+ shader->mipmap ? VK_IMAGE_LAYOUT_GENERAL
+ : VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,
+ 0,
+ VK_ACCESS_TRANSFER_WRITE_BIT,
+ VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT,
+ VK_PIPELINE_STAGE_TRANSFER_BIT);
- region.imageSubresource.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
- region.imageSubresource.mipLevel = 0;
+ region.imageSubresource.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
+ region.imageSubresource.mipLevel = 0;
region.imageSubresource.baseArrayLayer = 0;
- region.imageSubresource.layerCount = 1;
- region.imageExtent.width = image.width;
- region.imageExtent.height = image.height;
- region.imageExtent.depth = 1;
+ region.imageSubresource.layerCount = 1;
+ region.imageExtent.width = image.width;
+ region.imageExtent.height = image.height;
+ region.imageExtent.depth = 1;
- vkCmdCopyBufferToImage(cmd, buffer->get_buffer(), tex,
- shader->mipmap ? VK_IMAGE_LAYOUT_GENERAL : VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,
+ vkCmdCopyBufferToImage(cmd,
+ buffer->get_buffer(),
+ tex,
+ shader->mipmap
+ ? VK_IMAGE_LAYOUT_GENERAL
+ : VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,
1, ®ion);
for (i = 1; i < image_info.mipLevels; i++)
{
- VkImageBlit blit_region = {};
- unsigned src_width = MAX(image.width >> (i - 1), 1u);
- unsigned src_height = MAX(image.height >> (i - 1), 1u);
- unsigned target_width = MAX(image.width >> i, 1u);
- unsigned target_height = MAX(image.height >> i, 1u);
+ VkImageBlit blit_region = {};
+ unsigned src_width = MAX(image.width >> (i - 1), 1u);
+ unsigned src_height = MAX(image.height >> (i - 1), 1u);
+ unsigned target_width = MAX(image.width >> i, 1u);
+ unsigned target_height = MAX(image.height >> i, 1u);
blit_region.srcSubresource.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
blit_region.srcSubresource.mipLevel = i - 1;
@@ -1277,7 +1262,10 @@ static unique_ptr vulkan_filter_chain_load_lut(
/* Only injects execution and memory barriers,
* not actual transition. */
- vulkan_image_layout_transition_levels(cmd, tex, VK_REMAINING_MIP_LEVELS,
+ vulkan_image_layout_transition_levels(
+ cmd,
+ tex,
+ VK_REMAINING_MIP_LEVELS,
VK_IMAGE_LAYOUT_GENERAL,
VK_IMAGE_LAYOUT_GENERAL,
VK_ACCESS_TRANSFER_WRITE_BIT,
@@ -1291,11 +1279,18 @@ static unique_ptr vulkan_filter_chain_load_lut(
1, &blit_region, VK_FILTER_LINEAR);
}
- vulkan_image_layout_transition_levels(cmd, tex,VK_REMAINING_MIP_LEVELS,
- shader->mipmap ? VK_IMAGE_LAYOUT_GENERAL : VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,
+ vulkan_image_layout_transition_levels(
+ cmd,
+ tex,
+ VK_REMAINING_MIP_LEVELS,
+ shader->mipmap
+ ? VK_IMAGE_LAYOUT_GENERAL
+ : VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,
VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL,
- VK_ACCESS_TRANSFER_WRITE_BIT, VK_ACCESS_SHADER_READ_BIT,
- VK_PIPELINE_STAGE_TRANSFER_BIT, VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT);
+ VK_ACCESS_TRANSFER_WRITE_BIT,
+ VK_ACCESS_SHADER_READ_BIT,
+ VK_PIPELINE_STAGE_TRANSFER_BIT,
+ VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT);
image_texture_free(&image);
image.pixels = nullptr;
@@ -1304,7 +1299,7 @@ static unique_ptr vulkan_filter_chain_load_lut(
tex, view, memory, move(buffer), image.width, image.height,
shader->filter != RARCH_FILTER_NEAREST,
image_info.mipLevels > 1,
- wrap_to_address(shader->wrap)));
+ vk_wrap_to_address(shader->wrap)));
error:
if (image.pixels)
@@ -1318,9 +1313,6 @@ error:
return {};
}
-
-
-
static bool vulkan_filter_chain_load_luts(
const struct vulkan_filter_chain_create_info *info,
vulkan_filter_chain *chain,
@@ -1332,7 +1324,8 @@ static bool vulkan_filter_chain_load_luts(
VkSubmitInfo submit_info = {
VK_STRUCTURE_TYPE_SUBMIT_INFO };
VkCommandBuffer cmd = VK_NULL_HANDLE;
- VkCommandBufferAllocateInfo cmd_info = { VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO };
+ VkCommandBufferAllocateInfo cmd_info = {
+ VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO };
bool recording = false;
cmd_info.commandPool = info->command_pool;
@@ -1374,8 +1367,6 @@ error:
return false;
}
-
-
StaticTexture::StaticTexture(string id,
VkDevice device,
VkImage image,
@@ -1393,15 +1384,19 @@ StaticTexture::StaticTexture(string id,
buffer(move(buffer)),
id(move(id))
{
- texture.filter = linear ? VULKAN_FILTER_CHAIN_LINEAR : VULKAN_FILTER_CHAIN_NEAREST;
- texture.mip_filter =
- mipmap && linear ? VULKAN_FILTER_CHAIN_LINEAR : VULKAN_FILTER_CHAIN_NEAREST;
- texture.address = address;
- texture.texture.image = image;
- texture.texture.view = view;
+ texture.filter = VULKAN_FILTER_CHAIN_NEAREST;
+ texture.mip_filter = VULKAN_FILTER_CHAIN_NEAREST;
+ texture.address = address;
+ texture.texture.image = image;
+ texture.texture.view = view;
texture.texture.layout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL;
- texture.texture.width = width;
+ texture.texture.width = width;
texture.texture.height = height;
+
+ if (linear)
+ texture.filter = VULKAN_FILTER_CHAIN_LINEAR;
+ if (mipmap && linear)
+ texture.mip_filter = VULKAN_FILTER_CHAIN_LINEAR;
}
StaticTexture::~StaticTexture()
@@ -1420,17 +1415,17 @@ Buffer::Buffer(VkDevice device,
device(device), size(size)
{
VkMemoryRequirements mem_reqs;
- VkBufferCreateInfo info = { VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO };
- info.size = size;
- info.usage = usage;
- info.sharingMode = VK_SHARING_MODE_EXCLUSIVE;
+ VkMemoryAllocateInfo alloc = { VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO };
+ VkBufferCreateInfo info = { VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO };
+
+ info.size = size;
+ info.usage = usage;
+ info.sharingMode = VK_SHARING_MODE_EXCLUSIVE;
vkCreateBuffer(device, &info, nullptr, &buffer);
vkGetBufferMemoryRequirements(device, buffer, &mem_reqs);
- VkMemoryAllocateInfo alloc = { VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO };
alloc.allocationSize = mem_reqs.size;
-
alloc.memoryTypeIndex = vulkan_find_memory_type(
&mem_props, mem_reqs.memoryTypeBits,
VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT
@@ -1444,9 +1439,8 @@ void *Buffer::map()
{
if (!mapped)
{
- if (vkMapMemory(device, memory, 0, size, 0, &mapped) == VK_SUCCESS)
- return mapped;
- return nullptr;
+ if (vkMapMemory(device, memory, 0, size, 0, &mapped) != VK_SUCCESS)
+ return nullptr;
}
return mapped;
}
@@ -1482,17 +1476,20 @@ void Pass::set_shader(VkShaderStageFlags stage,
const uint32_t *spirv,
size_t spirv_words)
{
- if (stage == VK_SHADER_STAGE_VERTEX_BIT)
+ switch (stage)
{
- vertex_shader.clear();
- vertex_shader.insert(end(vertex_shader),
- spirv, spirv + spirv_words);
- }
- else if (stage == VK_SHADER_STAGE_FRAGMENT_BIT)
- {
- fragment_shader.clear();
- fragment_shader.insert(end(fragment_shader),
- spirv, spirv + spirv_words);
+ case VK_SHADER_STAGE_VERTEX_BIT:
+ vertex_shader.clear();
+ vertex_shader.insert(end(vertex_shader),
+ spirv, spirv + spirv_words);
+ break;
+ case VK_SHADER_STAGE_FRAGMENT_BIT:
+ fragment_shader.clear();
+ fragment_shader.insert(end(fragment_shader),
+ spirv, spirv + spirv_words);
+ break;
+ default:
+ break;
}
}
@@ -1555,14 +1552,15 @@ Size2D Pass::set_pass_info(
{
clear_vk();
- current_viewport = swapchain.viewport;
- pass_info = info;
+ current_viewport = swapchain.viewport;
+ pass_info = info;
- num_sync_indices = swapchain.num_indices;
- sync_index = 0;
+ num_sync_indices = swapchain.num_indices;
+ sync_index = 0;
current_framebuffer_size = get_output_size(max_original, max_source);
- swapchain_render_pass = swapchain.render_pass;
+ swapchain_render_pass = swapchain.render_pass;
+
return current_framebuffer_size;
}
@@ -1587,9 +1585,19 @@ bool Pass::init_pipeline_layout()
unsigned i;
vector bindings;
vector desc_counts;
+ VkPushConstantRange push_range = {};
+ VkDescriptorSetLayoutCreateInfo set_layout_info = {
+ VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO };
+ VkPipelineLayoutCreateInfo layout_info = {
+ VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO };
+ VkDescriptorPoolCreateInfo pool_info = {
+ VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO };
+ VkDescriptorSetAllocateInfo alloc_info = {
+ VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO };
/* Main UBO. */
- VkShaderStageFlags ubo_mask = 0;
+ VkShaderStageFlags ubo_mask = 0;
+
if (reflection.ubo_stage_mask & SLANG_STAGE_VERTEX_MASK)
ubo_mask |= VK_SHADER_STAGE_VERTEX_BIT;
if (reflection.ubo_stage_mask & SLANG_STAGE_FRAGMENT_MASK)
@@ -1608,10 +1616,11 @@ bool Pass::init_pipeline_layout()
{
for (auto &texture : semantic)
{
+ VkShaderStageFlags stages = 0;
+
if (!texture.texture)
continue;
- VkShaderStageFlags stages = 0;
if (texture.stage_mask & SLANG_STAGE_VERTEX_MASK)
stages |= VK_SHADER_STAGE_VERTEX_BIT;
if (texture.stage_mask & SLANG_STAGE_FRAGMENT_MASK)
@@ -1624,22 +1633,17 @@ bool Pass::init_pipeline_layout()
}
}
- VkDescriptorSetLayoutCreateInfo set_layout_info = {
- VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO };
- set_layout_info.bindingCount = bindings.size();
- set_layout_info.pBindings = bindings.data();
+ set_layout_info.bindingCount = bindings.size();
+ set_layout_info.pBindings = bindings.data();
if (vkCreateDescriptorSetLayout(device,
&set_layout_info, NULL, &set_layout) != VK_SUCCESS)
return false;
- VkPipelineLayoutCreateInfo layout_info = {
- VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO };
layout_info.setLayoutCount = 1;
layout_info.pSetLayouts = &set_layout;
/* Push constants */
- VkPushConstantRange push_range = {};
if (reflection.push_constant_stage_mask && reflection.push_constant_size)
{
if (reflection.push_constant_stage_mask & SLANG_STAGE_VERTEX_MASK)
@@ -1650,27 +1654,23 @@ bool Pass::init_pipeline_layout()
RARCH_LOG("[Vulkan]: Push Constant Block: %u bytes.\n", (unsigned int)reflection.push_constant_size);
layout_info.pushConstantRangeCount = 1;
- layout_info.pPushConstantRanges = &push_range;
+ layout_info.pPushConstantRanges = &push_range;
push.buffer.resize((reflection.push_constant_size + sizeof(uint32_t) - 1) / sizeof(uint32_t));
}
- push.stages = push_range.stageFlags;
+ push.stages = push_range.stageFlags;
push_range.size = reflection.push_constant_size;
if (vkCreatePipelineLayout(device,
&layout_info, NULL, &pipeline_layout) != VK_SUCCESS)
return false;
- VkDescriptorPoolCreateInfo pool_info = {
- VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO };
pool_info.maxSets = num_sync_indices;
pool_info.poolSizeCount = desc_counts.size();
pool_info.pPoolSizes = desc_counts.data();
if (vkCreateDescriptorPool(device, &pool_info, nullptr, &pool) != VK_SUCCESS)
return false;
- VkDescriptorSetAllocateInfo alloc_info = {
- VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO };
alloc_info.descriptorPool = pool;
alloc_info.descriptorSetCount = 1;
alloc_info.pSetLayouts = &set_layout;
@@ -1685,95 +1685,97 @@ bool Pass::init_pipeline_layout()
bool Pass::init_pipeline()
{
+ VkPipelineInputAssemblyStateCreateInfo input_assembly = {
+ VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO };
+ VkVertexInputAttributeDescription attributes[2] = {{0}};
+ VkVertexInputBindingDescription binding = {0};
+ VkPipelineVertexInputStateCreateInfo vertex_input = {
+ VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO };
+ VkPipelineRasterizationStateCreateInfo raster = {
+ VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO };
+ VkPipelineColorBlendAttachmentState blend_attachment = {0};
+ VkPipelineColorBlendStateCreateInfo blend = {
+ VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO };
+ VkPipelineViewportStateCreateInfo viewport = {
+ VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO };
+ VkPipelineDepthStencilStateCreateInfo depth_stencil = {
+ VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO };
+ VkPipelineMultisampleStateCreateInfo multisample = {
+ VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO };
+ VkPipelineDynamicStateCreateInfo dynamic = {
+ VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO };
+ static const VkDynamicState dynamics[] = {
+ VK_DYNAMIC_STATE_VIEWPORT, VK_DYNAMIC_STATE_SCISSOR };
+ VkPipelineShaderStageCreateInfo shader_stages[2] = {
+ { VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO },
+ { VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO },
+ };
+ VkShaderModuleCreateInfo module_info = {
+ VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO };
+ VkGraphicsPipelineCreateInfo pipe = {
+ VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO };
+
if (!init_pipeline_layout())
return false;
/* Input assembly */
- VkPipelineInputAssemblyStateCreateInfo input_assembly = {
- VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO };
input_assembly.topology = VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP;
/* VAO state */
- VkVertexInputAttributeDescription attributes[2] = {{0}};
- VkVertexInputBindingDescription binding = {0};
+ attributes[0].location = 0;
+ attributes[0].binding = 0;
+ attributes[0].format = VK_FORMAT_R32G32_SFLOAT;
+ attributes[0].offset = 0;
+ attributes[1].location = 1;
+ attributes[1].binding = 0;
+ attributes[1].format = VK_FORMAT_R32G32_SFLOAT;
+ attributes[1].offset = 2 * sizeof(float);
- attributes[0].location = 0;
- attributes[0].binding = 0;
- attributes[0].format = VK_FORMAT_R32G32_SFLOAT;
- attributes[0].offset = 0;
- attributes[1].location = 1;
- attributes[1].binding = 0;
- attributes[1].format = VK_FORMAT_R32G32_SFLOAT;
- attributes[1].offset = 2 * sizeof(float);
+ binding.binding = 0;
+ binding.stride = 4 * sizeof(float);
+ binding.inputRate = VK_VERTEX_INPUT_RATE_VERTEX;
- binding.binding = 0;
- binding.stride = 4 * sizeof(float);
- binding.inputRate = VK_VERTEX_INPUT_RATE_VERTEX;
-
- VkPipelineVertexInputStateCreateInfo vertex_input = {
- VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO };
vertex_input.vertexBindingDescriptionCount = 1;
vertex_input.pVertexBindingDescriptions = &binding;
vertex_input.vertexAttributeDescriptionCount = 2;
vertex_input.pVertexAttributeDescriptions = attributes;
/* Raster state */
- VkPipelineRasterizationStateCreateInfo raster = {
- VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO };
- raster.polygonMode = VK_POLYGON_MODE_FILL;
- raster.cullMode = VK_CULL_MODE_NONE;
- raster.frontFace = VK_FRONT_FACE_COUNTER_CLOCKWISE;
- raster.depthClampEnable = false;
- raster.rasterizerDiscardEnable = false;
- raster.depthBiasEnable = false;
- raster.lineWidth = 1.0f;
+ raster.polygonMode = VK_POLYGON_MODE_FILL;
+ raster.cullMode = VK_CULL_MODE_NONE;
+ raster.frontFace =
+ VK_FRONT_FACE_COUNTER_CLOCKWISE;
+ raster.depthClampEnable = false;
+ raster.rasterizerDiscardEnable = false;
+ raster.depthBiasEnable = false;
+ raster.lineWidth = 1.0f;
/* Blend state */
- VkPipelineColorBlendAttachmentState blend_attachment = {0};
- VkPipelineColorBlendStateCreateInfo blend = {
- VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO };
- blend_attachment.blendEnable = false;
- blend_attachment.colorWriteMask = 0xf;
- blend.attachmentCount = 1;
- blend.pAttachments = &blend_attachment;
+ blend_attachment.blendEnable = false;
+ blend_attachment.colorWriteMask = 0xf;
+ blend.attachmentCount = 1;
+ blend.pAttachments = &blend_attachment;
/* Viewport state */
- VkPipelineViewportStateCreateInfo viewport = {
- VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO };
- viewport.viewportCount = 1;
- viewport.scissorCount = 1;
+ viewport.viewportCount = 1;
+ viewport.scissorCount = 1;
/* Depth-stencil state */
- VkPipelineDepthStencilStateCreateInfo depth_stencil = {
- VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO };
- depth_stencil.depthTestEnable = false;
- depth_stencil.depthWriteEnable = false;
- depth_stencil.depthBoundsTestEnable = false;
- depth_stencil.stencilTestEnable = false;
- depth_stencil.minDepthBounds = 0.0f;
- depth_stencil.maxDepthBounds = 1.0f;
+ depth_stencil.depthTestEnable = false;
+ depth_stencil.depthWriteEnable = false;
+ depth_stencil.depthBoundsTestEnable = false;
+ depth_stencil.stencilTestEnable = false;
+ depth_stencil.minDepthBounds = 0.0f;
+ depth_stencil.maxDepthBounds = 1.0f;
/* Multisample state */
- VkPipelineMultisampleStateCreateInfo multisample = {
- VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO };
- multisample.rasterizationSamples = VK_SAMPLE_COUNT_1_BIT;
+ multisample.rasterizationSamples = VK_SAMPLE_COUNT_1_BIT;
/* Dynamic state */
- VkPipelineDynamicStateCreateInfo dynamic = {
- VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO };
- static const VkDynamicState dynamics[] = {
- VK_DYNAMIC_STATE_VIEWPORT, VK_DYNAMIC_STATE_SCISSOR };
dynamic.pDynamicStates = dynamics;
dynamic.dynamicStateCount = sizeof(dynamics) / sizeof(dynamics[0]);
/* Shaders */
- VkPipelineShaderStageCreateInfo shader_stages[2] = {
- { VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO },
- { VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO },
- };
-
- VkShaderModuleCreateInfo module_info = {
- VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO };
module_info.codeSize = vertex_shader.size() * sizeof(uint32_t);
module_info.pCode = vertex_shader.data();
shader_stages[0].stage = VK_SHADER_STAGE_VERTEX_BIT;
@@ -1786,8 +1788,6 @@ bool Pass::init_pipeline()
shader_stages[1].pName = "main";
vkCreateShaderModule(device, &module_info, NULL, &shader_stages[1].module);
- VkGraphicsPipelineCreateInfo pipe = {
- VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO };
pipe.stageCount = 2;
pipe.pStages = shader_stages;
pipe.pVertexInputState = &vertex_input;
@@ -1820,11 +1820,13 @@ CommonResources::CommonResources(VkDevice device,
: device(device)
{
unsigned i;
+ VkSamplerCreateInfo info = {
+ VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO };
/* The final pass uses an MVP designed for [0, 1] range VBO.
* For in-between passes, we just go with identity matrices,
* so keep it simple.
*/
- const float vbo_data[] = {
+ const float vbo_data[] = {
/* Offscreen */
-1.0f, -1.0f, 0.0f, 0.0f,
-1.0f, +1.0f, 0.0f, 1.0f,
@@ -1838,14 +1840,14 @@ CommonResources::CommonResources(VkDevice device,
1.0f, +1.0f, 1.0f, 1.0f,
};
- vbo = unique_ptr(new Buffer(device,
- memory_properties, sizeof(vbo_data), VK_BUFFER_USAGE_VERTEX_BUFFER_BIT));
+ vbo =
+ unique_ptr(new Buffer(device,
+ memory_properties, sizeof(vbo_data), VK_BUFFER_USAGE_VERTEX_BUFFER_BIT));
- void *ptr = vbo->map();
+ void *ptr = vbo->map();
memcpy(ptr, vbo_data, sizeof(vbo_data));
vbo->unmap();
- VkSamplerCreateInfo info = { VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO };
info.mipLodBias = 0.0f;
info.maxAnisotropy = 1.0f;
info.compareEnable = false;
@@ -1974,9 +1976,9 @@ bool Pass::init_feedback()
bool Pass::build()
{
- unordered_map semantic_map;
unsigned i;
unsigned j = 0;
+ unordered_map semantic_map;
framebuffer.reset();
framebuffer_feedback.reset();
@@ -2014,55 +2016,14 @@ bool Pass::build()
filtered_parameters.push_back(parameters[i]);
}
- if (!init_pipeline())
- return false;
-
- return true;
-}
-
-void Pass::set_uniform_buffer(VkDescriptorSet set, unsigned binding,
- VkBuffer buffer,
- VkDeviceSize offset,
- VkDeviceSize range)
-{
- VkDescriptorBufferInfo buffer_info;
- buffer_info.buffer = buffer;
- buffer_info.offset = offset;
- buffer_info.range = range;
-
- VkWriteDescriptorSet write = { VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET };
- write.dstSet = set;
- write.dstBinding = binding;
- write.descriptorCount = 1;
- write.descriptorType = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER;
- write.pBufferInfo = &buffer_info;
-
- vkUpdateDescriptorSets(device, 1, &write, 0, NULL);
-}
-
-void Pass::set_texture(VkDescriptorSet set, unsigned binding,
- const Texture &texture)
-{
- VkDescriptorImageInfo image_info;
- image_info.sampler = common->samplers[texture.filter][texture.mip_filter][texture.address];
- image_info.imageView = texture.texture.view;
- image_info.imageLayout = texture.texture.layout;
-
- VkWriteDescriptorSet write = { VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET };
- write.dstSet = set;
- write.dstBinding = binding;
- write.descriptorCount = 1;
- write.descriptorType = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER;
- write.pImageInfo = &image_info;
-
- vkUpdateDescriptorSets(device, 1, &write, 0, nullptr);
+ return init_pipeline();
}
void Pass::set_semantic_texture(VkDescriptorSet set,
slang_texture_semantic semantic, const Texture &texture)
{
if (reflection.semantic_textures[semantic][0].texture)
- set_texture(set, reflection.semantic_textures[semantic][0].binding, texture);
+ vulkan_pass_set_texture(device, set, common->samplers[texture.filter][texture.mip_filter][texture.address], reflection.semantic_textures[semantic][0].binding, texture.texture.view, texture.texture.layout);
}
void Pass::set_semantic_texture_array(VkDescriptorSet set,
@@ -2071,13 +2032,14 @@ void Pass::set_semantic_texture_array(VkDescriptorSet set,
{
if (index < reflection.semantic_textures[semantic].size() &&
reflection.semantic_textures[semantic][index].texture)
- set_texture(set, reflection.semantic_textures[semantic][index].binding, texture);
+ vulkan_pass_set_texture(device, set, common->samplers[texture.filter][texture.mip_filter][texture.address], reflection.semantic_textures[semantic][index].binding, texture.texture.view, texture.texture.layout);
}
void Pass::build_semantic_texture_array_vec4(uint8_t *data, slang_texture_semantic semantic,
unsigned index, unsigned width, unsigned height)
{
auto &refl = reflection.semantic_textures[semantic];
+
if (index >= refl.size())
return;
@@ -2259,6 +2221,8 @@ void Pass::build_commands(
const VkViewport &vp,
const float *mvp)
{
+ uint8_t *u = nullptr;
+
current_viewport = vp;
Size2D size = get_output_size(
{ original.texture.width, original.texture.height },
@@ -2272,21 +2236,18 @@ void Pass::build_commands(
current_framebuffer_size = size;
if (reflection.ubo_stage_mask && common->ubo_mapped)
- {
- uint8_t *u = common->ubo_mapped + ubo_offset +
+ u = common->ubo_mapped + ubo_offset +
sync_index * common->ubo_sync_index_stride;
- build_semantics(sets[sync_index], u, mvp, original, source);
- }
- else
- build_semantics(sets[sync_index], nullptr, mvp, original, source);
+
+ build_semantics(sets[sync_index], u, mvp, original, source);
if (reflection.ubo_stage_mask)
- {
- set_uniform_buffer(sets[sync_index], reflection.ubo_binding,
+ vulkan_set_uniform_buffer(device,
+ sets[sync_index],
+ reflection.ubo_binding,
common->ubo->get_buffer(),
ubo_offset + sync_index * common->ubo_sync_index_stride,
reflection.ubo_size);
- }
/* The final pass is always executed inside
* another render pass since the frontend will
@@ -2294,18 +2255,20 @@ void Pass::build_commands(
* the passes that end up on-screen. */
if (!final_pass)
{
+ VkRenderPassBeginInfo rp_info = {
+ VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO };
+
/* Render. */
vulkan_image_layout_transition_levels(cmd,
framebuffer->get_image(), 1,
VK_IMAGE_LAYOUT_UNDEFINED,
VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL,
0,
- VK_ACCESS_COLOR_ATTACHMENT_READ_BIT | VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT,
+ VK_ACCESS_COLOR_ATTACHMENT_READ_BIT |
+ VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT,
VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT,
VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT);
- VkRenderPassBeginInfo rp_info = {
- VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO };
rp_info.renderPass = framebuffer->get_render_pass();
rp_info.framebuffer = framebuffer->get_framebuffer();
rp_info.renderArea.extent.width = current_framebuffer_size.width;
@@ -2317,7 +2280,8 @@ void Pass::build_commands(
}
vkCmdBindPipeline(cmd, VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline);
- vkCmdBindDescriptorSets(cmd, VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline_layout,
+ vkCmdBindDescriptorSets(cmd, VK_PIPELINE_BIND_POINT_GRAPHICS,
+ pipeline_layout,
0, 1, &sets[sync_index], 0, nullptr);
if (push.stages != 0)
@@ -2327,10 +2291,12 @@ void Pass::build_commands(
push.buffer.data());
}
- VkDeviceSize offset = final_pass ? 16 * sizeof(float) : 0;
- vkCmdBindVertexBuffers(cmd, 0, 1,
- &common->vbo->get_buffer(),
- &offset);
+ {
+ VkDeviceSize offset = final_pass ? 16 * sizeof(float) : 0;
+ vkCmdBindVertexBuffers(cmd, 0, 1,
+ &common->vbo->get_buffer(),
+ &offset);
+ }
if (final_pass)
{
@@ -2374,13 +2340,19 @@ void Pass::build_commands(
vkCmdEndRenderPass(cmd);
if (framebuffer->get_levels() > 1)
- framebuffer->generate_mips(cmd);
+ vulkan_framebuffer_generate_mips(
+ framebuffer->get_framebuffer(),
+ framebuffer->get_image(),
+ framebuffer->get_size(),
+ cmd,
+ framebuffer->get_levels());
else
{
/* Barrier to sync with next pass. */
vulkan_image_layout_transition_levels(
cmd,
- framebuffer->get_image(),VK_REMAINING_MIP_LEVELS,
+ framebuffer->get_image(),
+ VK_REMAINING_MIP_LEVELS,
VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL,
VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL,
VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT,
@@ -2404,210 +2376,18 @@ Framebuffer::Framebuffer(
{
RARCH_LOG("[Vulkan filter chain]: Creating framebuffer %u x %u (max %u level(s)).\n",
max_size.width, max_size.height, max_levels);
- init_render_pass();
+ vulkan_initialize_render_pass(device, format, &render_pass);
init(nullptr);
}
-void Framebuffer::clear(VkCommandBuffer cmd)
-{
- VkClearColorValue color;
- VkImageSubresourceRange range;
-
- vulkan_image_layout_transition_levels(cmd, image,VK_REMAINING_MIP_LEVELS,
- VK_IMAGE_LAYOUT_UNDEFINED, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,
- 0, VK_ACCESS_TRANSFER_WRITE_BIT,
- VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT,
- VK_PIPELINE_STAGE_TRANSFER_BIT);
-
- memset(&color, 0, sizeof(color));
- memset(&range, 0, sizeof(range));
-
- range.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
- range.levelCount = 1;
- range.layerCount = 1;
-
- vkCmdClearColorImage(cmd, image, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,
- &color, 1, &range);
-
- vulkan_image_layout_transition_levels(cmd, image,VK_REMAINING_MIP_LEVELS,
- VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL,
- VK_ACCESS_TRANSFER_WRITE_BIT, VK_ACCESS_SHADER_READ_BIT,
- VK_PIPELINE_STAGE_TRANSFER_BIT,
- VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT);
-}
-
-void Framebuffer::generate_mips(VkCommandBuffer cmd)
-{
- unsigned i;
- /* This is run every frame, so make sure
- * we aren't opting into the "lazy" way of doing this. :) */
- VkImageMemoryBarrier barriers[2] = {
- { VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER },
- { VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER },
- };
-
- /* First, transfer the input mip level to TRANSFER_SRC_OPTIMAL.
- * This should allow the surface to stay compressed.
- * All subsequent mip-layers are now transferred into DST_OPTIMAL from
- * UNDEFINED at this point.
- */
-
- /* Input */
- barriers[0].srcAccessMask = VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT;
- barriers[0].dstAccessMask = VK_ACCESS_TRANSFER_READ_BIT;
- barriers[0].oldLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
- barriers[0].newLayout = VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL;
- barriers[0].srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
- barriers[0].dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
- barriers[0].image = image;
- barriers[0].subresourceRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
- barriers[0].subresourceRange.baseMipLevel = 0;
- barriers[0].subresourceRange.levelCount = 1;
- barriers[0].subresourceRange.layerCount = VK_REMAINING_ARRAY_LAYERS;
-
- /* The rest of the mip chain */
- barriers[1].srcAccessMask = 0;
- barriers[1].dstAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT;
- barriers[1].oldLayout = VK_IMAGE_LAYOUT_UNDEFINED;
- barriers[1].newLayout = VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL;
- barriers[1].srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
- barriers[1].dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
- barriers[1].image = image;
- barriers[1].subresourceRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
- barriers[1].subresourceRange.baseMipLevel = 1;
- barriers[1].subresourceRange.levelCount = VK_REMAINING_MIP_LEVELS;
- barriers[1].subresourceRange.layerCount = VK_REMAINING_ARRAY_LAYERS;
-
- vkCmdPipelineBarrier(cmd,
- VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT,
- VK_PIPELINE_STAGE_TRANSFER_BIT,
- false,
- 0, nullptr,
- 0, nullptr,
- 2, barriers);
-
- for (i = 1; i < levels; i++)
- {
- /* For subsequent passes, we have to transition
- * from DST_OPTIMAL to SRC_OPTIMAL,
- * but only do so one mip-level at a time. */
- if (i > 1)
- {
- barriers[0].srcAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT;
- barriers[0].dstAccessMask = VK_ACCESS_TRANSFER_READ_BIT;
- barriers[0].subresourceRange.baseMipLevel = i - 1;
- barriers[0].subresourceRange.levelCount = 1;
- barriers[0].oldLayout = VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL;
- barriers[0].newLayout = VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL;
-
- vkCmdPipelineBarrier(cmd,
- VK_PIPELINE_STAGE_TRANSFER_BIT,
- VK_PIPELINE_STAGE_TRANSFER_BIT,
- false,
- 0, nullptr,
- 0, nullptr,
- 1, barriers);
- }
-
- VkImageBlit blit_region = {};
- unsigned src_width = MAX(size.width >> (i - 1), 1u);
- unsigned src_height = MAX(size.height >> (i - 1), 1u);
- unsigned target_width = MAX(size.width >> i, 1u);
- unsigned target_height = MAX(size.height >> i, 1u);
-
- blit_region.srcSubresource.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
- blit_region.srcSubresource.mipLevel = i - 1;
- blit_region.srcSubresource.baseArrayLayer = 0;
- blit_region.srcSubresource.layerCount = 1;
- blit_region.dstSubresource = blit_region.srcSubresource;
- blit_region.dstSubresource.mipLevel = i;
- blit_region.srcOffsets[1].x = src_width;
- blit_region.srcOffsets[1].y = src_height;
- blit_region.srcOffsets[1].z = 1;
- blit_region.dstOffsets[1].x = target_width;
- blit_region.dstOffsets[1].y = target_height;
- blit_region.dstOffsets[1].z = 1;
-
- vkCmdBlitImage(cmd,
- image, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL,
- image, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,
- 1, &blit_region, VK_FILTER_LINEAR);
- }
-
- /* We are now done, and we have all mip-levels except
- * the last in TRANSFER_SRC_OPTIMAL,
- * and the last one still on TRANSFER_DST_OPTIMAL,
- * so do a final barrier which
- * moves everything to SHADER_READ_ONLY_OPTIMAL in
- * one go along with the execution barrier to next pass.
- * Read-to-read memory barrier, so only need execution
- * barrier for first transition.
- */
- barriers[0].srcAccessMask = VK_ACCESS_TRANSFER_READ_BIT;
- barriers[0].dstAccessMask = VK_ACCESS_SHADER_READ_BIT;
- barriers[0].subresourceRange.baseMipLevel = 0;
- barriers[0].subresourceRange.levelCount = levels - 1;
- barriers[0].oldLayout = VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL;
- barriers[0].newLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL;
-
- /* This is read-after-write barrier. */
- barriers[1].srcAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT;
- barriers[1].dstAccessMask = VK_ACCESS_SHADER_READ_BIT;
- barriers[1].subresourceRange.baseMipLevel = levels - 1;
- barriers[1].subresourceRange.levelCount = 1;
- barriers[1].oldLayout = VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL;
- barriers[1].newLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL;
-
- vkCmdPipelineBarrier(cmd,
- VK_PIPELINE_STAGE_TRANSFER_BIT,
- VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT,
- false,
- 0, nullptr,
- 0, nullptr,
- 2, barriers);
-
- /* Next pass will wait for ALL_GRAPHICS_BIT, and since
- * we have dstStage as FRAGMENT_SHADER,
- * the dependency chain will ensure we don't start
- * next pass until the mipchain is complete. */
-}
-
-void Framebuffer::copy(VkCommandBuffer cmd,
- VkImage src_image, VkImageLayout src_layout)
-{
- VkImageCopy region;
-
- vulkan_image_layout_transition_levels(cmd, image,VK_REMAINING_MIP_LEVELS,
- VK_IMAGE_LAYOUT_UNDEFINED, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,
- 0, VK_ACCESS_TRANSFER_WRITE_BIT,
- VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT,
- VK_PIPELINE_STAGE_TRANSFER_BIT);
-
- memset(®ion, 0, sizeof(region));
-
- region.srcSubresource.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
- region.srcSubresource.layerCount = 1;
- region.dstSubresource = region.srcSubresource;
- region.extent.width = size.width;
- region.extent.height = size.height;
- region.extent.depth = 1;
-
- vkCmdCopyImage(cmd,
- src_image, src_layout,
- image, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,
- 1, ®ion);
-
- vulkan_image_layout_transition_levels(cmd, image,VK_REMAINING_MIP_LEVELS,
- VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL,
- VK_ACCESS_TRANSFER_WRITE_BIT, VK_ACCESS_SHADER_READ_BIT,
- VK_PIPELINE_STAGE_TRANSFER_BIT,
- VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT);
-}
-
void Framebuffer::init(DeferredDisposer *disposer)
{
VkMemoryRequirements mem_reqs;
- VkImageCreateInfo info = { VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO };
+ VkImageCreateInfo info = { VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO };
+ VkMemoryAllocateInfo alloc = { VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO };
+ VkImageViewCreateInfo view_info = {
+ VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO };
+
info.imageType = VK_IMAGE_TYPE_2D;
info.format = format;
info.extent.width = size.width;
@@ -2618,19 +2398,18 @@ void Framebuffer::init(DeferredDisposer *disposer)
info.samples = VK_SAMPLE_COUNT_1_BIT;
info.tiling = VK_IMAGE_TILING_OPTIMAL;
info.usage = VK_IMAGE_USAGE_SAMPLED_BIT |
- VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT |
- VK_IMAGE_USAGE_TRANSFER_DST_BIT |
- VK_IMAGE_USAGE_TRANSFER_SRC_BIT;
+ VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT |
+ VK_IMAGE_USAGE_TRANSFER_DST_BIT |
+ VK_IMAGE_USAGE_TRANSFER_SRC_BIT;
info.sharingMode = VK_SHARING_MODE_EXCLUSIVE;
info.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED;
- levels = info.mipLevels;
+ levels = info.mipLevels;
vkCreateImage(device, &info, nullptr, &image);
vkGetImageMemoryRequirements(device, image, &mem_reqs);
- VkMemoryAllocateInfo alloc = { VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO };
alloc.allocationSize = mem_reqs.size;
alloc.memoryTypeIndex = find_memory_type_fallback(
memory_properties, mem_reqs.memoryTypeBits,
@@ -2644,8 +2423,8 @@ void Framebuffer::init(DeferredDisposer *disposer)
* the world for framebuffer recreation. */
if (memory.memory != VK_NULL_HANDLE && disposer)
{
- auto d = device;
- auto m = memory.memory;
+ VkDevice d = device;
+ VkDeviceMemory m = memory.memory;
disposer->defer([=] { vkFreeMemory(d, m, nullptr); });
}
@@ -2657,8 +2436,6 @@ void Framebuffer::init(DeferredDisposer *disposer)
vkBindImageMemory(device, image, memory.memory, 0);
- VkImageViewCreateInfo view_info = {
- VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO };
view_info.viewType = VK_IMAGE_VIEW_TYPE_2D;
view_info.format = format;
view_info.image = image;
@@ -2676,54 +2453,19 @@ void Framebuffer::init(DeferredDisposer *disposer)
view_info.subresourceRange.levelCount = 1;
vkCreateImageView(device, &view_info, nullptr, &fb_view);
- init_framebuffer();
-}
+ /* Initialize framebuffer */
+ {
+ VkFramebufferCreateInfo info = {
+ VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO };
+ info.renderPass = render_pass;
+ info.attachmentCount = 1;
+ info.pAttachments = &fb_view;
+ info.width = size.width;
+ info.height = size.height;
+ info.layers = 1;
-void Framebuffer::init_render_pass()
-{
- VkRenderPassCreateInfo rp_info = {
- VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO };
- VkAttachmentReference color_ref = { 0,
- VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL };
-
- /* We will always write to the entire framebuffer,
- * so we don't really need to clear. */
- VkAttachmentDescription attachment = {0};
- attachment.format = format;
- attachment.samples = VK_SAMPLE_COUNT_1_BIT;
- attachment.loadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE;
- attachment.storeOp = VK_ATTACHMENT_STORE_OP_STORE;
- attachment.stencilLoadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE;
- attachment.stencilStoreOp = VK_ATTACHMENT_STORE_OP_DONT_CARE;
-
- attachment.initialLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
- attachment.finalLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
-
- VkSubpassDescription subpass = {0};
- subpass.pipelineBindPoint = VK_PIPELINE_BIND_POINT_GRAPHICS;
- subpass.colorAttachmentCount = 1;
- subpass.pColorAttachments = &color_ref;
-
- rp_info.attachmentCount = 1;
- rp_info.pAttachments = &attachment;
- rp_info.subpassCount = 1;
- rp_info.pSubpasses = &subpass;
-
- vkCreateRenderPass(device, &rp_info, nullptr, &render_pass);
-}
-
-void Framebuffer::init_framebuffer()
-{
- VkFramebufferCreateInfo info = {
- VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO };
- info.renderPass = render_pass;
- info.attachmentCount = 1;
- info.pAttachments = &fb_view;
- info.width = size.width;
- info.height = size.height;
- info.layers = 1;
-
- vkCreateFramebuffer(device, &info, nullptr, &framebuffer);
+ vkCreateFramebuffer(device, &info, nullptr, &framebuffer);
+ }
}
void Framebuffer::set_size(DeferredDisposer &disposer, const Size2D &size, VkFormat format)
@@ -2743,11 +2485,11 @@ void Framebuffer::set_size(DeferredDisposer &disposer, const Size2D &size, VkFor
*
* Fake lambda init captures for C++11.
*/
- auto d = device;
- auto i = image;
- auto v = view;
- auto fbv = fb_view;
- auto fb = framebuffer;
+ VkDevice d = device;
+ VkImage i = image;
+ VkImageView v = view;
+ VkImageView fbv = fb_view;
+ VkFramebuffer fb = framebuffer;
disposer.defer([=]
{
if (fb != VK_NULL_HANDLE)
@@ -2792,8 +2534,9 @@ vulkan_filter_chain_t *vulkan_filter_chain_create_default(
vulkan_filter_chain_filter filter)
{
struct vulkan_filter_chain_pass_info pass_info;
- auto tmpinfo = *info;
- tmpinfo.num_passes = 1;
+ auto tmpinfo = *info;
+
+ tmpinfo.num_passes = 1;
unique_ptr chain{ new vulkan_filter_chain(tmpinfo) };
if (!chain)
@@ -2824,15 +2567,6 @@ vulkan_filter_chain_t *vulkan_filter_chain_create_default(
return chain.release();
}
-struct ConfigDeleter
-{
- void operator()(config_file_t *conf)
- {
- if (conf)
- config_file_free(conf);
- }
-};
-
static VkFormat glslang_format_to_vk(glslang_format fmt)
{
#undef FMT
@@ -2883,16 +2617,19 @@ vulkan_filter_chain_t *vulkan_filter_chain_create_from_preset(
const char *path, vulkan_filter_chain_filter filter)
{
unsigned i;
+ config_file_t *conf = NULL;
unique_ptr shader{ new video_shader() };
if (!shader)
return nullptr;
- unique_ptr conf{ video_shader_read_preset(path) };
- if (!conf)
+ if (!(conf = video_shader_read_preset(path)))
return nullptr;
- if (!video_shader_read_conf_preset(conf.get(), shader.get()))
+ if (!video_shader_read_conf_preset(conf, shader.get()))
+ {
+ config_file_free(conf);
return nullptr;
+ }
bool last_pass_is_fbo = shader->pass[shader->passes - 1].fbo.valid;
auto tmpinfo = *info;
@@ -2900,10 +2637,10 @@ vulkan_filter_chain_t *vulkan_filter_chain_create_from_preset(
unique_ptr chain{ new vulkan_filter_chain(tmpinfo) };
if (!chain)
- return nullptr;
+ goto error;
if (shader->luts && !vulkan_filter_chain_load_luts(info, chain.get(), shader.get()))
- return nullptr;
+ goto error;
shader->num_parameters = 0;
@@ -2929,7 +2666,7 @@ vulkan_filter_chain_t *vulkan_filter_chain_create_from_preset(
{
RARCH_ERR("Failed to compile shader: \"%s\".\n",
pass->source.path);
- return nullptr;
+ goto error;
}
for (auto &meta_param : output.meta.parameters)
@@ -2937,7 +2674,7 @@ vulkan_filter_chain_t *vulkan_filter_chain_create_from_preset(
if (shader->num_parameters >= GFX_MAX_PARAMETERS)
{
RARCH_ERR("[Vulkan]: Exceeded maximum number of parameters.\n");
- return nullptr;
+ goto error;
}
auto itr = find_if(shader->parameters, shader->parameters + shader->num_parameters,
@@ -2958,20 +2695,20 @@ vulkan_filter_chain_t *vulkan_filter_chain_create_from_preset(
{
RARCH_ERR("[Vulkan]: Duplicate parameters found for \"%s\", but arguments do not match.\n",
itr->id);
- return nullptr;
+ goto error;
}
chain->add_parameter(i, itr - shader->parameters, meta_param.id);
}
else
{
- auto ¶m = shader->parameters[shader->num_parameters];
- strlcpy(param.id, meta_param.id.c_str(), sizeof(param.id));
- strlcpy(param.desc, meta_param.desc.c_str(), sizeof(param.desc));
- param.current = meta_param.initial;
- param.initial = meta_param.initial;
- param.minimum = meta_param.minimum;
- param.maximum = meta_param.maximum;
- param.step = meta_param.step;
+ video_shader_parameter *param = &shader->parameters[shader->num_parameters];
+ strlcpy(param->id, meta_param.id.c_str(), sizeof(param->id));
+ strlcpy(param->desc, meta_param.desc.c_str(), sizeof(param->desc));
+ param->current = meta_param.initial;
+ param->initial = meta_param.initial;
+ param->minimum = meta_param.minimum;
+ param->maximum = meta_param.maximum;
+ param->step = meta_param.step;
chain->add_parameter(i, shader->num_parameters, meta_param.id);
shader->num_parameters++;
}
@@ -3004,7 +2741,7 @@ vulkan_filter_chain_t *vulkan_filter_chain_create_from_preset(
pass->filter == RARCH_FILTER_LINEAR ? VULKAN_FILTER_CHAIN_LINEAR :
VULKAN_FILTER_CHAIN_NEAREST;
}
- pass_info.address = wrap_to_address(pass->wrap);
+ pass_info.address = vk_wrap_to_address(pass->wrap);
pass_info.max_levels = 1;
/* TODO: Expose max_levels in slangp.
@@ -3017,26 +2754,24 @@ vulkan_filter_chain_t *vulkan_filter_chain_create_from_preset(
pass_info.mip_filter = pass->filter != RARCH_FILTER_NEAREST && pass_info.max_levels > 1
? VULKAN_FILTER_CHAIN_LINEAR : VULKAN_FILTER_CHAIN_NEAREST;
- bool explicit_format = output.meta.rt_format != SLANG_FORMAT_UNKNOWN;
+ bool explicit_format = output.meta.rt_format != SLANG_FORMAT_UNKNOWN;
/* Set a reasonable default. */
if (output.meta.rt_format == SLANG_FORMAT_UNKNOWN)
- output.meta.rt_format = SLANG_FORMAT_R8G8B8A8_UNORM;
+ output.meta.rt_format = SLANG_FORMAT_R8G8B8A8_UNORM;
if (!pass->fbo.valid)
{
- pass_info.scale_type_x = i + 1 == shader->passes
- ? VULKAN_FILTER_CHAIN_SCALE_VIEWPORT
- : VULKAN_FILTER_CHAIN_SCALE_SOURCE;
- pass_info.scale_type_y = i + 1 == shader->passes
- ? VULKAN_FILTER_CHAIN_SCALE_VIEWPORT
- : VULKAN_FILTER_CHAIN_SCALE_SOURCE;
- pass_info.scale_x = 1.0f;
- pass_info.scale_y = 1.0f;
+ pass_info.scale_type_x = VULKAN_FILTER_CHAIN_SCALE_SOURCE;
+ pass_info.scale_type_y = VULKAN_FILTER_CHAIN_SCALE_SOURCE;
+ pass_info.scale_x = 1.0f;
+ pass_info.scale_y = 1.0f;
if (i + 1 == shader->passes)
{
- pass_info.rt_format = tmpinfo.swapchain.format;
+ pass_info.scale_type_x = VULKAN_FILTER_CHAIN_SCALE_VIEWPORT;
+ pass_info.scale_type_y = VULKAN_FILTER_CHAIN_SCALE_VIEWPORT;
+ pass_info.rt_format = tmpinfo.swapchain.format;
if (explicit_format)
RARCH_WARN("[slang]: Using explicit format for last pass in chain,"
@@ -3044,7 +2779,8 @@ vulkan_filter_chain_t *vulkan_filter_chain_create_from_preset(
}
else
{
- pass_info.rt_format = glslang_format_to_vk(output.meta.rt_format);
+ pass_info.rt_format = glslang_format_to_vk(
+ output.meta.rt_format);
RARCH_LOG("[slang]: Using render target format %s for pass output #%u.\n",
glslang_format_to_string(output.meta.rt_format), i);
}
@@ -3058,24 +2794,25 @@ vulkan_filter_chain_t *vulkan_filter_chain_create_from_preset(
else if (pass->fbo.fp_fbo)
output.meta.rt_format = SLANG_FORMAT_R16G16B16A16_SFLOAT;
- pass_info.rt_format = glslang_format_to_vk(output.meta.rt_format);
+ pass_info.rt_format = glslang_format_to_vk(output.meta.rt_format);
+
RARCH_LOG("[slang]: Using render target format %s for pass output #%u.\n",
glslang_format_to_string(output.meta.rt_format), i);
switch (pass->fbo.type_x)
{
case RARCH_SCALE_INPUT:
- pass_info.scale_x = pass->fbo.scale_x;
+ pass_info.scale_x = pass->fbo.scale_x;
pass_info.scale_type_x = VULKAN_FILTER_CHAIN_SCALE_SOURCE;
break;
case RARCH_SCALE_ABSOLUTE:
- pass_info.scale_x = float(pass->fbo.abs_x);
+ pass_info.scale_x = float(pass->fbo.abs_x);
pass_info.scale_type_x = VULKAN_FILTER_CHAIN_SCALE_ABSOLUTE;
break;
case RARCH_SCALE_VIEWPORT:
- pass_info.scale_x = pass->fbo.scale_x;
+ pass_info.scale_x = pass->fbo.scale_x;
pass_info.scale_type_x = VULKAN_FILTER_CHAIN_SCALE_VIEWPORT;
break;
}
@@ -3083,17 +2820,17 @@ vulkan_filter_chain_t *vulkan_filter_chain_create_from_preset(
switch (pass->fbo.type_y)
{
case RARCH_SCALE_INPUT:
- pass_info.scale_y = pass->fbo.scale_y;
+ pass_info.scale_y = pass->fbo.scale_y;
pass_info.scale_type_y = VULKAN_FILTER_CHAIN_SCALE_SOURCE;
break;
case RARCH_SCALE_ABSOLUTE:
- pass_info.scale_y = float(pass->fbo.abs_y);
+ pass_info.scale_y = float(pass->fbo.abs_y);
pass_info.scale_type_y = VULKAN_FILTER_CHAIN_SCALE_ABSOLUTE;
break;
case RARCH_SCALE_VIEWPORT:
- pass_info.scale_y = pass->fbo.scale_y;
+ pass_info.scale_y = pass->fbo.scale_y;
pass_info.scale_type_y = VULKAN_FILTER_CHAIN_SCALE_VIEWPORT;
break;
}
@@ -3132,15 +2869,20 @@ vulkan_filter_chain_t *vulkan_filter_chain_create_from_preset(
sizeof(opaque_frag) / sizeof(uint32_t));
}
- if (!video_shader_resolve_current_parameters(conf.get(), shader.get()))
- return nullptr;
+ if (!video_shader_resolve_current_parameters(conf, shader.get()))
+ goto error;
chain->set_shader_preset(move(shader));
if (!chain->init())
- return nullptr;
+ goto error;
+ config_file_free(conf);
return chain.release();
+
+error:
+ config_file_free(conf);
+ return nullptr;
}
struct video_shader *vulkan_filter_chain_get_preset(
diff --git a/gfx/drivers_shader/shader_vulkan.h b/gfx/drivers_shader/shader_vulkan.h
index 60f6c89ebe..bcd1a029d7 100644
--- a/gfx/drivers_shader/shader_vulkan.h
+++ b/gfx/drivers_shader/shader_vulkan.h
@@ -111,6 +111,25 @@ struct vulkan_filter_chain_create_info
struct vulkan_filter_chain_swapchain_info swapchain;
};
+static INLINE enum vulkan_filter_chain_address vk_wrap_to_address(enum gfx_wrap_type type)
+{
+ switch (type)
+ {
+ case RARCH_WRAP_BORDER:
+ return VULKAN_FILTER_CHAIN_ADDRESS_CLAMP_TO_BORDER;
+ case RARCH_WRAP_REPEAT:
+ return VULKAN_FILTER_CHAIN_ADDRESS_REPEAT;
+ case RARCH_WRAP_MIRRORED_REPEAT:
+ return VULKAN_FILTER_CHAIN_ADDRESS_MIRRORED_REPEAT;
+ case RARCH_WRAP_EDGE:
+ default:
+ break;
+ }
+
+ return VULKAN_FILTER_CHAIN_ADDRESS_CLAMP_TO_EDGE;
+}
+
+
vulkan_filter_chain_t *vulkan_filter_chain_new(
const struct vulkan_filter_chain_create_info *info);
void vulkan_filter_chain_free(vulkan_filter_chain_t *chain);
diff --git a/gfx/drivers_shader/slang_reflection.cpp b/gfx/drivers_shader/slang_reflection.cpp
index 7b17c39e7f..46f9663c81 100644
--- a/gfx/drivers_shader/slang_reflection.cpp
+++ b/gfx/drivers_shader/slang_reflection.cpp
@@ -20,6 +20,7 @@
#include
#include
#include
+#include "glslang_util.h"
#include "../../verbosity.h"
using namespace std;
@@ -53,23 +54,6 @@ static const char *semantic_uniform_names[] = {
"FrameDirection",
};
-static bool slang_texture_semantic_is_array(slang_texture_semantic sem)
-{
- switch (sem)
- {
- case SLANG_TEXTURE_SEMANTIC_ORIGINAL_HISTORY:
- case SLANG_TEXTURE_SEMANTIC_PASS_OUTPUT:
- case SLANG_TEXTURE_SEMANTIC_PASS_FEEDBACK:
- case SLANG_TEXTURE_SEMANTIC_USER:
- return true;
-
- default:
- break;
- }
-
- return false;
-}
-
slang_reflection::slang_reflection()
{
unsigned i;
@@ -81,39 +65,6 @@ slang_reflection::slang_reflection()
? 0 : 1);
}
-static slang_texture_semantic slang_name_to_texture_semantic_array(
- const string &name, const char **names,
- unsigned *index)
-{
- unsigned i = 0;
- while (*names)
- {
- const char *n = *names;
- slang_texture_semantic semantic = static_cast(i);
-
- if (slang_texture_semantic_is_array(semantic))
- {
- size_t baselen = strlen(n);
- int cmp = strncmp(n, name.c_str(), baselen);
-
- if (cmp == 0)
- {
- *index = (unsigned)strtoul(name.c_str() + baselen, nullptr, 0);
- return semantic;
- }
- }
- else if (name == n)
- {
- *index = 0;
- return semantic;
- }
-
- i++;
- names++;
- }
- return SLANG_INVALID_TEXTURE_SEMANTIC;
-}
-
static slang_texture_semantic slang_name_to_texture_semantic(
const unordered_map &semantic_map,
const string &name, unsigned *index)
@@ -126,7 +77,7 @@ static slang_texture_semantic slang_name_to_texture_semantic(
}
return slang_name_to_texture_semantic_array(
- name, texture_semantic_names, index);
+ name.c_str(), texture_semantic_names, index);
}
static slang_texture_semantic slang_uniform_name_to_texture_semantic(
@@ -140,7 +91,7 @@ static slang_texture_semantic slang_uniform_name_to_texture_semantic(
return itr->second.semantic;
}
- return slang_name_to_texture_semantic_array(name,
+ return slang_name_to_texture_semantic_array(name.c_str(),
texture_semantic_uniform_names, index);
}
@@ -183,9 +134,9 @@ static bool set_ubo_texture_offset(
size_t offset, bool push_constant)
{
resize_minimum(reflection->semantic_textures[semantic], index + 1);
- auto &sem = reflection->semantic_textures[semantic][index];
- auto &active = push_constant ? sem.push_constant : sem.uniform;
- auto &active_offset = push_constant ? sem.push_constant_offset : sem.ubo_offset;
+ slang_texture_semantic_meta &sem = reflection->semantic_textures[semantic][index];
+ bool &active = push_constant ? sem.push_constant : sem.uniform;
+ size_t &active_offset = push_constant ? sem.push_constant_offset : sem.ubo_offset;
if (active)
{
@@ -213,9 +164,9 @@ static bool set_ubo_float_parameter_offset(
bool push_constant)
{
resize_minimum(reflection->semantic_float_parameters, index + 1);
- auto &sem = reflection->semantic_float_parameters[index];
- auto &active = push_constant ? sem.push_constant : sem.uniform;
- auto &active_offset = push_constant ? sem.push_constant_offset : sem.ubo_offset;
+ slang_semantic_meta &sem = reflection->semantic_float_parameters[index];
+ bool &active = push_constant ? sem.push_constant : sem.uniform;
+ size_t &active_offset = push_constant ? sem.push_constant_offset : sem.ubo_offset;
if (active)
{
@@ -252,9 +203,9 @@ static bool set_ubo_offset(
slang_semantic semantic,
size_t offset, unsigned num_components, bool push_constant)
{
- auto &sem = reflection->semantics[semantic];
- auto &active = push_constant ? sem.push_constant : sem.uniform;
- auto &active_offset = push_constant ? sem.push_constant_offset : sem.ubo_offset;
+ slang_semantic_meta &sem = reflection->semantics[semantic];
+ bool &active = push_constant ? sem.push_constant : sem.uniform;
+ size_t &active_offset = push_constant ? sem.push_constant_offset : sem.ubo_offset;
if (active)
{
@@ -337,9 +288,9 @@ static bool add_active_buffer_ranges(
{
unsigned sem_index = 0;
unsigned tex_sem_index = 0;
- auto &name = compiler.get_member_name(
+ const string &name = compiler.get_member_name(
resource.base_type_id, ranges[i].index);
- auto &type = compiler.get_type(
+ const SPIRType &type = compiler.get_type(
compiler.get_type(resource.base_type_id).member_types[
ranges[i].index]);
slang_semantic sem = slang_uniform_name_to_semantic(
diff --git a/gfx/video_defines.h b/gfx/video_defines.h
index 900b9c786b..d05f38b257 100644
--- a/gfx/video_defines.h
+++ b/gfx/video_defines.h
@@ -155,6 +155,11 @@ typedef struct gfx_ctx_flags
uint32_t flags;
} gfx_ctx_flags_t;
+struct Size2D
+{
+ unsigned width, height;
+};
+
RETRO_END_DECLS
#endif
diff --git a/gfx/video_filters/Makefile b/gfx/video_filters/Makefile
index 8d4c0259f3..2ba8930c1b 100644
--- a/gfx/video_filters/Makefile
+++ b/gfx/video_filters/Makefile
@@ -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)
diff --git a/gfx/video_shader_parse.c b/gfx/video_shader_parse.c
index 8fd9961db7..c25a2be364 100644
--- a/gfx/video_shader_parse.c
+++ b/gfx/video_shader_parse.c
@@ -1259,20 +1259,6 @@ enum rarch_shader_type video_shader_get_type_from_ext(const char *ext,
return RARCH_SHADER_NONE;
}
-/**
- * video_shader_parse_type:
- * @path : Shader path.
- *
- * Parses type of shader.
- *
- * Returns: value of shader type if it could be determined,
- * otherwise RARCH_SHADER_NONE.
- **/
-enum rarch_shader_type video_shader_parse_type(const char *path)
-{
- return video_shader_get_type_from_ext(path_get_extension(path), NULL);
-}
-
bool video_shader_check_for_changes(void)
{
if (!file_change_data)
diff --git a/gfx/video_shader_parse.h b/gfx/video_shader_parse.h
index 7ff5bdf391..a7a492df79 100644
--- a/gfx/video_shader_parse.h
+++ b/gfx/video_shader_parse.h
@@ -21,6 +21,7 @@
#include
#include
#include
+#include
RETRO_BEGIN_DECLS
@@ -246,6 +247,9 @@ bool video_shader_resolve_current_parameters(config_file_t *conf,
bool video_shader_resolve_parameters(config_file_t *conf,
struct video_shader *shader);
+enum rarch_shader_type video_shader_get_type_from_ext(const char *ext,
+ bool *is_preset);
+
/**
* video_shader_parse_type:
* @path : Shader path.
@@ -255,10 +259,7 @@ bool video_shader_resolve_parameters(config_file_t *conf,
* Returns: value of shader type if it could be determined,
* otherwise RARCH_SHADER_NONE.
**/
-enum rarch_shader_type video_shader_parse_type(const char *path);
-
-enum rarch_shader_type video_shader_get_type_from_ext(const char *ext,
- bool *is_preset);
+#define video_shader_parse_type(path) video_shader_get_type_from_ext(path_get_extension((path)), NULL)
bool video_shader_is_supported(enum rarch_shader_type type);
diff --git a/griffin/griffin.c b/griffin/griffin.c
index 715ba35faf..ae90d9545e 100644
--- a/griffin/griffin.c
+++ b/griffin/griffin.c
@@ -156,9 +156,10 @@ CONFIG FILE
#include "../libretro-common/file/config_file_userdata.c"
/*============================================================
-RUNTIME FILE
+CONTENT METADATA RECORDS
============================================================ */
#include "../runtime_file.c"
+#include "../disk_index_file.c"
/*============================================================
ACHIEVEMENTS
@@ -606,6 +607,9 @@ FONTS
INPUT
============================================================ */
#include "../tasks/task_autodetect.c"
+#ifdef HAVE_BLISSBOX
+#include "../tasks/task_autodetect_blissbox.c"
+#endif
#ifdef HAVE_AUDIOMIXER
#include "../tasks/task_audio_mixer.c"
#endif
@@ -889,8 +893,6 @@ AUDIO
/*============================================================
MIDI
============================================================ */
-#include "../midi/drivers/null_midi.c"
-
#ifdef HAVE_WINMM
#include "../midi/drivers/winmm_midi.c"
#endif
@@ -967,6 +969,7 @@ CORES
FILE
============================================================ */
#include "../libretro-common/file/file_path.c"
+#include "../libretro-common/file/file_path_io.c"
#include "../file_path_special.c"
#include "../file_path_str.c"
#include "../libretro-common/lists/dir_list.c"
@@ -1204,6 +1207,7 @@ DATA RUNLOOP
============================================================ */
#include "../tasks/task_powerstate.c"
#include "../tasks/task_content.c"
+#include "../tasks/task_patch.c"
#include "../tasks/task_save.c"
#include "../tasks/task_image.c"
#include "../tasks/task_file_transfer.c"
@@ -1640,3 +1644,8 @@ PLAYLIST NAME SANITIZATION
MANUAL CONTENT SCAN
============================================================ */
#include "../manual_content_scan.c"
+
+/*============================================================
+DISK CONTROL INTERFACE
+============================================================ */
+#include "../disk_control_interface.c"
diff --git a/input/drivers/dinput.c b/input/drivers/dinput.c
index 4d0f2c1ce0..b0d682287a 100644
--- a/input/drivers/dinput.c
+++ b/input/drivers/dinput.c
@@ -32,11 +32,11 @@
#include
#ifndef WM_MOUSEHWHEEL
-#define WM_MOUSEHWHEEL 0x20e
+#define WM_MOUSEHWHEEL 0x20e
#endif
#ifndef WM_MOUSEWHEEL
-#define WM_MOUSEWHEEL 0x020A
+#define WM_MOUSEWHEEL 0x020A
#endif
#ifdef HAVE_CONFIG_H
diff --git a/input/drivers/rwebinput_input.c b/input/drivers/rwebinput_input.c
index 80e00c0a1e..ce68c1d2ed 100644
--- a/input/drivers/rwebinput_input.c
+++ b/input/drivers/rwebinput_input.c
@@ -63,9 +63,13 @@ typedef struct rwebinput_mouse_states
{
signed x;
signed y;
+ signed pending_delta_x;
+ signed pending_delta_y;
signed delta_x;
signed delta_y;
uint8_t buttons;
+ double pending_scroll_x;
+ double pending_scroll_y;
double scroll_x;
double scroll_y;
} rwebinput_mouse_state_t;
@@ -74,6 +78,7 @@ typedef struct rwebinput_input
{
bool keys[RETROK_LAST];
rwebinput_mouse_state_t mouse;
+ rwebinput_keyboard_event_queue_t keyboard;
const input_device_driver_t *joypad;
} rwebinput_input_t;
@@ -194,10 +199,6 @@ static const rwebinput_key_to_code_map_entry_t rwebinput_key_to_code_map[] =
{ "Power", RETROK_POWER },
};
-static bool g_rwebinput_initialized;
-static rwebinput_keyboard_event_queue_t *g_rwebinput_keyboard;
-static rwebinput_mouse_state_t *g_rwebinput_mouse;
-
/* to make the string labels for codes from JavaScript work, we convert them
* to CRC32 hashes for the LUT */
static void rwebinput_generate_lut(void)
@@ -237,22 +238,24 @@ static void rwebinput_generate_lut(void)
static EM_BOOL rwebinput_keyboard_cb(int event_type,
const EmscriptenKeyboardEvent *key_event, void *user_data)
{
+ rwebinput_input_t *rwebinput = (rwebinput_input_t*)user_data;
+
if (event_type == EMSCRIPTEN_EVENT_KEYPRESS)
return EM_TRUE;
- if (g_rwebinput_keyboard->count >= g_rwebinput_keyboard->max_size)
+ if (rwebinput->keyboard.count >= rwebinput->keyboard.max_size)
{
- size_t new_max = MAX(1, g_rwebinput_keyboard->max_size << 1);
- g_rwebinput_keyboard->events = realloc(g_rwebinput_keyboard->events,
- new_max * sizeof(g_rwebinput_keyboard->events[0]));
- retro_assert(g_rwebinput_keyboard->events != NULL);
- g_rwebinput_keyboard->max_size = new_max;
+ size_t new_max = MAX(1, rwebinput->keyboard.max_size << 1);
+ rwebinput->keyboard.events = realloc(rwebinput->keyboard.events,
+ new_max * sizeof(rwebinput->keyboard.events[0]));
+ retro_assert(rwebinput->keyboard.events != NULL);
+ rwebinput->keyboard.max_size = new_max;
}
- g_rwebinput_keyboard->events[g_rwebinput_keyboard->count].type = event_type;
- memcpy(&g_rwebinput_keyboard->events[g_rwebinput_keyboard->count].event,
+ rwebinput->keyboard.events[rwebinput->keyboard.count].type = event_type;
+ memcpy(&rwebinput->keyboard.events[rwebinput->keyboard.count].event,
key_event, sizeof(*key_event));
- g_rwebinput_keyboard->count++;
+ rwebinput->keyboard.count++;
return EM_TRUE;
}
@@ -260,22 +263,22 @@ static EM_BOOL rwebinput_keyboard_cb(int event_type,
static EM_BOOL rwebinput_mouse_cb(int event_type,
const EmscriptenMouseEvent *mouse_event, void *user_data)
{
- (void)user_data;
+ rwebinput_input_t *rwebinput = (rwebinput_input_t*)user_data;
uint8_t mask = 1 << mouse_event->button;
- g_rwebinput_mouse->x = mouse_event->targetX;
- g_rwebinput_mouse->y = mouse_event->targetY;
- g_rwebinput_mouse->delta_x += mouse_event->movementX;
- g_rwebinput_mouse->delta_y += mouse_event->movementY;
+ rwebinput->mouse.x = mouse_event->targetX;
+ rwebinput->mouse.y = mouse_event->targetY;
+ rwebinput->mouse.pending_delta_x += mouse_event->movementX;
+ rwebinput->mouse.pending_delta_y += mouse_event->movementY;
if (event_type == EMSCRIPTEN_EVENT_MOUSEDOWN)
{
- g_rwebinput_mouse->buttons |= mask;
+ rwebinput->mouse.buttons |= mask;
}
else if (event_type == EMSCRIPTEN_EVENT_MOUSEUP)
{
- g_rwebinput_mouse->buttons &= ~mask;
+ rwebinput->mouse.buttons &= ~mask;
}
return EM_TRUE;
@@ -284,91 +287,80 @@ static EM_BOOL rwebinput_mouse_cb(int event_type,
static EM_BOOL rwebinput_wheel_cb(int event_type,
const EmscriptenWheelEvent *wheel_event, void *user_data)
{
+ rwebinput_input_t *rwebinput = (rwebinput_input_t*)user_data;
(void)event_type;
- (void)user_data;
- g_rwebinput_mouse->scroll_x += wheel_event->deltaX;
- g_rwebinput_mouse->scroll_y += wheel_event->deltaY;
+ rwebinput->mouse.pending_scroll_x += wheel_event->deltaX;
+ rwebinput->mouse.pending_scroll_y += wheel_event->deltaY;
return EM_TRUE;
}
static void *rwebinput_input_init(const char *joypad_driver)
{
+ EMSCRIPTEN_RESULT r;
rwebinput_input_t *rwebinput =
(rwebinput_input_t*)calloc(1, sizeof(*rwebinput));
- g_rwebinput_keyboard = (rwebinput_keyboard_event_queue_t*)
- calloc(1, sizeof(rwebinput_keyboard_event_queue_t));
- g_rwebinput_mouse = (rwebinput_mouse_state_t*)
- calloc(1, sizeof(rwebinput_mouse_state_t));
- if (!rwebinput || !g_rwebinput_keyboard || !g_rwebinput_mouse)
+ if (!rwebinput)
goto error;
- if (!g_rwebinput_initialized)
+ rwebinput_generate_lut();
+
+ r = emscripten_set_keydown_callback(EMSCRIPTEN_EVENT_TARGET_DOCUMENT, rwebinput, false,
+ rwebinput_keyboard_cb);
+ if (r != EMSCRIPTEN_RESULT_SUCCESS)
{
- EMSCRIPTEN_RESULT r;
+ RARCH_ERR(
+ "[EMSCRIPTEN/INPUT] failed to create keydown callback: %d\n", r);
+ }
- g_rwebinput_initialized = true;
- rwebinput_generate_lut();
+ r = emscripten_set_keyup_callback(EMSCRIPTEN_EVENT_TARGET_DOCUMENT, rwebinput, false,
+ rwebinput_keyboard_cb);
+ if (r != EMSCRIPTEN_RESULT_SUCCESS)
+ {
+ RARCH_ERR(
+ "[EMSCRIPTEN/INPUT] failed to create keydown callback: %d\n", r);
+ }
- /* emscripten currently doesn't have an API to remove handlers, so make
- * once and reuse it */
- r = emscripten_set_keydown_callback(EMSCRIPTEN_EVENT_TARGET_DOCUMENT, NULL, false,
- rwebinput_keyboard_cb);
- if (r != EMSCRIPTEN_RESULT_SUCCESS)
- {
- RARCH_ERR(
- "[EMSCRIPTEN/INPUT] failed to create keydown callback: %d\n", r);
- }
+ r = emscripten_set_keypress_callback(EMSCRIPTEN_EVENT_TARGET_DOCUMENT, rwebinput, false,
+ rwebinput_keyboard_cb);
+ if (r != EMSCRIPTEN_RESULT_SUCCESS)
+ {
+ RARCH_ERR(
+ "[EMSCRIPTEN/INPUT] failed to create keypress callback: %d\n", r);
+ }
- r = emscripten_set_keyup_callback(EMSCRIPTEN_EVENT_TARGET_DOCUMENT, NULL, false,
- rwebinput_keyboard_cb);
- if (r != EMSCRIPTEN_RESULT_SUCCESS)
- {
- RARCH_ERR(
- "[EMSCRIPTEN/INPUT] failed to create keydown callback: %d\n", r);
- }
+ r = emscripten_set_mousedown_callback("#canvas", rwebinput, false,
+ rwebinput_mouse_cb);
+ if (r != EMSCRIPTEN_RESULT_SUCCESS)
+ {
+ RARCH_ERR(
+ "[EMSCRIPTEN/INPUT] failed to create mousedown callback: %d\n", r);
+ }
- r = emscripten_set_keypress_callback(EMSCRIPTEN_EVENT_TARGET_DOCUMENT, NULL, false,
- rwebinput_keyboard_cb);
- if (r != EMSCRIPTEN_RESULT_SUCCESS)
- {
- RARCH_ERR(
- "[EMSCRIPTEN/INPUT] failed to create keypress callback: %d\n", r);
- }
+ r = emscripten_set_mouseup_callback("#canvas", rwebinput, false,
+ rwebinput_mouse_cb);
+ if (r != EMSCRIPTEN_RESULT_SUCCESS)
+ {
+ RARCH_ERR(
+ "[EMSCRIPTEN/INPUT] failed to create mouseup callback: %d\n", r);
+ }
- r = emscripten_set_mousedown_callback("#canvas", NULL, false,
- rwebinput_mouse_cb);
- if (r != EMSCRIPTEN_RESULT_SUCCESS)
- {
- RARCH_ERR(
- "[EMSCRIPTEN/INPUT] failed to create mousedown callback: %d\n", r);
- }
+ r = emscripten_set_mousemove_callback("#canvas", rwebinput, false,
+ rwebinput_mouse_cb);
+ if (r != EMSCRIPTEN_RESULT_SUCCESS)
+ {
+ RARCH_ERR(
+ "[EMSCRIPTEN/INPUT] failed to create mousemove callback: %d\n", r);
+ }
- r = emscripten_set_mouseup_callback("#canvas", NULL, false,
- rwebinput_mouse_cb);
- if (r != EMSCRIPTEN_RESULT_SUCCESS)
- {
- RARCH_ERR(
- "[EMSCRIPTEN/INPUT] failed to create mouseup callback: %d\n", r);
- }
-
- r = emscripten_set_mousemove_callback("#canvas", NULL, false,
- rwebinput_mouse_cb);
- if (r != EMSCRIPTEN_RESULT_SUCCESS)
- {
- RARCH_ERR(
- "[EMSCRIPTEN/INPUT] failed to create mousemove callback: %d\n", r);
- }
-
- r = emscripten_set_wheel_callback(EMSCRIPTEN_EVENT_TARGET_DOCUMENT, NULL, false,
- rwebinput_wheel_cb);
- if (r != EMSCRIPTEN_RESULT_SUCCESS)
- {
- RARCH_ERR(
- "[EMSCRIPTEN/INPUT] failed to create wheel callback: %d\n", r);
- }
+ r = emscripten_set_wheel_callback(EMSCRIPTEN_EVENT_TARGET_DOCUMENT, rwebinput, false,
+ rwebinput_wheel_cb);
+ if (r != EMSCRIPTEN_RESULT_SUCCESS)
+ {
+ RARCH_ERR(
+ "[EMSCRIPTEN/INPUT] failed to create wheel callback: %d\n", r);
}
input_keymaps_init_keyboard_lut(rarch_key_map_rwebinput);
@@ -378,8 +370,6 @@ static void *rwebinput_input_init(const char *joypad_driver)
return rwebinput;
error:
- free(g_rwebinput_keyboard);
- free(g_rwebinput_mouse);
free(rwebinput);
return NULL;
}
@@ -526,7 +516,7 @@ static int16_t rwebinput_input_state(void *data,
const struct retro_keybind **binds,
unsigned port, unsigned device, unsigned idx, unsigned id)
{
- rwebinput_input_t *rwebinput = (rwebinput_input_t*)data;
+ rwebinput_input_t *rwebinput = (rwebinput_input_t*)data;
switch (device)
{
@@ -584,14 +574,15 @@ static void rwebinput_input_free(void *data)
{
rwebinput_input_t *rwebinput = (rwebinput_input_t*)data;
- if (g_rwebinput_keyboard)
- free(g_rwebinput_keyboard->events);
- free(g_rwebinput_keyboard);
- g_rwebinput_keyboard = NULL;
- free(g_rwebinput_mouse);
- g_rwebinput_mouse = NULL;
+ emscripten_html5_remove_all_event_listeners();
+
+ if (rwebinput->joypad)
+ rwebinput->joypad->destroy();
+
+ free(rwebinput->keyboard.events);
free(rwebinput);
}
+
static void rwebinput_process_keyboard_events(rwebinput_input_t *rwebinput,
rwebinput_keyboard_event_t *event)
{
@@ -644,14 +635,20 @@ static void rwebinput_input_poll(void *data)
size_t i;
rwebinput_input_t *rwebinput = (rwebinput_input_t*)data;
- for (i = 0; i < g_rwebinput_keyboard->count; i++)
+ for (i = 0; i < rwebinput->keyboard.count; i++)
rwebinput_process_keyboard_events(rwebinput,
- &g_rwebinput_keyboard->events[i]);
- g_rwebinput_keyboard->count = 0;
+ &rwebinput->keyboard.events[i]);
+ rwebinput->keyboard.count = 0;
- memcpy(&rwebinput->mouse, g_rwebinput_mouse, sizeof(*g_rwebinput_mouse));
- g_rwebinput_mouse->delta_x = g_rwebinput_mouse->delta_y = 0;
- g_rwebinput_mouse->scroll_x = g_rwebinput_mouse->scroll_y = 0.0;
+ rwebinput->mouse.delta_x = rwebinput->mouse.pending_delta_x;
+ rwebinput->mouse.delta_y = rwebinput->mouse.pending_delta_y;
+ rwebinput->mouse.pending_delta_x = 0;
+ rwebinput->mouse.pending_delta_y = 0;
+
+ rwebinput->mouse.scroll_x = rwebinput->mouse.pending_scroll_x;
+ rwebinput->mouse.scroll_y = rwebinput->mouse.pending_scroll_y;
+ rwebinput->mouse.pending_scroll_x = 0;
+ rwebinput->mouse.pending_scroll_y = 0;
if (rwebinput->joypad)
rwebinput->joypad->poll();
diff --git a/input/drivers_joypad/dinput_joypad.c b/input/drivers_joypad/dinput_joypad.c
index 1c6b14d62d..602be215c9 100644
--- a/input/drivers_joypad/dinput_joypad.c
+++ b/input/drivers_joypad/dinput_joypad.c
@@ -267,7 +267,7 @@ static bool guid_is_xinput_device(const GUID* product_guid)
(MAKELONG(rdi.hid.dwVendorId, rdi.hid.dwProductId)
== ((LONG)product_guid->Data1)) &&
(GetRawInputDeviceInfoA(raw_devs[i].hDevice, RIDI_DEVICENAME, NULL, &nameSize) != ((UINT)-1)) &&
- ((devName = malloc(nameSize)) != NULL) &&
+ ((devName = (char*)malloc(nameSize)) != NULL) &&
(GetRawInputDeviceInfoA(raw_devs[i].hDevice, RIDI_DEVICENAME, devName, &nameSize) != ((UINT)-1)) &&
(strstr(devName, "IG_") != NULL) )
{
diff --git a/input/drivers_joypad/rwebpad_joypad.c b/input/drivers_joypad/rwebpad_joypad.c
index a77a03be23..463a9d4aa6 100644
--- a/input/drivers_joypad/rwebpad_joypad.c
+++ b/input/drivers_joypad/rwebpad_joypad.c
@@ -27,8 +27,6 @@
#define CLAMPDOUBLE(x) MIN(1.0, MAX(-1.0, (x)))
-static bool g_rwebpad_initialized;
-
static EM_BOOL rwebpad_gamepad_cb(int event_type,
const EmscriptenGamepadEvent *gamepad_event, void *user_data)
{
@@ -64,34 +62,28 @@ static EM_BOOL rwebpad_gamepad_cb(int event_type,
static bool rwebpad_joypad_init(void *data)
{
- EMSCRIPTEN_RESULT supported;
+ EMSCRIPTEN_RESULT r;
(void)data;
- supported = emscripten_sample_gamepad_data();
- if (supported == EMSCRIPTEN_RESULT_NOT_SUPPORTED)
+ r = emscripten_sample_gamepad_data();
+ if (r == EMSCRIPTEN_RESULT_NOT_SUPPORTED)
return false;
- if (!g_rwebpad_initialized)
+ /* callbacks needs to be registered for gamepads to connect */
+ r = emscripten_set_gamepadconnected_callback(NULL, false,
+ rwebpad_gamepad_cb);
+ if (r != EMSCRIPTEN_RESULT_SUCCESS)
{
- EMSCRIPTEN_RESULT r;
- g_rwebpad_initialized = true;
+ RARCH_ERR(
+ "[EMSCRIPTEN/PAD] failed to create connect callback: %d\n", r);
+ }
- /* callbacks needs to be registered for gamepads to connect */
- r = emscripten_set_gamepadconnected_callback(NULL, false,
- rwebpad_gamepad_cb);
- if (r != EMSCRIPTEN_RESULT_SUCCESS)
- {
- RARCH_ERR(
- "[EMSCRIPTEN/PAD] failed to create connect callback: %d\n", r);
- }
-
- r = emscripten_set_gamepaddisconnected_callback(NULL, false,
- rwebpad_gamepad_cb);
- if (r != EMSCRIPTEN_RESULT_SUCCESS)
- {
- RARCH_ERR(
- "[EMSCRIPTEN/PAD] failed to create disconnect callback: %d\n", r);
- }
+ r = emscripten_set_gamepaddisconnected_callback(NULL, false,
+ rwebpad_gamepad_cb);
+ if (r != EMSCRIPTEN_RESULT_SUCCESS)
+ {
+ RARCH_ERR(
+ "[EMSCRIPTEN/PAD] failed to create disconnect callback: %d\n", r);
}
return true;
diff --git a/input/include/blissbox.h b/input/include/blissbox.h
index 35686fe02e..cb840ef2a0 100644
--- a/input/include/blissbox.h
+++ b/input/include/blissbox.h
@@ -31,77 +31,12 @@
RETRO_BEGIN_DECLS
-typedef struct {
+typedef struct
+{
const char *name;
int index;
} blissbox_pad_type_t;
-const blissbox_pad_type_t blissbox_pad_types[] =
-{
- {"A5200", 6},
- {"A5200_TB", 50},
- {"A7800", 4},
- {"ATARI", 0},
- {"ATARI_KEYPAD", 43},
- {"ATMARK", 10},
- {"BALLY", 42},
- {"CD32", 24},
- {"CDI", 33},
- {"COL", 1},
- {"COL_FLASHBACK", 48}, /* 3.0 */
- {"DC_ASCI", 15},
- {"DC_PAD", 16},
- {"DC_TWIN", 35}, /* 3.0 */
- {"FC_ARKANOID", 53},
- {"FC_NES", 52},
- {"GC", 9},
- {"GC_WHEEL", 18},
- {"GEN_3", 20},
- {"GEN_6", 21},
- {"GRAVIS_EX", 38},
- {"HAMMERHEAD", 40},
- {"HPD", 7},
- {"INTELI", 14},
- {"JAG", 11},
- {"MSSW", 39},
- {"N64", 19},
- {"NEO", 49},
- {"NES", 17},
- {"NES_ARKANOID", 30},
- {"NES_GUN", 28},
- {"NES_POWERPAD", 36},
- {"PADDLES", 41},
- {"PC_FX", 26},
- {"PC_GAMEPAD", 46},
- {"PSX_DIGITAL", 65},
- {"PSX_DS", 115},
- {"PSX_DS2", 121},
- {"PSX_FS", 83},
- {"PSX_JOGCON", 227}, /* 3.0 */
- {"PSX_NEGCON", 51},
- {"PSX_WHEEL", 12},
- {"SAC", 34},
- {"SATURN_ANALOG", 8},
- {"SATURN_DIGITAL", 3},
- {"SMS", 22},
- {"SNES", 27},
- {"SNESS_NTT", 47}, /* 3.0 */
- {"SPEEK", 45},
- {"TG16", 23},
- {"TG16_6BUTTON", 54}, /* 3.0 */
- {"THREE_DO", 25},
- {"THREE_DO_ANALOG", 37},
- {"VEC", 5},
- {"V_BOY", 29},
- {"WII_CLASSIC", 31},
- {"WII_DRUM", 55}, /* 3.0 */
- {"WII_MPLUS", 32},
- {"WII_NUNCHUK", 13},
- {"ZXSINC", 44},
- {"gx4000", 2},
- {NULL, 0}, /* used to mark unconnected ports, do not remove */
-};
-
RETRO_END_DECLS
#endif
diff --git a/intl/msg_hash_chs.h b/intl/msg_hash_chs.h
index c7316bdce1..7b29a8a6aa 100644
--- a/intl/msg_hash_chs.h
+++ b/intl/msg_hash_chs.h
@@ -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,
@@ -3501,10 +3493,6 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_MESSAGE_COLOR_BLUE,
"屏显消息(OSD)RGB颜色 蓝色")
MSG_HASH(MENU_ENUM_LABEL_VALUE_FRAMECOUNT_SHOW,
"显示FPS帧数")
-MSG_HASH(MENU_ENUM_LABEL_VALUE_AUTOMATICALLY_ADD_CONTENT_TO_PLAYLIST,
- "自动添加内容到游戏列表")
-MSG_HASH(MENU_ENUM_SUBLABEL_AUTOMATICALLY_ADD_CONTENT_TO_PLAYLIST,
- "自动扫描游戏文件,并添加在游戏列表中。")
MSG_HASH(MSG_SCANNING_OF_FILE_FINISHED,
"文件扫描完成")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_RESAMPLER_QUALITY,
diff --git a/intl/msg_hash_cht.h b/intl/msg_hash_cht.h
index 2564db9f12..6c8931273f 100644
--- a/intl/msg_hash_cht.h
+++ b/intl/msg_hash_cht.h
@@ -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,
@@ -2584,10 +2580,6 @@ MSG_HASH(MSG_INPUT_KIOSK_MODE_PASSWORD_OK,
"密碼正確")
MSG_HASH(MSG_INPUT_KIOSK_MODE_PASSWORD_NOK,
"密碼錯誤")
-MSG_HASH(MENU_ENUM_LABEL_VALUE_AUTOMATICALLY_ADD_CONTENT_TO_PLAYLIST,
- "自動增加遊戲內容至 playlist")
-MSG_HASH(MENU_ENUM_SUBLABEL_AUTOMATICALLY_ADD_CONTENT_TO_PLAYLIST,
- "Automatically scans loaded content so they appear inside playlists.")
MSG_HASH(MSG_SCANNING_OF_FILE_FINISHED,
"掃瞄檔案結束")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_RESAMPLER_QUALITY,
diff --git a/intl/msg_hash_de.h b/intl/msg_hash_de.h
index dbb4193800..2a9b6cc3ed 100644
--- a/intl/msg_hash_de.h
+++ b/intl/msg_hash_de.h
@@ -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,
@@ -3398,10 +3388,6 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_MESSAGE_COLOR_BLUE,
"Blau-Anteil der Bildschirmmeldungen")
MSG_HASH(MENU_ENUM_LABEL_VALUE_FRAMECOUNT_SHOW,
"Zeige die aktuelle Anzahl an Einzelbildern an")
-MSG_HASH(MENU_ENUM_LABEL_VALUE_AUTOMATICALLY_ADD_CONTENT_TO_PLAYLIST,
- "Inhalt automatisch zur Playlist hinzufügen")
-MSG_HASH(MENU_ENUM_SUBLABEL_AUTOMATICALLY_ADD_CONTENT_TO_PLAYLIST,
- "Scant automatisch den geladenen Inhalt, so dass er in Playlisten angezeigt wird.")
MSG_HASH(MSG_SCANNING_OF_FILE_FINISHED,
"Scannen von Datei beendet")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_RESAMPLER_QUALITY,
diff --git a/intl/msg_hash_es.c b/intl/msg_hash_es.c
index 9e6753bd33..722513b7b1 100644
--- a/intl/msg_hash_es.c
+++ b/intl/msg_hash_es.c
@@ -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:
diff --git a/intl/msg_hash_es.h b/intl/msg_hash_es.h
index 8cfc800bd3..19b5cb3ef4 100644
--- a/intl/msg_hash_es.h
+++ b/intl/msg_hash_es.h
@@ -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ú."
@@ -7533,14 +7513,6 @@ MSG_HASH(
MSG_RUNAHEAD_FAILED_TO_CREATE_SECONDARY_INSTANCE,
"Error al crear la segunda instancia. La reducción predictiva solo usará una a partir de este momento."
)
-MSG_HASH(
- MENU_ENUM_LABEL_VALUE_AUTOMATICALLY_ADD_CONTENT_TO_PLAYLIST,
- "Autoagregar contenidos a listas de reproducción"
- )
-MSG_HASH(
- MENU_ENUM_SUBLABEL_AUTOMATICALLY_ADD_CONTENT_TO_PLAYLIST,
- "Busca automáticamente los contenidos para que aparezcan en las listas de reproducción."
- )
MSG_HASH(
MSG_SCANNING_OF_FILE_FINISHED,
"Archivo escaneado"
diff --git a/intl/msg_hash_fr.h b/intl/msg_hash_fr.h
index 4e006b2c71..d43cc41437 100644
--- a/intl/msg_hash_fr.h
+++ b/intl/msg_hash_fr.h
@@ -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."
@@ -7514,14 +7494,6 @@ MSG_HASH(
MSG_RUNAHEAD_FAILED_TO_CREATE_SECONDARY_INSTANCE,
"Impossible de créer une deuxième instance. L'éxécution en avance utilisera désormais une seule instance."
)
-MSG_HASH(
- MENU_ENUM_LABEL_VALUE_AUTOMATICALLY_ADD_CONTENT_TO_PLAYLIST,
- "Ajouter automatiquement aux listes de lecture"
- )
-MSG_HASH(
- MENU_ENUM_SUBLABEL_AUTOMATICALLY_ADD_CONTENT_TO_PLAYLIST,
- "Analyse automatiquement le contenu chargé avec le scanner des listes de lecture."
- )
MSG_HASH(
MSG_SCANNING_OF_FILE_FINISHED,
"Analyse du fichier terminée"
diff --git a/intl/msg_hash_it.h b/intl/msg_hash_it.h
index 75d4a23720..c81246ba55 100644
--- a/intl/msg_hash_it.h
+++ b/intl/msg_hash_it.h
@@ -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,
@@ -3414,10 +3404,6 @@ MSG_HASH(MSG_INPUT_KIOSK_MODE_PASSWORD_OK,
"Password corretta.")
MSG_HASH(MSG_INPUT_KIOSK_MODE_PASSWORD_NOK,
"Password non corretta.")
-MSG_HASH(MENU_ENUM_LABEL_VALUE_AUTOMATICALLY_ADD_CONTENT_TO_PLAYLIST,
- "Aggiungi automaticamente il contenuto alla playlist")
-MSG_HASH(MENU_ENUM_SUBLABEL_AUTOMATICALLY_ADD_CONTENT_TO_PLAYLIST,
- "Esegue automaticamente la scansione dei contenuti caricati in modo che vengano visualizzati all'interno delle playlist.")
MSG_HASH(MSG_SCANNING_OF_FILE_FINISHED,
"Scansione del file completata")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_RESAMPLER_QUALITY,
diff --git a/intl/msg_hash_ja.h b/intl/msg_hash_ja.h
index 1506a529fd..c741366bd1 100644
--- a/intl/msg_hash_ja.h
+++ b/intl/msg_hash_ja.h
@@ -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,
"メニュー内でフレームレートが制限されていることを確認します。"
@@ -7251,14 +7230,6 @@ MSG_HASH(
MSG_RUNAHEAD_FAILED_TO_CREATE_SECONDARY_INSTANCE,
"2つ目のコアをスタートに失敗しました。先読みが一つのコアを使用になります。"
)
-MSG_HASH(
- MENU_ENUM_LABEL_VALUE_AUTOMATICALLY_ADD_CONTENT_TO_PLAYLIST,
- "自動的にコンテンツをプレイリストに追加"
-)
-MSG_HASH(
- MENU_ENUM_SUBLABEL_AUTOMATICALLY_ADD_CONTENT_TO_PLAYLIST,
- "ロードされたコンテンツは自動的にスキャンされ, プレイリストに表示されます。"
-)
MSG_HASH(
MSG_SCANNING_OF_FILE_FINISHED,
"ファイルのスキャンは完了しました。"
diff --git a/intl/msg_hash_ko.h b/intl/msg_hash_ko.h
index 0adb574d8b..5574352e5e 100644
--- a/intl/msg_hash_ko.h
+++ b/intl/msg_hash_ko.h
@@ -807,14 +807,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,
"디스크 인덱스"
@@ -6691,10 +6683,6 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_DISK_OPTIONS,
"디스크 이미지를 관리합니다."
)
-MSG_HASH(
- MENU_ENUM_SUBLABEL_DISK_IMAGE_APPEND,
- "삽입할 디스크 이미지를 선택하십시오."
- )
MSG_HASH(
MENU_ENUM_SUBLABEL_MENU_ENUM_THROTTLE_FRAMERATE,
"메뉴상에 있을 시의 프레임 제한을 설정합니다."
diff --git a/intl/msg_hash_lbl.h b/intl/msg_hash_lbl.h
index f74217ce02..766ba2ebd1 100644
--- a/intl/msg_hash_lbl.h
+++ b/intl/msg_hash_lbl.h
@@ -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,
@@ -1815,8 +1824,6 @@ MSG_HASH(MENU_ENUM_LABEL_FRAMECOUNT_SHOW,
"framecount_show")
MSG_HASH(MENU_ENUM_LABEL_MEMORY_SHOW,
"memory_show")
-MSG_HASH(MENU_ENUM_LABEL_AUTOMATICALLY_ADD_CONTENT_TO_PLAYLIST,
- "automatically_add_content_to_playlist")
MSG_HASH(MENU_ENUM_LABEL_VIDEO_WINDOW_OPACITY,
"video_window_opacity")
MSG_HASH(MENU_ENUM_LABEL_AUDIO_RESAMPLER_QUALITY,
@@ -2095,6 +2102,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 +2212,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")
diff --git a/intl/msg_hash_nl.h b/intl/msg_hash_nl.h
index efd06bb4d2..2794de999d 100644
--- a/intl/msg_hash_nl.h
+++ b/intl/msg_hash_nl.h
@@ -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,
diff --git a/intl/msg_hash_pl.h b/intl/msg_hash_pl.h
index 205f85f41c..902ee65e8e 100644
--- a/intl/msg_hash_pl.h
+++ b/intl/msg_hash_pl.h
@@ -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,
@@ -3541,10 +3531,6 @@ MSG_HASH(MSG_GAME_REMAP_FILE_LOADED,
"Załadowano plik remapu gry.")
MSG_HASH(MSG_CORE_REMAP_FILE_LOADED,
"Załadowano plik wymiany rdzenia.")
-MSG_HASH(MENU_ENUM_LABEL_VALUE_AUTOMATICALLY_ADD_CONTENT_TO_PLAYLIST,
- "Automatycznie dodawaj zawartość do listy odtwarzania")
-MSG_HASH(MENU_ENUM_SUBLABEL_AUTOMATICALLY_ADD_CONTENT_TO_PLAYLIST,
- "Automatycznie skanuje załadowaną zawartość, aby pojawiły się w listach odtwarzania.")
MSG_HASH(MSG_SCANNING_OF_FILE_FINISHED,
"Skanowanie pliku zakończone")
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_WINDOW_OPACITY,
@@ -4810,3 +4796,163 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_MENU_TICKER_SMOOTH,/* FIXME */
"Użyj płynnej animacji przewijania podczas wyświetlania długich ciągów tekstowych menu. Ma niewielki wpływ na wydajność."
)
+MSG_HASH(
+ MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_LIST,
+ "Skanowanie ręczne"
+ )
+MSG_HASH(
+ MENU_ENUM_SUBLABEL_MANUAL_CONTENT_SCAN_LIST,
+ "Konfigurowalne skanowanie w oparciu o nazwy plików zawartości. Nie wymaga zawartości pasującej do bazy danych."
+ )
+MSG_HASH(
+ MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_DIR,
+ "Katalog treści"
+ )
+MSG_HASH(
+ MENU_ENUM_SUBLABEL_MANUAL_CONTENT_SCAN_DIR,
+ "Wybiera katalog do skanowania w poszukiwaniu zawartości."
+ )
+MSG_HASH(
+ MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_SYSTEM_NAME,
+ "Nazwa systemu"
+ )
+MSG_HASH(
+ MENU_ENUM_SUBLABEL_MANUAL_CONTENT_SCAN_SYSTEM_NAME,
+ "Podaj „nazwę systemu”, z którą chcesz powiązać zeskanowaną zawartość. Służy do nazywania wygenerowanego pliku listy odtwarzania i identyfikowania miniatur listy odtwarzania."
+ )
+MSG_HASH(
+ MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_SYSTEM_NAME_CUSTOM,
+ "Niestandardowa nazwa systemu"
+ )
+MSG_HASH(
+ MENU_ENUM_SUBLABEL_MANUAL_CONTENT_SCAN_SYSTEM_NAME_CUSTOM,
+ "Ręcznie określ „nazwę systemu” dla skanowanej zawartości. Używane tylko, gdy „Nazwa Systemu” jest ustawiona na „”."
+ )
+MSG_HASH(
+ MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_CORE_NAME,
+ "Rdzeń"
+ )
+MSG_HASH(
+ MENU_ENUM_SUBLABEL_MANUAL_CONTENT_SCAN_CORE_NAME,
+ "Wybierz domyślny rdzeń, który będzie używany podczas uruchamiania zeskanowanej zawartości."
+ )
+MSG_HASH(
+ MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_FILE_EXTS,
+ "Rozszerzenia plików"
+ )
+MSG_HASH(
+ MENU_ENUM_SUBLABEL_MANUAL_CONTENT_SCAN_FILE_EXTS,
+ "Rozdzielana spacjami lista typów plików, które należy uwzględnić podczas skanowania. Jeśli jest pusta, obejmuje wszystkie pliki - lub jeśli określono rdzeń, wszystkie pliki obsługiwane przez rdzeń."
+ )
+MSG_HASH(
+ MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_SEARCH_ARCHIVES,
+ "Skanuj wewnątrz archiwów"
+ )
+MSG_HASH(
+ MENU_ENUM_SUBLABEL_MANUAL_CONTENT_SCAN_SEARCH_ARCHIVES,
+ "Po włączeniu pliki archiwów (.zip, .7z itp.) Będą wyszukiwane pod kątem prawidłowej / obsługiwanej zawartości. Może mieć znaczący wpływ na wydajność skanowania."
+ )
+MSG_HASH(
+ MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_DAT_FILE,
+ "Plik Arcade DAT"
+ )
+MSG_HASH(
+ MENU_ENUM_SUBLABEL_MANUAL_CONTENT_SCAN_DAT_FILE,
+ "ybierz plik XML DAT Logiqx lub MAME List, aby włączyć automatyczne nazywanie zeskanowanej zawartości zręcznościowej (MAME, FinalBurn Neo itp.)."
+ )
+MSG_HASH(
+ MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_OVERWRITE,
+ "Zastąp istniejącą listę odtwarzania"
+ )
+MSG_HASH(
+ MENU_ENUM_SUBLABEL_MANUAL_CONTENT_SCAN_OVERWRITE,
+ "Po włączeniu wszelkie istniejące listy odtwarzania zostaną usunięte przed skanowaniem zawartości. Po wyłączeniu istniejące wpisy listy odtwarzania są zachowywane i dodawana jest tylko zawartość aktualnie brakująca na liście odtwarzania."
+ )
+MSG_HASH(
+ MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_START,
+ "Rozpocznij skanowanie"
+ )
+MSG_HASH(
+ MENU_ENUM_SUBLABEL_MANUAL_CONTENT_SCAN_START,
+ "Skanuj wybraną zawartość."
+ )
+MSG_HASH(
+ MENU_ENUM_LABEL_VALUE_VIDEO_OUTPUT_SETTINGS,
+ "Wyjście"
+ )
+MSG_HASH(
+ MENU_ENUM_SUBLABEL_VIDEO_OUTPUT_SETTINGS,
+ "Zmień ustawienia wyjścia wideo."
+ )
+MSG_HASH(
+ MENU_ENUM_LABEL_VALUE_VIDEO_SCALING_SETTINGS,
+ "Skalowanie"
+ )
+MSG_HASH(
+ MENU_ENUM_SUBLABEL_VIDEO_SCALING_SETTINGS,
+ "Zmień ustawienia skalowania wideo."
+ )
+MSG_HASH(
+ MENU_ENUM_LABEL_VALUE_VIDEO_SYNCHRONIZATION_SETTINGS,
+ "Synchronizacja"
+ )
+MSG_HASH(
+ MENU_ENUM_SUBLABEL_VIDEO_SYNCHRONIZATION_SETTINGS,
+ "Zmień ustawienia synchronizacji wideo."
+ )
+MSG_HASH(
+ MENU_ENUM_LABEL_VALUE_AUDIO_OUTPUT_SETTINGS,
+ "Wyjście"
+ )
+MSG_HASH(
+ MENU_ENUM_SUBLABEL_AUDIO_OUTPUT_SETTINGS,
+ "Zmień ustawienia wyjścia audio."
+ )
+MSG_HASH(
+ MENU_ENUM_LABEL_VALUE_AUDIO_SYNCHRONIZATION_SETTINGS,
+ "Synchronization"
+ )
+MSG_HASH(
+ MENU_ENUM_SUBLABEL_AUDIO_SYNCHRONIZATION_SETTINGS,
+ "Zmień ustawienia synchronizacji dźwięku."
+ )
+MSG_HASH(
+ MENU_ENUM_LABEL_VALUE_AUDIO_RESAMPLER_SETTINGS,
+ "Resampler"
+ )
+MSG_HASH(
+ MENU_ENUM_SUBLABEL_AUDIO_RESAMPLER_SETTINGS,
+ "Zmień ustawienia resamplera audio."
+ )
+MSG_HASH(
+ MENU_ENUM_SUBLABEL_INPUT_TURBO_MODE,
+ "Wybiera ogólne zachowanie trybu turbo."
+ )
+MSG_HASH(
+ MENU_ENUM_LABEL_VALUE_INPUT_TURBO_DEFAULT_BUTTON,
+ "Domyślny przycisk Turbo"
+ )
+MSG_HASH(
+ MENU_ENUM_LABEL_VALUE_INPUT_TURBO_MODE,
+ "Tryb turbo"
+ )
+MSG_HASH(
+ MENU_ENUM_SUBLABEL_INPUT_TURBO_DEFAULT_BUTTON,
+ "Domyślny aktywny przycisk trybu pojedynczego „Turbo”."
+ )
+MSG_HASH(
+ MENU_ENUM_LABEL_VALUE_INPUT_HAPTIC_FEEDBACK_SETTINGS,
+ "Haptyczne sprzężenie zwrotne / wibracje"
+ )
+MSG_HASH(
+ MENU_ENUM_SUBLABEL_INPUT_HAPTIC_FEEDBACK_SETTINGS,
+ "Zmień ustawienia dotykowego sprzężenia zwrotnego i wibracji."
+ )
+MSG_HASH(
+ MENU_ENUM_LABEL_VALUE_INPUT_MENU_SETTINGS,
+ "Sterowanie menu"
+ )
+MSG_HASH(
+ MENU_ENUM_SUBLABEL_INPUT_MENU_SETTINGS,
+ "Zmień ustawienia sterowania menu."
+ )
diff --git a/intl/msg_hash_pt_br.h b/intl/msg_hash_pt_br.h
index 0ccd906c64..f23b669678 100644
--- a/intl/msg_hash_pt_br.h
+++ b/intl/msg_hash_pt_br.h
@@ -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."
@@ -7410,14 +7390,6 @@ MSG_HASH(
MSG_RUNAHEAD_FAILED_TO_CREATE_SECONDARY_INSTANCE,
"Falha ao criar uma segunda instância. O Adiantar Quadro agora usará apenas uma instância."
)
-MSG_HASH(
- MENU_ENUM_LABEL_VALUE_AUTOMATICALLY_ADD_CONTENT_TO_PLAYLIST,
- "Adicione automaticamente conteúdo à lista de reprodução"
- )
-MSG_HASH(
- MENU_ENUM_SUBLABEL_AUTOMATICALLY_ADD_CONTENT_TO_PLAYLIST,
- "Verifica automaticamente o conteúdo carregado para que eles apareçam dentro das listas de reprodução."
- )
MSG_HASH(
MSG_SCANNING_OF_FILE_FINISHED,
"Verificação do arquivo terminado"
diff --git a/intl/msg_hash_pt_pt.h b/intl/msg_hash_pt_pt.h
index 33bd76d993..7938f9d352 100644
--- a/intl/msg_hash_pt_pt.h
+++ b/intl/msg_hash_pt_pt.h
@@ -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,
@@ -3247,10 +3237,6 @@ MSG_HASH(MSG_INPUT_KIOSK_MODE_PASSWORD_OK,
"Palavra-passe correta.")
MSG_HASH(MSG_INPUT_KIOSK_MODE_PASSWORD_NOK,
"Palavra-passe incorreta.")
-MSG_HASH(MENU_ENUM_LABEL_VALUE_AUTOMATICALLY_ADD_CONTENT_TO_PLAYLIST,
- "Adicionar conteúdo à lista de reprodução automaticamente")
-MSG_HASH(MENU_ENUM_SUBLABEL_AUTOMATICALLY_ADD_CONTENT_TO_PLAYLIST,
- "Verificar automaticamente conteúdo carregado de forma a que apareça nas listas de reprodução.")
MSG_HASH(MSG_SCANNING_OF_FILE_FINISHED,
"Leitura do ficheiro terminada")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_RESAMPLER_QUALITY,
diff --git a/intl/msg_hash_ru.h b/intl/msg_hash_ru.h
index 8c91a0a56d..134500a20f 100644
--- a/intl/msg_hash_ru.h
+++ b/intl/msg_hash_ru.h
@@ -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,
@@ -3210,10 +3200,6 @@ MSG_HASH(MSG_INPUT_KIOSK_MODE_PASSWORD_OK,
"Пароль верен.")
MSG_HASH(MSG_INPUT_KIOSK_MODE_PASSWORD_NOK,
"Пароль неверен.")
-MSG_HASH(MENU_ENUM_LABEL_VALUE_AUTOMATICALLY_ADD_CONTENT_TO_PLAYLIST,
- "Автоматически добавлять контент в плейлист")
-MSG_HASH(MENU_ENUM_SUBLABEL_AUTOMATICALLY_ADD_CONTENT_TO_PLAYLIST,
- "Автоматически сканировать загруженный контент и добавлять его в плейлист.")
MSG_HASH(MSG_SCANNING_OF_FILE_FINISHED,
"Сканирование файла завершено")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_RESAMPLER_QUALITY,
diff --git a/intl/msg_hash_tr.h b/intl/msg_hash_tr.h
index 1fd04521c9..47a6755e05 100644
--- a/intl/msg_hash_tr.h
+++ b/intl/msg_hash_tr.h
@@ -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."
@@ -7032,14 +7012,6 @@ MSG_HASH(
MSG_RUNAHEAD_FAILED_TO_CREATE_SECONDARY_INSTANCE,
"Failed to create second instance. RunAhead will now use only one instance."
)
-MSG_HASH(
- MENU_ENUM_LABEL_VALUE_AUTOMATICALLY_ADD_CONTENT_TO_PLAYLIST,
- "Oynatma listelerine otomatik olarak içerik ekleyin"
- )
-MSG_HASH(
- MENU_ENUM_SUBLABEL_AUTOMATICALLY_ADD_CONTENT_TO_PLAYLIST,
- "Oynatılan tarayıcı ile yüklü içeriği otomatik olarak tarar."
- )
MSG_HASH(
MSG_SCANNING_OF_FILE_FINISHED,
"Dosyanın taranması tamamlandı"
diff --git a/intl/msg_hash_us.h b/intl/msg_hash_us.h
index e99d9a1f31..5aaddcd2d9 100644
--- a/intl/msg_hash_us.h
+++ b/intl/msg_hash_us.h
@@ -801,21 +801,45 @@ 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"
)
+MSG_HASH(
+ MENU_ENUM_LABEL_VALUE_NO_DISK,
+ "No disk selected"
+ )
MSG_HASH(
MENU_ENUM_LABEL_VALUE_DONT_CARE,
"Don't care"
@@ -2387,6 +2411,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 +2511,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"
@@ -4747,6 +4795,10 @@ MSG_HASH(
MSG_APPENDED_DISK,
"Appended disk"
)
+MSG_HASH(
+ MSG_FAILED_TO_APPEND_DISK,
+ "Failed to append disk"
+ )
MSG_HASH(
MSG_APPLICATION_DIR,
"Application Dir"
@@ -5563,6 +5615,14 @@ MSG_HASH(
MSG_VIRTUAL_DISK_TRAY,
"virtual disk tray."
)
+MSG_HASH(
+ MSG_VIRTUAL_DISK_TRAY_EJECT,
+ "eject"
+ )
+MSG_HASH(
+ MSG_VIRTUAL_DISK_TRAY_CLOSE,
+ "close"
+ )
MSG_HASH(
MENU_ENUM_SUBLABEL_AUDIO_LATENCY,
"Desired audio latency in milliseconds. Might not be honored if the audio driver can't provide given latency."
@@ -6672,23 +6732,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."
@@ -7539,14 +7586,6 @@ MSG_HASH(
MSG_RUNAHEAD_FAILED_TO_CREATE_SECONDARY_INSTANCE,
"Failed to create second instance. RunAhead will now use only one instance."
)
-MSG_HASH(
- MENU_ENUM_LABEL_VALUE_AUTOMATICALLY_ADD_CONTENT_TO_PLAYLIST,
- "Automatically add content to playlists"
- )
-MSG_HASH(
- MENU_ENUM_SUBLABEL_AUTOMATICALLY_ADD_CONTENT_TO_PLAYLIST,
- "Automatically scans loaded content with the playlist scanner."
- )
MSG_HASH(
MSG_SCANNING_OF_FILE_FINISHED,
"Scanning of file finished"
@@ -8954,6 +8993,10 @@ MSG_HASH(
MSG_FAILED_TO_SET_DISK,
"Failed to set disk"
)
+MSG_HASH(
+ MSG_FAILED_TO_SET_INITIAL_DISK,
+ "Failed to set last used disk..."
+ )
MSG_HASH(
MENU_ENUM_LABEL_VALUE_QT_CORE_OPTIONS,
"Core Options"
@@ -10079,6 +10122,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,
diff --git a/intl/msg_hash_vn.h b/intl/msg_hash_vn.h
index 573b6cdabf..4bc91ab86a 100644
--- a/intl/msg_hash_vn.h
+++ b/intl/msg_hash_vn.h
@@ -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,
diff --git a/libretro-common/audio/dsp_filters/Makefile b/libretro-common/audio/dsp_filters/Makefile
index d3c228cd94..02e049df57 100644
--- a/libretro-common/audio/dsp_filters/Makefile
+++ b/libretro-common/audio/dsp_filters/Makefile
@@ -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
diff --git a/libretro-common/file/file_path.c b/libretro-common/file/file_path.c
index 65b8f5b944..0b637554f3 100644
--- a/libretro-common/file/file_path.c
+++ b/libretro-common/file/file_path.c
@@ -32,8 +32,6 @@
#include
#include
#include
-#define VFS_FRONTEND
-#include
/* TODO: There are probably some unnecessary things on this huge include list now but I'm too afraid to touch it */
#ifdef __APPLE__
@@ -114,133 +112,6 @@
#endif
-static retro_vfs_stat_t path_stat_cb = retro_vfs_stat_impl;
-static retro_vfs_mkdir_t path_mkdir_cb = retro_vfs_mkdir_impl;
-
-void path_vfs_init(const struct retro_vfs_interface_info* vfs_info)
-{
- const struct retro_vfs_interface*
- vfs_iface = vfs_info->iface;
-
- path_stat_cb = retro_vfs_stat_impl;
- path_mkdir_cb = retro_vfs_mkdir_impl;
-
- if (vfs_info->required_interface_version < PATH_REQUIRED_VFS_VERSION || !vfs_iface)
- return;
-
- path_stat_cb = vfs_iface->stat;
- path_mkdir_cb = vfs_iface->mkdir;
-}
-
-int path_stat(const char *path)
-{
- return path_stat_cb(path, NULL);
-}
-
-/**
- * path_is_directory:
- * @path : path
- *
- * Checks if path is a directory.
- *
- * Returns: true (1) if path is a directory, otherwise false (0).
- */
-bool path_is_directory(const char *path)
-{
- return (path_stat_cb(path, NULL) & RETRO_VFS_STAT_IS_DIRECTORY) != 0;
-}
-
-bool path_is_character_special(const char *path)
-{
- return (path_stat_cb(path, NULL) & RETRO_VFS_STAT_IS_CHARACTER_SPECIAL) != 0;
-}
-
-bool path_is_valid(const char *path)
-{
- return (path_stat_cb(path, NULL) & RETRO_VFS_STAT_IS_VALID) != 0;
-}
-
-int32_t path_get_size(const char *path)
-{
- int32_t filesize = 0;
- if (path_stat_cb(path, &filesize) != 0)
- return filesize;
-
- return -1;
-}
-
-/**
- * path_mkdir:
- * @dir : directory
- *
- * Create directory on filesystem.
- *
- * Returns: true (1) if directory could be created, otherwise false (0).
- **/
-bool path_mkdir(const char *dir)
-{
- bool sret = false;
- bool norecurse = false;
- char *basedir = NULL;
-
- if (!(dir && *dir))
- return false;
-
- /* Use heap. Real chance of stack
- * overflow if we recurse too hard. */
- basedir = strdup(dir);
-
- if (!basedir)
- return false;
-
- path_parent_dir(basedir);
-
- if (!*basedir || !strcmp(basedir, dir))
- {
- free(basedir);
- return false;
- }
-
-#if defined(GEKKO)
- {
- size_t len = strlen(basedir);
-
- /* path_parent_dir() keeps the trailing slash.
- * On Wii, mkdir() fails if the path has a
- * trailing slash...
- * We must therefore remove it. */
- if (len > 0)
- if (basedir[len - 1] == '/')
- basedir[len - 1] = '\0';
- }
-#endif
-
- if (path_is_directory(basedir))
- norecurse = true;
- else
- {
- sret = path_mkdir(basedir);
-
- if (sret)
- norecurse = true;
- }
-
- free(basedir);
-
- if (norecurse)
- {
- int ret = path_mkdir_cb(dir);
-
- /* Don't treat this as an error. */
- if (ret == -2 && path_is_directory(dir))
- return true;
-
- return (ret == 0);
- }
-
- return sret;
-}
-
/**
* path_get_archive_delim:
* @path : path
diff --git a/libretro-common/file/file_path_io.c b/libretro-common/file/file_path_io.c
new file mode 100644
index 0000000000..c44afc5119
--- /dev/null
+++ b/libretro-common/file/file_path_io.c
@@ -0,0 +1,242 @@
+/* Copyright (C) 2010-2019 The RetroArch team
+ *
+ * ---------------------------------------------------------------------------------------
+ * The following license statement only applies to this file (file_path_io.c).
+ * ---------------------------------------------------------------------------------------
+ *
+ * Permission is hereby granted, free of charge,
+ * to any person obtaining a copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include
+#include
+#include
+#include
+#include
+
+#include
+
+#include
+#include
+#include
+#include
+#define VFS_FRONTEND
+#include
+
+/* TODO: There are probably some unnecessary things on this huge include list now but I'm too afraid to touch it */
+#ifdef __APPLE__
+#include
+#endif
+#ifdef __HAIKU__
+#include
+#endif
+#ifndef __MACH__
+#include
+#include
+#endif
+#include
+#include
+#include
+
+#if defined(_WIN32)
+#ifdef _MSC_VER
+#define setmode _setmode
+#endif
+#include
+#ifdef _XBOX
+#include
+#define INVALID_FILE_ATTRIBUTES -1
+#else
+#include
+#include
+#include
+#include
+#if defined(_MSC_VER) && _MSC_VER <= 1200
+#define INVALID_FILE_ATTRIBUTES ((DWORD)-1)
+#endif
+#endif
+#elif defined(VITA)
+#define SCE_ERROR_ERRNO_EEXIST 0x80010011
+#include
+#include
+#include
+#else
+#include
+#include
+#include
+#endif
+
+#if defined(PSP)
+#include
+#endif
+
+#if defined(PS2)
+#include
+#include
+#endif
+
+#if defined(__CELLOS_LV2__)
+#include
+#endif
+
+#if defined(VITA)
+#define FIO_S_ISDIR SCE_S_ISDIR
+#endif
+
+#if (defined(__CELLOS_LV2__) && !defined(__PSL1GHT__)) || defined(__QNX__) || defined(PSP) || defined(PS2)
+#include /* stat() is defined here */
+#endif
+
+#if !defined(RARCH_CONSOLE) && defined(RARCH_INTERNAL)
+#ifdef __WINRT__
+#include
+#endif
+#endif
+
+/* Assume W-functions do not work below Win2K and Xbox platforms */
+#if defined(_WIN32_WINNT) && _WIN32_WINNT < 0x0500 || defined(_XBOX)
+
+#ifndef LEGACY_WIN32
+#define LEGACY_WIN32
+#endif
+
+#endif
+
+static retro_vfs_stat_t path_stat_cb = retro_vfs_stat_impl;
+static retro_vfs_mkdir_t path_mkdir_cb = retro_vfs_mkdir_impl;
+
+void path_vfs_init(const struct retro_vfs_interface_info* vfs_info)
+{
+ const struct retro_vfs_interface*
+ vfs_iface = vfs_info->iface;
+
+ path_stat_cb = retro_vfs_stat_impl;
+ path_mkdir_cb = retro_vfs_mkdir_impl;
+
+ if (vfs_info->required_interface_version < PATH_REQUIRED_VFS_VERSION || !vfs_iface)
+ return;
+
+ path_stat_cb = vfs_iface->stat;
+ path_mkdir_cb = vfs_iface->mkdir;
+}
+
+int path_stat(const char *path)
+{
+ return path_stat_cb(path, NULL);
+}
+
+/**
+ * path_is_directory:
+ * @path : path
+ *
+ * Checks if path is a directory.
+ *
+ * Returns: true (1) if path is a directory, otherwise false (0).
+ */
+bool path_is_directory(const char *path)
+{
+ return (path_stat_cb(path, NULL) & RETRO_VFS_STAT_IS_DIRECTORY) != 0;
+}
+
+bool path_is_character_special(const char *path)
+{
+ return (path_stat_cb(path, NULL) & RETRO_VFS_STAT_IS_CHARACTER_SPECIAL) != 0;
+}
+
+bool path_is_valid(const char *path)
+{
+ return (path_stat_cb(path, NULL) & RETRO_VFS_STAT_IS_VALID) != 0;
+}
+
+int32_t path_get_size(const char *path)
+{
+ int32_t filesize = 0;
+ if (path_stat_cb(path, &filesize) != 0)
+ return filesize;
+
+ return -1;
+}
+
+/**
+ * path_mkdir:
+ * @dir : directory
+ *
+ * Create directory on filesystem.
+ *
+ * Returns: true (1) if directory could be created, otherwise false (0).
+ **/
+bool path_mkdir(const char *dir)
+{
+ bool sret = false;
+ bool norecurse = false;
+ char *basedir = NULL;
+
+ if (!(dir && *dir))
+ return false;
+
+ /* Use heap. Real chance of stack
+ * overflow if we recurse too hard. */
+ basedir = strdup(dir);
+
+ if (!basedir)
+ return false;
+
+ path_parent_dir(basedir);
+
+ if (!*basedir || !strcmp(basedir, dir))
+ {
+ free(basedir);
+ return false;
+ }
+
+#if defined(GEKKO)
+ {
+ size_t len = strlen(basedir);
+
+ /* path_parent_dir() keeps the trailing slash.
+ * On Wii, mkdir() fails if the path has a
+ * trailing slash...
+ * We must therefore remove it. */
+ if (len > 0)
+ if (basedir[len - 1] == '/')
+ basedir[len - 1] = '\0';
+ }
+#endif
+
+ if (path_is_directory(basedir))
+ norecurse = true;
+ else
+ {
+ sret = path_mkdir(basedir);
+
+ if (sret)
+ norecurse = true;
+ }
+
+ free(basedir);
+
+ if (norecurse)
+ {
+ int ret = path_mkdir_cb(dir);
+
+ /* Don't treat this as an error. */
+ if (ret == -2 && path_is_directory(dir))
+ return true;
+
+ return (ret == 0);
+ }
+
+ return sret;
+}
diff --git a/libretro-common/include/libretro.h b/libretro-common/include/libretro.h
index 2b7fc95a76..4ddb6e89ea 100644
--- a/libretro-common/include/libretro.h
+++ b/libretro-common/include/libretro.h
@@ -1117,7 +1117,7 @@ enum retro_mod
* This may be still be done regardless of the core options
* interface version.
*
- * If version is 1 however, core options may instead be set by
+ * If version is >= 1 however, core options may instead be set by
* passing an array of retro_core_option_definition structs to
* RETRO_ENVIRONMENT_SET_CORE_OPTIONS, or a 2D array of
* retro_core_option_definition structs to RETRO_ENVIRONMENT_SET_CORE_OPTIONS_INTL.
@@ -1132,8 +1132,8 @@ enum retro_mod
* GET_VARIABLE.
* This allows the frontend to present these variables to
* a user dynamically.
- * This should only be called if RETRO_ENVIRONMENT_GET_ENHANCED_CORE_OPTIONS
- * returns an API version of 1.
+ * This should only be called if RETRO_ENVIRONMENT_GET_CORE_OPTIONS_VERSION
+ * returns an API version of >= 1.
* This should be called instead of RETRO_ENVIRONMENT_SET_VARIABLES.
* This should be called the first time as early as
* possible (ideally in retro_set_environment).
@@ -1169,8 +1169,6 @@ enum retro_mod
* i.e. it should be feasible to cycle through options
* without a keyboard.
*
- * First entry should be treated as a default.
- *
* Example entry:
* {
* "foo_option",
@@ -1196,8 +1194,8 @@ enum retro_mod
* GET_VARIABLE.
* This allows the frontend to present these variables to
* a user dynamically.
- * This should only be called if RETRO_ENVIRONMENT_GET_ENHANCED_CORE_OPTIONS
- * returns an API version of 1.
+ * This should only be called if RETRO_ENVIRONMENT_GET_CORE_OPTIONS_VERSION
+ * returns an API version of >= 1.
* This should be called instead of RETRO_ENVIRONMENT_SET_VARIABLES.
* This should be called the first time as early as
* possible (ideally in retro_set_environment).
@@ -1257,7 +1255,38 @@ enum retro_mod
*
* 'data' points to an unsigned variable
*/
-
+
+#define RETRO_ENVIRONMENT_GET_DISK_CONTROL_INTERFACE_VERSION 57
+ /* unsigned * --
+ * Unsigned value is the API version number of the disk control
+ * interface supported by the frontend. If callback return false,
+ * API version is assumed to be 0.
+ *
+ * In legacy code, the disk control interface is defined by passing
+ * a struct of type retro_disk_control_callback to
+ * RETRO_ENVIRONMENT_SET_DISK_CONTROL_INTERFACE.
+ * This may be still be done regardless of the disk control
+ * interface version.
+ *
+ * If version is >= 1 however, the disk control interface may
+ * instead be defined by passing a struct of type
+ * retro_disk_control_ext_callback to
+ * RETRO_ENVIRONMENT_SET_DISK_CONTROL_EXT_INTERFACE.
+ * This allows the core to provide additional information about
+ * disk images to the frontend and/or enables extra
+ * disk control functionality by the frontend.
+ */
+
+#define RETRO_ENVIRONMENT_SET_DISK_CONTROL_EXT_INTERFACE 58
+ /* const struct retro_disk_control_ext_callback * --
+ * Sets an interface which frontend can use to eject and insert
+ * disk images, and also obtain information about individual
+ * disk image files registered by the core.
+ * This is used for games which consist of multiple images and
+ * must be manually swapped out by the user (e.g. PSX, floppy disk
+ * based systems).
+ */
+
/* VFS functionality */
/* File paths:
@@ -2307,7 +2336,8 @@ struct retro_keyboard_callback
retro_keyboard_event_t callback;
};
-/* Callbacks for RETRO_ENVIRONMENT_SET_DISK_CONTROL_INTERFACE.
+/* Callbacks for RETRO_ENVIRONMENT_SET_DISK_CONTROL_INTERFACE &
+ * RETRO_ENVIRONMENT_SET_DISK_CONTROL_EXT_INTERFACE.
* Should be set for implementations which can swap out multiple disk
* images in runtime.
*
@@ -2365,6 +2395,53 @@ typedef bool (RETRO_CALLCONV *retro_replace_image_index_t)(unsigned index,
* with replace_image_index. */
typedef bool (RETRO_CALLCONV *retro_add_image_index_t)(void);
+/* Sets initial image to insert in drive when calling
+ * core_load_game().
+ * Since we cannot pass the initial index when loading
+ * content (this would require a major API change), this
+ * is set by the frontend *before* calling the core's
+ * retro_load_game()/retro_load_game_special() implementation.
+ * A core should therefore cache the index/path values and handle
+ * them inside retro_load_game()/retro_load_game_special().
+ * - If 'index' is invalid (index >= get_num_images()), the
+ * core should ignore the set value and instead use 0
+ * - 'path' is used purely for error checking - i.e. when
+ * content is loaded, the core should verify that the
+ * disk specified by 'index' has the specified file path.
+ * This is to guard against auto selecting the wrong image
+ * if (for example) the user should modify an existing M3U
+ * playlist. We have to let the core handle this because
+ * set_initial_image() must be called before loading content,
+ * i.e. the frontend cannot access image paths in advance
+ * and thus cannot perform the error check itself.
+ * If set path and content path do not match, the core should
+ * ignore the set 'index' value and instead use 0
+ * Returns 'false' if index or 'path' are invalid, or core
+ * does not support this functionality
+ */
+typedef bool (RETRO_CALLCONV *retro_set_initial_image_t)(unsigned index, const char *path);
+
+/* Fetches the path of the specified disk image file.
+ * Returns 'false' if index is invalid (index >= get_num_images())
+ * or path is otherwise unavailable.
+ */
+typedef bool (RETRO_CALLCONV *retro_get_image_path_t)(unsigned index, char *path, size_t len);
+
+/* Fetches a core-provided 'label' for the specified disk
+ * image file. In the simplest case this may be a file name
+ * (without extension), but for cores with more complex
+ * content requirements information may be provided to
+ * facilitate user disk swapping - for example, a core
+ * running floppy-disk-based content may uniquely label
+ * save disks, data disks, level disks, etc. with names
+ * corresponding to in-game disk change prompts (so the
+ * frontend can provide better user guidance than a 'dumb'
+ * disk index value).
+ * Returns 'false' if index is invalid (index >= get_num_images())
+ * or label is otherwise unavailable.
+ */
+typedef bool (RETRO_CALLCONV *retro_get_image_label_t)(unsigned index, char *label, size_t len);
+
struct retro_disk_control_callback
{
retro_set_eject_state_t set_eject_state;
@@ -2378,6 +2455,27 @@ struct retro_disk_control_callback
retro_add_image_index_t add_image_index;
};
+struct retro_disk_control_ext_callback
+{
+ retro_set_eject_state_t set_eject_state;
+ retro_get_eject_state_t get_eject_state;
+
+ retro_get_image_index_t get_image_index;
+ retro_set_image_index_t set_image_index;
+ retro_get_num_images_t get_num_images;
+
+ retro_replace_image_index_t replace_image_index;
+ retro_add_image_index_t add_image_index;
+
+ /* NOTE: Frontend will only attempt to record/restore
+ * last used disk index if both set_initial_image()
+ * and get_image_path() are implemented */
+ retro_set_initial_image_t set_initial_image; /* Optional - may be NULL */
+
+ retro_get_image_path_t get_image_path; /* Optional - may be NULL */
+ retro_get_image_label_t get_image_label; /* Optional - may be NULL */
+};
+
enum retro_pixel_format
{
/* 0RGB1555, native endian.
@@ -2522,8 +2620,20 @@ struct retro_core_option_display
};
/* Maximum number of values permitted for a core option
- * NOTE: This may be increased on a core-by-core basis
- * if required (doing so has no effect on the frontend) */
+ * > Note: We have to set a maximum value due the limitations
+ * of the C language - i.e. it is not possible to create an
+ * array of structs each containing a variable sized array,
+ * so the retro_core_option_definition values array must
+ * have a fixed size. The size limit of 128 is a balancing
+ * act - it needs to be large enough to support all 'sane'
+ * core options, but setting it too large may impact low memory
+ * platforms. In practise, if a core option has more than
+ * 128 values then the implementation is likely flawed.
+ * To quote the above API reference:
+ * "The number of possible options should be very limited
+ * i.e. it should be feasible to cycle through options
+ * without a keyboard."
+ */
#define RETRO_NUM_CORE_OPTION_VALUES_MAX 128
struct retro_core_option_value
diff --git a/libretro-common/media/media_detect_cd.c b/libretro-common/media/media_detect_cd.c
index 9faa747a5a..db33e89829 100644
--- a/libretro-common/media/media_detect_cd.c
+++ b/libretro-common/media/media_detect_cd.c
@@ -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;
diff --git a/libretro-common/net/net_http.c b/libretro-common/net/net_http.c
index 1ccd617a25..97dbb4253d 100644
--- a/libretro-common/net/net_http.c
+++ b/libretro-common/net/net_http.c
@@ -252,15 +252,6 @@ static void net_http_send_str(
struct http_connection_t *net_http_connection_new(const char *url,
const char *method, const char *data)
{
- char new_domain[2048];
- bool error = false;
- char **domain = NULL;
- char *uri = NULL;
- char *url_dup = NULL;
- char *domain_port = NULL;
- char *domain_port2 = NULL;
- char *url_port = NULL;
-
struct http_connection_t *conn = (struct http_connection_t*)calloc(1,
sizeof(*conn));
@@ -273,14 +264,13 @@ struct http_connection_t *net_http_connection_new(const char *url,
return NULL;
}
- conn->urlcopy = strdup(url);
-
if (method)
conn->methodcopy = strdup(method);
if (data)
conn->postdatacopy = strdup(data);
+ conn->urlcopy = strdup(url);
if (!conn->urlcopy)
goto error;
@@ -292,57 +282,12 @@ struct http_connection_t *net_http_connection_new(const char *url,
conn->sock_state.ssl = true;
}
else
- error = true;
+ goto error;
if (string_is_empty(conn->scan))
goto error;
- /* Get the port here from the url if it's specified.
- does not work on username password urls: user:pass@domain.com
-
- This code is not supposed to be needed, since the port
- should be gotten elsewhere when the url is being scanned
- for ":", but for whatever reason, it's not working correctly.
- */
-
- uri = strchr(conn->scan, (char) '/');
-
- if (strchr(conn->scan, (char) ':'))
- {
- size_t buf_pos;
- url_dup = strdup(conn->scan);
- domain_port = strtok(url_dup, ":");
- domain_port2 = strtok(NULL, ":");
- url_port = domain_port2;
- if (strchr(domain_port2, (char) '/'))
- url_port = strtok(domain_port2, "/");
-
- if (url_port)
- conn->port = atoi(url_port);
-
- buf_pos = strlcpy(new_domain, domain_port, sizeof(new_domain));
- free(url_dup);
-
- if (uri)
- {
- if (!strchr(uri, (char) '/'))
- strlcat(new_domain, uri, sizeof(new_domain));
- else
- {
- new_domain[buf_pos] = '/';
- new_domain[buf_pos+1] = '\0';
- strlcat(new_domain, strchr(uri, (char)'/') + sizeof(char),
- sizeof(new_domain));
- }
- strlcpy(conn->scan, new_domain, strlen(conn->scan) + 1);
- }
- }
- /* end of port-fetching from url */
- if (error)
- goto error;
-
- domain = &conn->domain;
- *domain = conn->scan;
+ conn->domain = conn->scan;
return conn;
@@ -373,39 +318,80 @@ bool net_http_connection_iterate(struct http_connection_t *conn)
bool net_http_connection_done(struct http_connection_t *conn)
{
- char **location = NULL;
+ int has_port = 0;
if (!conn)
return false;
- location = &conn->location;
-
- if (*conn->scan == '\0')
+ if (!conn->domain || !*conn->domain)
return false;
- *conn->scan = '\0';
-
- if (conn->port == 0)
- {
- if (conn->sock_state.ssl)
- conn->port = 443;
- else
- conn->port = 80;
- }
if (*conn->scan == ':')
{
- if (!isdigit((int)conn->scan[1]))
+ /* domain followed by port, split off the port */
+ *conn->scan++ = '\0';
+
+ if (!isdigit((int)(*conn->scan)))
return false;
- conn->port = (int)strtoul(conn->scan + 1, &conn->scan, 10);
-
- if (*conn->scan != '/')
- return false;
+ conn->port = (int)strtoul(conn->scan, &conn->scan, 10);
+ has_port = 1;
+ }
+ else if (conn->port == 0)
+ {
+ /* port not specified, default to standard HTTP or HTTPS port */
+ if (conn->sock_state.ssl)
+ conn->port = 443;
+ else
+ conn->port = 80;
}
- *location = conn->scan + 1;
+ if (*conn->scan == '/')
+ {
+ /* domain followed by location - split off the location */
+ /* site.com/path.html or site.com:80/path.html */
+ *conn->scan = '\0';
+ conn->location = conn->scan + 1;
+ return true;
+ }
+ else if (!*conn->scan)
+ {
+ /* domain with no location - point location at empty string */
+ /* site.com or site.com:80 */
+ conn->location = conn->scan;
+ return true;
+ }
+ else if (*conn->scan == '?')
+ {
+ /* domain with no location, but still has query parms - point location at the query parms */
+ /* site.com?param=3 or site.com:80?param=3 */
+ if (!has_port)
+ {
+ /* if there wasn't a port, we have to expand the urlcopy so we can separate the two parts */
+ size_t domain_len = strlen(conn->domain);
+ size_t location_len = strlen(conn->scan);
+ char* urlcopy = (char*)malloc(domain_len + location_len + 2);
+ memcpy(urlcopy, conn->domain, domain_len);
+ urlcopy[domain_len] = '\0';
+ memcpy(urlcopy + domain_len + 1, conn->scan, location_len + 1);
- return true;
+ free(conn->urlcopy);
+ conn->domain = conn->urlcopy = urlcopy;
+ conn->location = conn->scan = urlcopy + domain_len + 1;
+ }
+ else
+ {
+ /* there was a port, so overwriting the : will terminate the domain and we can just point at the ? */
+ conn->location = conn->scan;
+ }
+
+ return true;
+ }
+ else
+ {
+ /* invalid character after domain/port */
+ return false;
+ }
}
void net_http_connection_free(struct http_connection_t *conn)
diff --git a/libretro-common/rthreads/tpool.c b/libretro-common/rthreads/tpool.c
index db3529222f..4856492155 100644
--- a/libretro-common/rthreads/tpool.c
+++ b/libretro-common/rthreads/tpool.c
@@ -101,8 +101,8 @@ static tpool_work_t *tpool_work_get(tpool_t *tp)
static void tpool_worker(void *arg)
{
- tpool_t *tp = arg;
- tpool_work_t *work;
+ tpool_work_t *work = NULL;
+ tpool_t *tp = (tpool_t*)arg;
while (true)
{
diff --git a/libretro-db/Makefile b/libretro-db/Makefile
index ec3c055a8b..bd717bb0a3 100644
--- a/libretro-db/Makefile
+++ b/libretro-db/Makefile
@@ -15,6 +15,7 @@ LIBRETRO_COMMON_C = \
$(LIBRETRO_COMM_DIR)/streams/file_stream.c \
$(LIBRETRO_COMM_DIR)/compat/compat_strcasestr.c \
$(LIBRETRO_COMM_DIR)/file/file_path.c \
+ $(LIBRETRO_COMM_DIR)/file/file_path_io.c \
$(LIBRETRO_COMM_DIR)/vfs/vfs_implementation.c \
$(LIBRETRO_COMM_DIR)/encodings/encoding_utf.c \
$(LIBRETRO_COMM_DIR)/compat/compat_strl.c \
diff --git a/menu/cbs/menu_cbs_deferred_push.c b/menu/cbs/menu_cbs_deferred_push.c
index 26215d0e75..d7e282e05e 100644
--- a/menu/cbs/menu_cbs_deferred_push.c
+++ b/menu/cbs/menu_cbs_deferred_push.c
@@ -238,6 +238,8 @@ generic_deferred_push(deferred_push_switch_backlight_control, DISPLAYLIST_
generic_deferred_push(deferred_push_manual_content_scan_list, DISPLAYLIST_MANUAL_CONTENT_SCAN_LIST)
generic_deferred_push(deferred_push_manual_content_scan_dat_file, DISPLAYLIST_MANUAL_CONTENT_SCAN_DAT_FILES)
+generic_deferred_push(deferred_push_file_browser_select_sideload_core, DISPLAYLIST_FILE_BROWSER_SELECT_SIDELOAD_CORE)
+
static int deferred_push_cursor_manager_list_deferred(
menu_displaylist_info_t *info)
{
@@ -662,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,
@@ -688,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},
@@ -1172,6 +1176,9 @@ static int menu_cbs_init_bind_deferred_push_compare_label(
case MENU_ENUM_LABEL_MANUAL_CONTENT_SCAN_DAT_FILE:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_manual_content_scan_dat_file);
break;
+ case MENU_ENUM_LABEL_SIDELOAD_CORE_LIST:
+ BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_file_browser_select_sideload_core);
+ break;
default:
return -1;
}
@@ -1391,6 +1398,9 @@ static int menu_cbs_init_bind_deferred_push_compare_label(
case MENU_LABEL_MANUAL_CONTENT_SCAN_DAT_FILE:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_manual_content_scan_dat_file);
break;
+ case MENU_LABEL_SIDELOAD_CORE_LIST:
+ BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_file_browser_select_sideload_core);
+ break;
default:
return -1;
}
diff --git a/menu/cbs/menu_cbs_get_value.c b/menu/cbs/menu_cbs_get_value.c
index 139f8316f9..a0370c1c25 100644
--- a/menu/cbs/menu_cbs_get_value.c
+++ b/menu/cbs/menu_cbs_get_value.c
@@ -762,29 +762,22 @@ static void menu_action_setting_disp_set_label_menu_disk_index(
const char *path,
char *s2, size_t len2)
{
- unsigned images = 0, current = 0;
- struct retro_disk_control_callback *control = NULL;
- rarch_system_info_t *system = runloop_get_system_info();
+ unsigned images = 0;
+ unsigned current = 0;
+ rarch_system_info_t *system = runloop_get_system_info();
if (!system)
return;
- control = &system->disk_control_cb;
-
- if (!control)
+ if (!disk_control_enabled(&system->disk_control))
return;
*w = 19;
*s = '\0';
strlcpy(s2, path, len2);
- if (!control->get_num_images)
- return;
- if (!control->get_image_index)
- return;
-
- images = control->get_num_images();
- current = control->get_image_index();
+ images = disk_control_get_num_images(&system->disk_control);
+ current = disk_control_get_image_index(&system->disk_control);
if (current >= images)
strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NO_DISK), len);
diff --git a/menu/cbs/menu_cbs_left.c b/menu/cbs/menu_cbs_left.c
index 430312914d..1bf9c16aa7 100644
--- a/menu/cbs/menu_cbs_left.c
+++ b/menu/cbs/menu_cbs_left.c
@@ -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;
}
diff --git a/menu/cbs/menu_cbs_ok.c b/menu/cbs/menu_cbs_ok.c
index 99e3ad9462..4881271f60 100644
--- a/menu/cbs/menu_cbs_ok.c
+++ b/menu/cbs/menu_cbs_ok.c
@@ -104,7 +104,6 @@ enum
ACTION_OK_SUBSYSTEM_ADD,
ACTION_OK_LOAD_CONFIG_FILE,
ACTION_OK_LOAD_CORE,
- ACTION_OK_SIDELOAD_CORE,
ACTION_OK_LOAD_WALLPAPER,
ACTION_OK_SET_PATH,
ACTION_OK_SET_PATH_AUDIO_FILTER,
@@ -196,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:
@@ -539,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;
@@ -817,7 +827,7 @@ int generic_action_ok_displaylist_push(const char *path,
info.directory_ptr = idx;
info_path = settings->paths.directory_core_assets;
info_label = label;
- dl_type = DISPLAYLIST_FILE_BROWSER_SELECT_SIDELOAD_CORE;
+ dl_type = DISPLAYLIST_FILE_BROWSER_SELECT_FILE;
break;
case ACTION_OK_DL_CONTENT_COLLECTION_LIST:
info.type = type;
@@ -1322,6 +1332,7 @@ void handle_dbscan_finished(retro_task_t *task,
static void content_add_to_playlist(const char *path)
{
+#if 0
#ifdef HAVE_LIBRETRODB
settings_t *settings = config_get_ptr();
if (!settings || !settings->bools.automatically_add_content_to_playlist)
@@ -1333,6 +1344,7 @@ static void content_add_to_playlist(const char *path)
settings->bools.show_hidden_files,
handle_dbscan_finished);
#endif
+#endif
}
static int file_load_with_detect_core_wrapper(
@@ -1513,9 +1525,28 @@ int generic_action_ok_command(enum event_command cmd)
/* TO-DO: Localization for errors */
static bool file_copy(const char *src_path, const char *dst_path, char *msg, size_t size)
{
+ RFILE *src = NULL;
RFILE *dst = NULL;
bool ret = true;
- RFILE *src = filestream_open(src_path,
+
+ /* Sanity check */
+ if (string_is_empty(src_path) || string_is_empty(dst_path))
+ {
+ strlcpy(msg, "invalid arguments", size);
+ ret = false;
+ goto end;
+ }
+
+ if (!path_is_valid(src_path))
+ {
+ strlcpy(msg, "source file does not exist", size);
+ ret = false;
+ goto end;
+ }
+
+ /* Open source file */
+ src = filestream_open(
+ src_path,
RETRO_VFS_FILE_ACCESS_READ,
RETRO_VFS_FILE_ACCESS_HINT_NONE);
@@ -1523,9 +1554,12 @@ static bool file_copy(const char *src_path, const char *dst_path, char *msg, siz
{
strlcpy(msg, "unable to open source file", size);
ret = false;
+ goto end;
}
- dst = filestream_open(dst_path,
+ /* Open destination file */
+ dst = filestream_open(
+ dst_path,
RETRO_VFS_FILE_ACCESS_WRITE,
RETRO_VFS_FILE_ACCESS_HINT_NONE);
@@ -1533,8 +1567,10 @@ static bool file_copy(const char *src_path, const char *dst_path, char *msg, siz
{
strlcpy(msg, "unable to open destination file", size);
ret = false;
+ goto end;
}
+ /* Copy file contents */
while (!filestream_eof(src))
{
int64_t numw;
@@ -1543,23 +1579,27 @@ static bool file_copy(const char *src_path, const char *dst_path, char *msg, siz
if (filestream_error(dst) != 0)
{
- strlcpy(msg, "error reading file\n", size);
+ strlcpy(msg, "error reading source file", size);
ret = false;
- break;
+ goto end;
}
numw = filestream_write(dst, buffer, numr);
if (numw != numr)
{
- strlcpy(msg, "error writing to file\n", size);
+ strlcpy(msg, "error writing to destination file", size);
ret = false;
- break;
+ goto end;
}
}
- filestream_close(src);
- filestream_close(dst);
+end:
+ if (src)
+ filestream_close(src);
+
+ if (dst)
+ filestream_close(dst);
return ret;
}
@@ -1636,31 +1676,6 @@ static int generic_action_ok(const char *path,
}
}
break;
- case ACTION_OK_SIDELOAD_CORE:
- {
- settings_t *settings = config_get_ptr();
- char destination_path[PATH_MAX_LENGTH];
- char message[PATH_MAX_LENGTH];
-
- fill_pathname_join(destination_path, settings->paths.directory_libretro, path_basename(action_path), sizeof(destination_path));
-
- if (!file_copy(
- action_path, destination_path, message, sizeof(message)))
- {
- runloop_msg_queue_push(msg_hash_to_str(
- MENU_ENUM_LABEL_VALUE_SIDELOAD_CORE_ERROR), 1, 100, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
- RARCH_LOG("[sideload] %s: %s\n", msg_hash_to_str(
- MENU_ENUM_LABEL_VALUE_SIDELOAD_CORE_ERROR), message);
- RARCH_LOG(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SIDELOAD_CORE_ERROR));
- }
- else
- {
- runloop_msg_queue_push(msg_hash_to_str(
- MENU_ENUM_LABEL_VALUE_SIDELOAD_CORE_SUCCESS), 1, 100, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
- RARCH_LOG("[sideload] %s\n", msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SIDELOAD_CORE_SUCCESS));
- }
- }
- break;
case ACTION_OK_LOAD_CONFIG_FILE:
{
settings_t *settings = config_get_ptr();
@@ -1761,9 +1776,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;
@@ -1866,7 +1888,6 @@ default_action_ok_set(action_ok_set_path_video_layout,ACTION_OK_SET_PATH_VIDEO_L
#endif
default_action_ok_set(action_ok_set_path, ACTION_OK_SET_PATH, MSG_UNKNOWN)
default_action_ok_set(action_ok_load_core, ACTION_OK_LOAD_CORE, MSG_UNKNOWN)
-default_action_ok_set(action_ok_sideload_core, ACTION_OK_SIDELOAD_CORE, MSG_UNKNOWN)
default_action_ok_set(action_ok_config_load, ACTION_OK_LOAD_CONFIG_FILE, MSG_UNKNOWN)
default_action_ok_set(action_ok_disk_image_append, ACTION_OK_APPEND_DISK_IMAGE, MSG_UNKNOWN)
default_action_ok_set(action_ok_subsystem_add, ACTION_OK_SUBSYSTEM_ADD, MSG_UNKNOWN)
@@ -3199,8 +3220,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 */
@@ -3221,7 +3242,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,
@@ -3972,7 +3993,7 @@ static int generic_action_ok_network(const char *path,
strlcpy(transf->path, url_path, sizeof(transf->path));
net_http_urlencode_full(url_path_encoded, url_path, sizeof(url_path_encoded));
- task_push_http_transfer(url_path_encoded, suppress_msg, url_label, callback, transf);
+ task_push_http_transfer_file(url_path_encoded, suppress_msg, url_label, callback, transf);
return generic_action_ok_displaylist_push(path, NULL,
label, type, idx, entry_idx, type_id2);
@@ -4093,8 +4114,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));
@@ -4104,12 +4123,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
@@ -4127,12 +4140,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))
@@ -4288,7 +4295,7 @@ static int action_ok_download_generic(const char *path,
else
net_http_urlencode_full(s3, s2, sizeof(s3));
- task_push_http_transfer(s3, suppress_msg, msg_hash_to_str(enum_idx), cb, transf);
+ task_push_http_transfer_file(s3, suppress_msg, msg_hash_to_str(enum_idx), cb, transf);
#endif
return 0;
}
@@ -4323,19 +4330,107 @@ 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)
+{
+ settings_t *settings = config_get_ptr();
+ menu_handle_t *menu = menu_driver_get_ptr();
+ const char *menu_path = NULL;
+ const char *core_file = path;
+ int ret = -1;
+ char src_path[PATH_MAX_LENGTH];
+ char dst_path[PATH_MAX_LENGTH];
+ char msg[PATH_MAX_LENGTH];
+
+ src_path[0] = '\0';
+ dst_path[0] = '\0';
+ msg[0] = '\0';
+
+ /* Sanity check */
+ if (!menu)
+ return menu_cbs_exit();
+
+ if (!settings || string_is_empty(core_file))
+ goto end;
+
+ if (string_is_empty(settings->paths.directory_libretro))
+ goto end;
+
+ /* Get source core path */
+ menu_entries_get_last_stack(
+ &menu_path, NULL, NULL, NULL, NULL);
+
+ if (!string_is_empty(menu_path))
+ fill_pathname_join(
+ src_path, menu_path, core_file, sizeof(src_path));
+ else
+ strlcpy(src_path, core_file, sizeof(src_path));
+
+ /* Get destination core path */
+ fill_pathname_join(
+ dst_path, settings->paths.directory_libretro,
+ core_file, sizeof(dst_path));
+
+ /* Copy core file from source to destination */
+ if (file_copy(src_path, dst_path, msg, sizeof(msg)))
+ {
+ /* Success */
+
+ /* Reload core info files */
+ command_event(CMD_EVENT_CORE_INFO_INIT, NULL);
+
+ /* Log result */
+ runloop_msg_queue_push(
+ msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SIDELOAD_CORE_SUCCESS),
+ 1, 100, true,
+ NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
+
+ RARCH_LOG(
+ "[sideload] %s\n",
+ msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SIDELOAD_CORE_SUCCESS));
+ }
+ else
+ {
+ /* Failure - just log result */
+ runloop_msg_queue_push(
+ msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SIDELOAD_CORE_ERROR),
+ 1, 100, true,
+ NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
+
+ RARCH_LOG(
+ "[sideload] %s: %s\n",
+ msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SIDELOAD_CORE_ERROR), msg);
+ }
+
+ /* Regardless of file copy success/failure, function
+ * should return zero if we get this far (since a
+ * failure would correspond to a filesystem error,
+ * not a menu error...) */
+ ret = 0;
+
+end:
+ /* Flush stack
+ * > Since the 'sideload core' option is present
+ * in several locations, can't flush to a predefined
+ * level - just go to the top */
+ menu_entries_flush_stack(NULL, 0);
+
+ return ret;
+}
#define default_action_ok_download(funcname, _id) \
static int (funcname)(const char *path, const char *label, unsigned type, size_t idx, size_t entry_idx) \
@@ -4413,7 +4508,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
@@ -5723,6 +5817,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)
{
@@ -5981,6 +6091,61 @@ 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)
+ disk_ejected = disk_control_get_eject_state(&sys_info->disk_control);
+
+ /* 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)
{
@@ -6199,6 +6364,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)
@@ -6359,9 +6543,6 @@ static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs,
case MENU_ENUM_LABEL_FILE_BROWSER_CORE:
BIND_ACTION_OK(cbs, action_ok_load_core);
break;
- case MENU_ENUM_LABEL_FILE_BROWSER_SIDELOAD_CORE:
- BIND_ACTION_OK(cbs, action_ok_sideload_core);
- break;
case MENU_ENUM_LABEL_FILE_BROWSER_CORE_SELECT_FROM_COLLECTION:
case MENU_ENUM_LABEL_FILE_BROWSER_CORE_SELECT_FROM_COLLECTION_CURRENT_CORE:
BIND_ACTION_OK(cbs, action_ok_core_deferred_set);
@@ -6617,6 +6798,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;
@@ -7025,6 +7209,9 @@ static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs,
case MENU_LABEL_LOAD_ARCHIVE:
BIND_ACTION_OK(cbs, action_ok_load_archive);
break;
+ case MENU_LABEL_SIDELOAD_CORE_LIST:
+ BIND_ACTION_OK(cbs, action_ok_sideload_core_list);
+ break;
case MENU_LABEL_VIDEO_SHADER_PASS:
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
BIND_ACTION_OK(cbs, action_ok_shader_pass);
@@ -7282,6 +7469,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;
@@ -7437,9 +7627,6 @@ static int menu_cbs_init_bind_ok_compare_type(menu_file_list_cbs_t *cbs,
case MENU_LABEL_CORE_LIST:
BIND_ACTION_OK(cbs, action_ok_load_core);
break;
- case MENU_LABEL_SIDELOAD_CORE_LIST:
- BIND_ACTION_OK(cbs, action_ok_sideload_core);
- break;
}
}
break;
@@ -7455,6 +7642,9 @@ static int menu_cbs_init_bind_ok_compare_type(menu_file_list_cbs_t *cbs,
case FILE_TYPE_DOWNLOAD_CORE:
BIND_ACTION_OK(cbs, action_ok_core_updater_download);
break;
+ case FILE_TYPE_SIDELOAD_CORE:
+ BIND_ACTION_OK(cbs, action_ok_sideload_core);
+ break;
case FILE_TYPE_DOWNLOAD_URL:
BIND_ACTION_OK(cbs, action_ok_download_url);
break;
@@ -7606,6 +7796,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;
diff --git a/menu/cbs/menu_cbs_right.c b/menu/cbs/menu_cbs_right.c
index 8ec308cfa2..85d4a5c3fa 100644
--- a/menu/cbs/menu_cbs_right.c
+++ b/menu/cbs/menu_cbs_right.c
@@ -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;
}
diff --git a/menu/cbs/menu_cbs_sublabel.c b/menu/cbs/menu_cbs_sublabel.c
index b2b961d66e..015bef33a5 100644
--- a/menu/cbs/menu_cbs_sublabel.c
+++ b/menu/cbs/menu_cbs_sublabel.c
@@ -125,7 +125,6 @@ default_sublabel_macro(action_bind_sublabel_crt_switchres, MENU_ENUM
default_sublabel_macro(action_bind_sublabel_crt_switchres_super, MENU_ENUM_SUBLABEL_CRT_SWITCH_RESOLUTION_SUPER)
default_sublabel_macro(action_bind_sublabel_crt_switchres_x_axis_centering, MENU_ENUM_SUBLABEL_CRT_SWITCH_X_AXIS_CENTERING)
default_sublabel_macro(action_bind_sublabel_crt_switchres_use_custom_refresh_rate, MENU_ENUM_SUBLABEL_CRT_SWITCH_RESOLUTION_USE_CUSTOM_REFRESH_RATE)
-default_sublabel_macro(action_bind_sublabel_automatically_add_content_to_playlist, MENU_ENUM_SUBLABEL_AUTOMATICALLY_ADD_CONTENT_TO_PLAYLIST)
default_sublabel_macro(action_bind_sublabel_driver_settings_list, MENU_ENUM_SUBLABEL_DRIVER_SETTINGS)
default_sublabel_macro(action_bind_sublabel_retro_achievements_settings_list, MENU_ENUM_SUBLABEL_RETRO_ACHIEVEMENTS_SETTINGS)
default_sublabel_macro(action_bind_sublabel_saving_settings_list, MENU_ENUM_SUBLABEL_SAVING_SETTINGS)
@@ -148,6 +147,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 +377,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 +502,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 +1802,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 +2183,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;
@@ -2761,9 +2770,6 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
case MENU_ENUM_LABEL_CORE_SETTINGS:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_core_settings_list);
break;
- case MENU_ENUM_LABEL_AUTOMATICALLY_ADD_CONTENT_TO_PLAYLIST:
- BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_automatically_add_content_to_playlist);
- break;
case MENU_ENUM_LABEL_DRIVER_SETTINGS:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_driver_settings_list);
break;
@@ -2788,6 +2794,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 +2833,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;
diff --git a/menu/cbs/menu_cbs_title.c b/menu/cbs/menu_cbs_title.c
index 8de989abcf..076cd8df18 100644
--- a/menu/cbs/menu_cbs_title.c
+++ b/menu/cbs/menu_cbs_title.c
@@ -317,7 +317,6 @@ default_title_macro(action_get_download_core_content_list, MENU_ENUM_LABEL_
default_title_macro(action_get_user_accounts_list, MENU_ENUM_LABEL_VALUE_ACCOUNTS_LIST)
default_title_macro(action_get_core_information_list, MENU_ENUM_LABEL_VALUE_CORE_INFORMATION)
default_title_macro(action_get_core_list, MENU_ENUM_LABEL_VALUE_CORE_LIST)
-default_title_macro(action_get_sideload_core_list, MENU_ENUM_LABEL_VALUE_SIDELOAD_CORE_LIST)
default_title_macro(action_get_online_updater_list, MENU_ENUM_LABEL_VALUE_ONLINE_UPDATER)
default_title_macro(action_get_netplay_list, MENU_ENUM_LABEL_VALUE_NETPLAY)
default_title_macro(action_get_online_thumbnails_updater_list, MENU_ENUM_LABEL_VALUE_THUMBNAILS_UPDATER_LIST)
@@ -423,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)
@@ -542,6 +542,16 @@ default_title_generic_macro(action_get_title_list_rdb_entry_bbfc_rating,MENU_ENU
default_title_generic_macro(action_get_title_list_rdb_entry_max_users,MENU_ENUM_LABEL_VALUE_DATABASE_CURSOR_LIST_ENTRY_MAX_USERS)
default_title_generic_macro(action_get_title_list_rdb_entry_database_info,MENU_ENUM_LABEL_VALUE_DATABASE_CURSOR_LIST_ENTRY_DATABASE_INFO)
+static int action_get_sideload_core_list(const char *path, const char *label,
+ unsigned menu_type, char *s, size_t len)
+{
+ strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SIDELOAD_CORE_LIST), len);
+ strlcat(s, " ", len);
+ if (!string_is_empty(path))
+ strlcat(s, path, len);
+ return 0;
+}
+
static int action_get_title_default(const char *path, const char *label,
unsigned menu_type, char *s, size_t len)
{
@@ -708,6 +718,7 @@ static int menu_cbs_init_bind_title_compare_label(menu_file_list_cbs_t *cbs,
{MENU_ENUM_LABEL_DEFERRED_INPUT_HAPTIC_FEEDBACK_SETTINGS_LIST, action_get_input_haptic_feedback_settings_list},
{MENU_ENUM_LABEL_DEFERRED_VIDEO_WINDOWED_MODE_SETTINGS_LIST, action_get_video_windowed_mode_settings_list},
{MENU_ENUM_LABEL_DEFERRED_VIDEO_FULLSCREEN_MODE_SETTINGS_LIST, action_get_video_fullscreen_mode_settings_list},
+ {MENU_ENUM_LABEL_SIDELOAD_CORE_LIST, action_get_sideload_core_list},
};
if (cbs->setting)
@@ -894,9 +905,6 @@ static int menu_cbs_init_bind_title_compare_label(menu_file_list_cbs_t *cbs,
case MENU_ENUM_LABEL_CORE_LIST:
BIND_ACTION_GET_TITLE(cbs, action_get_core_list);
break;
- case MENU_ENUM_LABEL_SIDELOAD_CORE_LIST:
- BIND_ACTION_GET_TITLE(cbs, action_get_sideload_core_list);
- break;
case MENU_ENUM_LABEL_LOAD_CONTENT_SPECIAL:
BIND_ACTION_GET_TITLE(cbs, action_get_load_content_special);
break;
@@ -1257,9 +1265,6 @@ static int menu_cbs_init_bind_title_compare_label(menu_file_list_cbs_t *cbs,
case MENU_LABEL_CORE_LIST:
BIND_ACTION_GET_TITLE(cbs, action_get_core_list);
break;
- case MENU_LABEL_SIDELOAD_CORE_LIST:
- BIND_ACTION_GET_TITLE(cbs, action_get_core_list);
- break;
case MENU_ENUM_LABEL_LOAD_CONTENT_SPECIAL:
BIND_ACTION_GET_TITLE(cbs, action_get_load_content_special);
break;
@@ -1434,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;
@@ -1473,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},
diff --git a/menu/drivers/materialui.c b/menu/drivers/materialui.c
index 5577605570..c4e4f2a434 100644
--- a/menu/drivers/materialui.c
+++ b/menu/drivers/materialui.c
@@ -7393,6 +7393,12 @@ static void materialui_list_insert(
node->icon_texture_index = MUI_TEXTURE_FOLDER;
node->has_icon = true;
break;
+ case MENU_ROOM_LAN:
+ case MENU_ROOM_RELAY:
+ case MENU_ROOM:
+ node->icon_texture_index = MUI_TEXTURE_SETTINGS;
+ node->has_icon = true;
+ break;
default:
if (
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_INFORMATION_LIST)) ||
@@ -7505,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;
@@ -7538,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;
@@ -7549,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;
@@ -7610,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;
@@ -7694,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)) ||
@@ -7708,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
@@ -7741,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)) ||
@@ -7759,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;
diff --git a/menu/drivers/menu_generic.c b/menu/drivers/menu_generic.c
index 19753ab608..20976955ed 100644
--- a/menu/drivers/menu_generic.c
+++ b/menu/drivers/menu_generic.c
@@ -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;
}
diff --git a/menu/drivers/ozone/ozone_texture.c b/menu/drivers/ozone/ozone_texture.c
index 3d289d707d..7bb6d281cf 100644
--- a/menu/drivers/ozone/ozone_texture.c
+++ b/menu/drivers/ozone/ozone_texture.c
@@ -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];
diff --git a/menu/drivers/rgui.c b/menu/drivers/rgui.c
index 78ae897936..8c226cf5b6 100644
--- a/menu/drivers/rgui.c
+++ b/menu/drivers/rgui.c
@@ -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)
diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c
index 92526f5d48..15da4b7e7e 100644
--- a/menu/drivers/xmb.c
+++ b/menu/drivers/xmb.c
@@ -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];
diff --git a/menu/menu_cbs.h b/menu/menu_cbs.h
index 0836cfe99b..6844771299 100644
--- a/menu/menu_cbs.h
+++ b/menu/menu_cbs.h
@@ -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,
diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c
index 5ac74f5745..8a233614e0 100644
--- a/menu/menu_displaylist.c
+++ b/menu/menu_displaylist.c
@@ -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);
@@ -2027,7 +2026,7 @@ static int menu_displaylist_parse_load_content_settings(
}
if ((!rarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL))
- && system->disk_control_cb.get_num_images)
+ && disk_control_enabled(&system->disk_control))
if (menu_entries_append_enum(list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_DISK_OPTIONS),
msg_hash_to_str(MENU_ENUM_LABEL_DISK_OPTIONS),
@@ -2673,10 +2672,7 @@ static unsigned menu_displaylist_parse_cores(
else
{
file_type = FILE_TYPE_CORE;
- if (string_is_equal(info->label, msg_hash_to_str(MENU_ENUM_LABEL_SIDELOAD_CORE_LIST)))
- enum_idx = MENU_ENUM_LABEL_FILE_BROWSER_SIDELOAD_CORE;
- else
- enum_idx = MENU_ENUM_LABEL_FILE_BROWSER_CORE;
+ enum_idx = MENU_ENUM_LABEL_FILE_BROWSER_CORE;
}
items_found++;
@@ -2873,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,
@@ -2920,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),
@@ -2977,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++;
@@ -3238,6 +3239,74 @@ 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();
+ bool disk_ejected = false;
+
+ /* Sanity Check */
+ if (!sys_info)
+ return count;
+
+ if (!disk_control_enabled(&sys_info->disk_control))
+ return count;
+
+ /* Check whether disk is currently ejected */
+ disk_ejected = disk_control_get_eject_state(&sys_info->disk_control);
+
+ /* 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 core does not support appending images,
+ * can stop here */
+ if (!disk_control_append_enabled(&sys_info->disk_control))
+ 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,
@@ -4037,7 +4106,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)
{
@@ -5274,6 +5342,86 @@ 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)
+ {
+ if (disk_control_enabled(&sys_info->disk_control))
+ {
+ unsigned num_images =
+ disk_control_get_num_images(&sys_info->disk_control);
+ unsigned current_image =
+ disk_control_get_image_index(&sys_info->disk_control);
+ unsigned num_digits = 0;
+ unsigned i;
+
+ /* If core supports labels, index value string
+ * should be padded to maximum width (otherwise
+ * labels will be misaligned/ugly) */
+ if (disk_control_image_label_enabled(&sys_info->disk_control))
+ {
+ unsigned digit_counter = num_images;
+ do
+ {
+ num_digits++;
+ digit_counter = digit_counter / 10;
+ }
+ while (digit_counter > 0);
+ }
+
+ /* Loop through disk images */
+ for (i = 0; i < num_images; i++)
+ {
+ char current_image_str[PATH_MAX_LENGTH];
+ char image_label[PATH_MAX_LENGTH];
+
+ current_image_str[0] = '\0';
+ image_label[0] = '\0';
+
+ /* Get image label, if supported by core */
+ disk_control_get_image_label(
+ &sys_info->disk_control,
+ i, image_label, sizeof(image_label));
+
+ /* Get string representation of disk index
+ * > Note that displayed index starts at '1',
+ * not '0' */
+ if (!string_is_empty(image_label))
+ {
+ /* Note: 2-space gap is intentional
+ * (for clarity) */
+ int n = snprintf(
+ current_image_str, sizeof(current_image_str),
+ "%0*u: %s", num_digits, i + 1, image_label);
+
+ /* Suppress GCC warnings... */
+ if ((n < 0) || (n >= PATH_MAX_LENGTH))
+ n = 0;
+ }
+ else
+ snprintf(
+ current_image_str, sizeof(current_image_str),
+ "%0*u", num_digits, 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:
{
@@ -5718,6 +5866,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},
@@ -5762,24 +5911,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:
{
@@ -6125,7 +6257,6 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
{MENU_ENUM_LABEL_NAVIGATION_BROWSER_FILTER_SUPPORTED_EXTENSIONS_ENABLE, PARSE_ONLY_BOOL},
{MENU_ENUM_LABEL_USE_BUILTIN_PLAYER, PARSE_ONLY_BOOL},
{MENU_ENUM_LABEL_FILTER_BY_CURRENT_CORE, PARSE_ONLY_BOOL},
- {MENU_ENUM_LABEL_AUTOMATICALLY_ADD_CONTENT_TO_PLAYLIST, PARSE_ONLY_BOOL},
};
for (i = 0; i < ARRAY_SIZE(build_list); i++)
@@ -9101,6 +9232,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:
@@ -9159,6 +9291,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,
@@ -9676,7 +9809,6 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
case DISPLAYLIST_FILE_BROWSER_SELECT_DIR:
case DISPLAYLIST_FILE_BROWSER_SELECT_FILE:
case DISPLAYLIST_FILE_BROWSER_SELECT_CORE:
- case DISPLAYLIST_FILE_BROWSER_SELECT_SIDELOAD_CORE:
case DISPLAYLIST_FILE_BROWSER_SELECT_COLLECTION:
case DISPLAYLIST_GENERIC:
info->need_navigation_clear = true;
@@ -9906,6 +10038,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
case DISPLAYLIST_AUDIO_FILTERS:
case DISPLAYLIST_CHEAT_FILES:
case DISPLAYLIST_MANUAL_CONTENT_SCAN_DAT_FILES:
+ case DISPLAYLIST_FILE_BROWSER_SELECT_SIDELOAD_CORE:
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
filebrowser_clear_type();
if (!string_is_empty(info->exts))
@@ -9956,6 +10089,18 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
info->type_default = FILE_TYPE_MANUAL_SCAN_DAT;
info->exts = strdup("dat|xml");
break;
+ case DISPLAYLIST_FILE_BROWSER_SELECT_SIDELOAD_CORE:
+ {
+ char ext_name[PATH_MAX_LENGTH];
+ ext_name[0] = '\0';
+
+ info->type_default = FILE_TYPE_SIDELOAD_CORE;
+
+ if (frontend_driver_get_core_extension(
+ ext_name, sizeof(ext_name)))
+ info->exts = strdup(ext_name);
+ }
+ break;
default:
break;
}
diff --git a/menu/menu_displaylist.h b/menu/menu_displaylist.h
index 302574f8a2..f009552225 100644
--- a/menu/menu_displaylist.h
+++ b/menu/menu_displaylist.h
@@ -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,
diff --git a/menu/menu_driver.h b/menu/menu_driver.h
index dc14ff43ac..0aac3add12 100644
--- a/menu/menu_driver.h
+++ b/menu/menu_driver.h
@@ -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,
diff --git a/menu/menu_networking.c b/menu/menu_networking.c
index 7df2fe7ea9..14c60d8199 100644
--- a/menu/menu_networking.c
+++ b/menu/menu_networking.c
@@ -241,7 +241,7 @@ finish:
strlcpy(transf->path, parent_dir, sizeof(transf->path));
net_http_urlencode_full(parent_dir_encoded, parent_dir, PATH_MAX_LENGTH * sizeof(char));
- task_push_http_transfer(parent_dir_encoded, true,
+ task_push_http_transfer_file(parent_dir_encoded, true,
"index_dirs", cb_net_generic_subdir, transf);
free(parent_dir);
diff --git a/menu/menu_setting.c b/menu/menu_setting.c
index 1e2f8989be..c07e3b5bc9 100644
--- a/menu/menu_setting.c
+++ b/menu/menu_setting.c
@@ -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,
@@ -13995,23 +14013,6 @@ static bool setting_append_list(
START_SUB_GROUP(list, list_info, "State", &group_info, &subgroup_info, parent_group);
-#ifdef HAVE_LIBRETRODB
- CONFIG_BOOL(
- list, list_info,
- &settings->bools.automatically_add_content_to_playlist,
- MENU_ENUM_LABEL_AUTOMATICALLY_ADD_CONTENT_TO_PLAYLIST,
- MENU_ENUM_LABEL_VALUE_AUTOMATICALLY_ADD_CONTENT_TO_PLAYLIST,
- DEFAULT_AUTOMATICALLY_ADD_CONTENT_TO_PLAYLIST,
- MENU_ENUM_LABEL_VALUE_OFF,
- MENU_ENUM_LABEL_VALUE_ON,
- &group_info,
- &subgroup_info,
- parent_group,
- general_write_handler,
- general_read_handler,
- SD_FLAG_NONE);
-#endif
-
CONFIG_BOOL(
list, list_info,
&settings->bools.multimedia_builtin_mediaplayer_enable,
@@ -15126,7 +15127,7 @@ static bool setting_append_list(
general_write_handler,
general_read_handler);
(*list)[list_info->index - 1].action_ok = &setting_action_ok_uint;
- menu_settings_list_current_add_range(list, list_info, 0.0f, (float)COLLECTION_SIZE, 1.0f, true, false);
+ menu_settings_list_current_add_range(list, list_info, 1.0f, (float)COLLECTION_SIZE, 1.0f, true, false);
END_SUB_GROUP(list, list_info, parent_group);
diff --git a/menu/menu_thumbnail_path.c b/menu/menu_thumbnail_path.c
index a6c137f04b..346a777999 100644
--- a/menu/menu_thumbnail_path.c
+++ b/menu/menu_thumbnail_path.c
@@ -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;
diff --git a/menu/widgets/menu_filebrowser.c b/menu/widgets/menu_filebrowser.c
index ce662144d1..6b56db1e2e 100644
--- a/menu/widgets/menu_filebrowser.c
+++ b/menu/widgets/menu_filebrowser.c
@@ -109,7 +109,7 @@ void filebrowser_parse(menu_displaylist_info_t *info, unsigned type_data)
(filter_ext && info) ? subsystem->roms[content_get_subsystem_rom_id()].valid_extensions : NULL,
true, settings->bools.show_hidden_files, true, false);
}
- else if (info && (info->type_default == FILE_TYPE_MANUAL_SCAN_DAT))
+ else if (info && ((info->type_default == FILE_TYPE_MANUAL_SCAN_DAT) || (info->type_default == FILE_TYPE_SIDELOAD_CORE)))
str_list = dir_list_new(path,
info->exts, true, settings->bools.show_hidden_files, false, false);
else
diff --git a/menu/widgets/menu_widgets.c b/menu/widgets/menu_widgets.c
index 35906867d1..8ade8c4300 100644
--- a/menu/widgets/menu_widgets.c
+++ b/menu/widgets/menu_widgets.c
@@ -15,8 +15,20 @@
* If not, see .
*/
+#include
+
+#include
+#include
+#include
+#include
+#include
+
#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
-#include
-#include
-#include
-#include
-#include
-#include
-
#ifndef PI
#define PI 3.14159265359f
#endif
@@ -52,11 +56,15 @@ static float msg_queue_info[16] = COLOR_HEX_TO_FLOAT(0x12ACF8, 1.0f);
static float msg_queue_task_progress_1[16] = COLOR_HEX_TO_FLOAT(0x397869, 1.0f); /* Color of first progress bar in a task message */
static float msg_queue_task_progress_2[16] = COLOR_HEX_TO_FLOAT(0x317198, 1.0f); /* Color of second progress bar in a task message (for multiple tasks with same message) */
+#if 0
static float color_task_progress_bar[16] = COLOR_HEX_TO_FLOAT(0x22B14C, 1.0f);
+#endif
static unsigned text_color_info = 0xD8EEFFFF;
+#if 0
static unsigned text_color_success = 0x22B14CFF;
static unsigned text_color_error = 0xC23B22FF;
+#endif
static unsigned text_color_faint = 0x878787FF;
static float volume_bar_background[16] = COLOR_HEX_TO_FLOAT(0x1A1A1A, 1.0f);
@@ -332,10 +340,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 +865,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 +943,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 +983,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 +1010,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 +1026,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 +1054,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 +1142,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 +1156,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 +1179,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 +1349,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 +1487,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 +1504,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 +1568,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 +1581,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 +1605,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 +1687,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 +1723,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 +1732,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 +1778,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 +1872,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 +1931,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 +1985,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 +2000,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 +2122,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 +2399,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 +2459,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 +2476,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 +2496,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 +2513,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);
diff --git a/menu/widgets/menu_widgets.h b/menu/widgets/menu_widgets.h
index 453efa100f..287bd21cdc 100644
--- a/menu/widgets/menu_widgets.h
+++ b/menu/widgets/menu_widgets.h
@@ -16,11 +16,10 @@
#ifndef _MENU_WIDGETS_H
#define _MENU_WIDGETS_H
+#include
#include
#include
-#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);
diff --git a/midi/drivers/null_midi.c b/midi/drivers/null_midi.c
deleted file mode 100644
index ca1dc3b129..0000000000
--- a/midi/drivers/null_midi.c
+++ /dev/null
@@ -1,99 +0,0 @@
-/* RetroArch - A frontend for libretro.
- * Copyright (C) 2018 The RetroArch team
- *
- * RetroArch is free software: you can redistribute it and/or modify it under the terms
- * of the GNU General Public License as published by the Free Software Found-
- * ation, either version 3 of the License, or (at your option) any later version.
- *
- * RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
- * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along with RetroArch.
- * If not, see .
- */
-
-#include
-
-#include
-#include
-#include
-
-#include "../midi_driver.h"
-
-static bool null_midi_get_avail_inputs(struct string_list *inputs)
-{
- union string_list_elem_attr attr = {0};
-
- return string_list_append(inputs, "Null", attr);
-}
-
-static bool null_midi_get_avail_outputs(struct string_list *outputs)
-{
- union string_list_elem_attr attr = {0};
-
- return string_list_append(outputs, "Null", attr);
-}
-
-static void *null_midi_init(const char *input, const char *output)
-{
- (void)input;
- (void)output;
-
- return (void*)-1;
-}
-
-static void null_midi_free(void *p)
-{
- (void)p;
-}
-
-static bool null_midi_set_input(void *p, const char *input)
-{
- (void)p;
-
- return input == NULL || string_is_equal(input, "Null");
-}
-
-static bool null_midi_set_output(void *p, const char *output)
-{
- (void)p;
-
- return output == NULL || string_is_equal(output, "Null");
-}
-
-static bool null_midi_read(void *p, midi_event_t *event)
-{
- (void)p;
- (void)event;
-
- return false;
-}
-
-static bool null_midi_write(void *p, const midi_event_t *event)
-{
- (void)p;
- (void)event;
-
- return true;
-}
-
-static bool null_midi_flush(void *p)
-{
- (void)p;
-
- return true;
-}
-
-midi_driver_t midi_null = {
- "null",
- null_midi_get_avail_inputs,
- null_midi_get_avail_outputs,
- null_midi_init,
- null_midi_free,
- null_midi_set_input,
- null_midi_set_output,
- null_midi_read,
- null_midi_write,
- null_midi_flush
-};
diff --git a/msg_hash.h b/msg_hash.h
index 8bc7acd822..4f0be461a4 100644
--- a/msg_hash.h
+++ b/msg_hash.h
@@ -154,6 +154,8 @@ enum msg_file_type
FILE_TYPE_MANUAL_SCAN_DIRECTORY,
FILE_TYPE_MANUAL_SCAN_DAT,
+ FILE_TYPE_SIDELOAD_CORE,
+
FILE_TYPE_LAST
};
@@ -167,6 +169,7 @@ enum msg_hash_enums
MSG_UNKNOWN = 0,
MSG_SETTING_DISK_IN_TRAY,
MSG_FAILED_TO_SET_DISK,
+ MSG_FAILED_TO_SET_INITIAL_DISK,
MSG_NETPLAY_FAILED,
MSG_UNKNOWN_NETPLAY_COMMAND_RECEIVED,
MSG_CONNECTING_TO_NETPLAY_HOST,
@@ -410,6 +413,7 @@ enum msg_hash_enums
MSG_FAILED_TO_REMOVE_TEMPORARY_FILE,
MSG_STARTING_MOVIE_PLAYBACK,
MSG_APPENDED_DISK,
+ MSG_FAILED_TO_APPEND_DISK,
MSG_SKIPPING_SRAM_LOAD,
MSG_CONFIG_DIRECTORY_NOT_SET,
MSG_SAVED_STATE_TO_SLOT,
@@ -436,6 +440,8 @@ enum msg_hash_enums
MSG_VIRTUAL_DISK_TRAY,
MSG_REMOVED_DISK_FROM_TRAY,
MSG_FAILED_TO_REMOVE_DISK_FROM_TRAY,
+ MSG_VIRTUAL_DISK_TRAY_EJECT,
+ MSG_VIRTUAL_DISK_TRAY_CLOSE,
MSG_GOT_INVALID_DISK_INDEX,
MSG_INDEX_FILE,
MSG_DOWNLOADING,
@@ -1109,7 +1115,6 @@ enum msg_hash_enums
MENU_ENUM_LABEL_FILE_BROWSER_SHADER,
MENU_ENUM_LABEL_FILE_BROWSER_REMAP,
MENU_ENUM_LABEL_FILE_BROWSER_CORE,
- MENU_ENUM_LABEL_FILE_BROWSER_SIDELOAD_CORE,
MENU_ENUM_LABEL_FILE_BROWSER_OVERLAY,
#ifdef HAVE_VIDEO_LAYOUT
MENU_ENUM_LABEL_FILE_BROWSER_VIDEO_LAYOUT,
@@ -1176,6 +1181,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),
@@ -1260,6 +1266,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,
@@ -1419,7 +1426,6 @@ enum msg_hash_enums
MENU_LABEL(INFORMATION),
MENU_LABEL(INFORMATION_LIST),
MENU_LABEL(USE_BUILTIN_PLAYER),
- MENU_LABEL(AUTOMATICALLY_ADD_CONTENT_TO_PLAYLIST),
MENU_LABEL(NETPLAY_SETTINGS),
MENU_LABEL(CONTENT_SETTINGS),
MENU_LABEL(LOAD_CONTENT_LIST),
@@ -1448,6 +1454,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),
@@ -1908,6 +1915,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),
@@ -2021,6 +2030,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),
diff --git a/pkg/android/phoenix-legacy/AndroidManifest.xml b/pkg/android/phoenix-legacy/AndroidManifest.xml
index 251592464a..47cd8467c5 100644
--- a/pkg/android/phoenix-legacy/AndroidManifest.xml
+++ b/pkg/android/phoenix-legacy/AndroidManifest.xml
@@ -1,8 +1,8 @@
@@ -15,7 +15,6 @@
-
diff --git a/pkg/android/phoenix/build.gradle b/pkg/android/phoenix/build.gradle
index 8d31d62954..ca3db1b582 100644
--- a/pkg/android/phoenix/build.gradle
+++ b/pkg/android/phoenix/build.gradle
@@ -56,12 +56,6 @@ android {
abiFilters 'armeabi-v7a', 'x86'
}
}
- gold {
- applicationIdSuffix '.gold'
- resValue "string", "app_name", "RetroArch Gold"
-
- dimension "variant"
- }
}
sourceSets {
diff --git a/pkg/apple/OSX/Info.plist b/pkg/apple/OSX/Info.plist
index 9584f88a77..f65ac9efdc 100644
--- a/pkg/apple/OSX/Info.plist
+++ b/pkg/apple/OSX/Info.plist
@@ -30,17 +30,17 @@
CFBundlePackageType
APPL
CFBundleShortVersionString
- 1.8.3
+ 1.8.4
CFBundleSignature
????
CFBundleVersion
- 1.8.3
+ 1.8.4
LSMinimumSystemVersion
${MACOSX_DEPLOYMENT_TARGET}
NSHighResolutionCapable
NSHumanReadableCopyright
- Copyright © 2019 RetroArch. All rights reserved.
+ Copyright © 2020 RetroArch. All rights reserved.
NSMainNibFile
MainMenu
NSPrincipalClass
diff --git a/pkg/apple/OSX/Info_Metal.plist b/pkg/apple/OSX/Info_Metal.plist
index 85ff481a28..8c0c5716c1 100644
--- a/pkg/apple/OSX/Info_Metal.plist
+++ b/pkg/apple/OSX/Info_Metal.plist
@@ -30,17 +30,17 @@
CFBundlePackageType
APPL
CFBundleShortVersionString
- 1.8.3
+ 1.8.4
CFBundleSignature
????
CFBundleVersion
- 1.8.3
+ 1.8.4
LSMinimumSystemVersion
${MACOSX_DEPLOYMENT_TARGET}
NSHighResolutionCapable
NSHumanReadableCopyright
- Copyright © 2019 RetroArch. All rights reserved.
+ Copyright © 2020 RetroArch. All rights reserved.
NSMainNibFile
MainMenu_Metal
NSPrincipalClass
diff --git a/pkg/apple/RetroArch.xcodeproj/project.pbxproj b/pkg/apple/RetroArch.xcodeproj/project.pbxproj
index 0f02efc5a2..d0e03ed21c 100644
--- a/pkg/apple/RetroArch.xcodeproj/project.pbxproj
+++ b/pkg/apple/RetroArch.xcodeproj/project.pbxproj
@@ -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",
diff --git a/pkg/apple/RetroArch_OSX107.xcodeproj/project.pbxproj b/pkg/apple/RetroArch_OSX107.xcodeproj/project.pbxproj
index 010450e483..e9cc1207c0 100644
--- a/pkg/apple/RetroArch_OSX107.xcodeproj/project.pbxproj
+++ b/pkg/apple/RetroArch_OSX107.xcodeproj/project.pbxproj
@@ -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",
diff --git a/pkg/apple/RetroArch_PPC.xcodeproj/project.pbxproj b/pkg/apple/RetroArch_PPC.xcodeproj/project.pbxproj
index cadd7950f1..f8d24bb17f 100644
--- a/pkg/apple/RetroArch_PPC.xcodeproj/project.pbxproj
+++ b/pkg/apple/RetroArch_PPC.xcodeproj/project.pbxproj
@@ -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",
diff --git a/pkg/apple/RetroArch_iOS11.xcodeproj/project.pbxproj b/pkg/apple/RetroArch_iOS11.xcodeproj/project.pbxproj
index 957bcdec67..d06df10e7b 100644
--- a/pkg/apple/RetroArch_iOS11.xcodeproj/project.pbxproj
+++ b/pkg/apple/RetroArch_iOS11.xcodeproj/project.pbxproj
@@ -614,7 +614,7 @@
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_RESOURCE_RULES_PATH = "$(SDKROOT)/ResourceRules.plist";
- CURRENT_PROJECT_VERSION = 1.8.1;
+ CURRENT_PROJECT_VERSION = 1.8.4;
DEVELOPMENT_TEAM = BJ7B9HU3GU;
ENABLE_BITCODE = NO;
GCC_PRECOMPILE_PREFIX_HEADER = NO;
@@ -631,7 +631,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_NO_PIE = YES;
LIBRARY_SEARCH_PATHS = "";
- MARKETING_VERSION = 1.8.1;
+ MARKETING_VERSION = 1.8.4;
ONLY_ACTIVE_ARCH = NO;
OTHER_CFLAGS = (
"-DDONT_WANT_ARM_OPTIMIZATIONS",
@@ -708,7 +708,7 @@
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_RESOURCE_RULES_PATH = "$(SDKROOT)/ResourceRules.plist";
- CURRENT_PROJECT_VERSION = 1.8.1;
+ CURRENT_PROJECT_VERSION = 1.8.4;
DEVELOPMENT_TEAM = BJ7B9HU3GU;
ENABLE_BITCODE = NO;
GCC_PRECOMPILE_PREFIX_HEADER = NO;
@@ -725,7 +725,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_NO_PIE = YES;
LIBRARY_SEARCH_PATHS = "";
- MARKETING_VERSION = 1.8.1;
+ MARKETING_VERSION = 1.8.4;
"OTHER_CFLAGS[arch=*]" = (
"-DNS_BLOCK_ASSERTIONS=1",
"-DNDEBUG",
@@ -826,7 +826,7 @@
CLANG_WARN_UNREACHABLE_CODE = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
- CURRENT_PROJECT_VERSION = 1.8.1;
+ CURRENT_PROJECT_VERSION = 1.8.4;
DEBUG_INFORMATION_FORMAT = dwarf;
DEVELOPMENT_TEAM = BJ7B9HU3GU;
ENABLE_STRICT_OBJC_MSGSEND = YES;
@@ -848,7 +848,7 @@
);
INFOPLIST_FILE = "$(SRCROOT)/tvOS/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
- MARKETING_VERSION = 1.8.1;
+ MARKETING_VERSION = 1.8.4;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
@@ -948,7 +948,7 @@
CLANG_WARN_UNREACHABLE_CODE = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
- CURRENT_PROJECT_VERSION = 1.8.1;
+ CURRENT_PROJECT_VERSION = 1.8.4;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = BJ7B9HU3GU;
ENABLE_NS_ASSERTIONS = NO;
@@ -970,7 +970,7 @@
);
INFOPLIST_FILE = "$(SRCROOT)/tvOS/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
- MARKETING_VERSION = 1.8.1;
+ MARKETING_VERSION = 1.8.4;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
OTHER_CFLAGS = (
diff --git a/pkg/apple/RetroArch_iOS9-Info.plist b/pkg/apple/RetroArch_iOS9-Info.plist
index e2761c5515..1f12f843fa 100644
--- a/pkg/apple/RetroArch_iOS9-Info.plist
+++ b/pkg/apple/RetroArch_iOS9-Info.plist
@@ -33,11 +33,11 @@
CFBundlePackageType
APPL
CFBundleShortVersionString
- 1.8.3
+ 1.8.4
CFBundleSignature
????
CFBundleVersion
- 1.8.3
+ 1.8.4
LSRequiresIPhoneOS
UIApplicationExitsOnSuspend
diff --git a/pkg/emscripten/libretro/embed.html b/pkg/emscripten/libretro/embed.html
index f37ceb365f..5c6f6b0bdf 100644
--- a/pkg/emscripten/libretro/embed.html
+++ b/pkg/emscripten/libretro/embed.html
@@ -50,11 +50,11 @@
- |