summaryrefslogtreecommitdiff
path: root/games/retroarch/files
diff options
context:
space:
mode:
Diffstat (limited to 'games/retroarch/files')
-rw-r--r--games/retroarch/files/patch-gfx_common_wayland__common.c11
-rw-r--r--games/retroarch/files/patch-input_drivers_udev__input.c73
-rw-r--r--games/retroarch/files/patch-input_input__keymaps.c20
-rw-r--r--games/retroarch/files/patch-libretro-common_features_features__cpu.c20
4 files changed, 73 insertions, 51 deletions
diff --git a/games/retroarch/files/patch-gfx_common_wayland__common.c b/games/retroarch/files/patch-gfx_common_wayland__common.c
deleted file mode 100644
index 3aae61f3e6d3..000000000000
--- a/games/retroarch/files/patch-gfx_common_wayland__common.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- gfx/common/wayland_common.c.orig 2024-02-03 00:11:03 UTC
-+++ gfx/common/wayland_common.c
-@@ -440,7 +440,7 @@ static int create_shm_file(off_t size)
- static int create_shm_file(off_t size)
- {
- int fd, ret;
-- if ((fd = syscall(SYS_memfd_create, SPLASH_SHM_NAME,
-+ if ((fd = memfd_create(SPLASH_SHM_NAME,
- MFD_CLOEXEC | MFD_ALLOW_SEALING)) >= 0)
- {
- fcntl(fd, F_ADD_SEALS, F_SEAL_SHRINK);
diff --git a/games/retroarch/files/patch-input_drivers_udev__input.c b/games/retroarch/files/patch-input_drivers_udev__input.c
new file mode 100644
index 000000000000..2adc11c44d4f
--- /dev/null
+++ b/games/retroarch/files/patch-input_drivers_udev__input.c
@@ -0,0 +1,73 @@
+--- input/drivers/udev_input.c.orig 2025-05-01 00:17:50 UTC
++++ input/drivers/udev_input.c
+@@ -71,7 +71,9 @@
+
+ #include "../input_keymaps.h"
+
++#ifdef __linux__
+ #include "../common/linux_common.h"
++#endif
+
+ #include "../../configuration.h"
+ #include "../../retroarch.h"
+@@ -570,7 +572,9 @@ typedef struct udev_input
+ bool xkb_handling;
+ #endif
+
++#ifdef __linux__
+ linux_illuminance_sensor_t *illuminance_sensor;
++#endif
+ } udev_input_t;
+
+ #ifdef UDEV_XKB_HANDLING
+@@ -3952,7 +3956,9 @@ static void udev_input_free(void *data)
+
+ udev_input_kb_free(udev);
+
++#ifdef __linux__
+ linux_close_illuminance_sensor(udev->illuminance_sensor);
++#endif
+
+ free(udev);
+ }
+@@ -3968,13 +3974,16 @@ static bool udev_set_sensor_state(void *data, unsigned
+ {
+ case RETRO_SENSOR_ILLUMINANCE_DISABLE:
+ /* If already disabled, then do nothing */
++#ifdef __linux__
+ linux_close_illuminance_sensor(udev->illuminance_sensor); /* noop if NULL */
+ udev->illuminance_sensor = NULL;
++#endif
+ case RETRO_SENSOR_GYROSCOPE_DISABLE:
+ case RETRO_SENSOR_ACCELEROMETER_DISABLE:
+ /** Unimplemented sensor actions that probably shouldn't fail */
+ return true;
+
++#ifdef __linux__
+ case RETRO_SENSOR_ILLUMINANCE_ENABLE:
+ if (udev->illuminance_sensor)
+ /* If we already have a sensor, just set the rate */
+@@ -3983,6 +3992,7 @@ static bool udev_set_sensor_state(void *data, unsigned
+ udev->illuminance_sensor = linux_open_illuminance_sensor(rate);
+
+ return udev->illuminance_sensor != NULL;
++#endif
+ default:
+ break;
+ }
+@@ -3992,6 +4002,7 @@ static float udev_get_sensor_input(void *data, unsigne
+
+ static float udev_get_sensor_input(void *data, unsigned port, unsigned id)
+ {
++#ifdef __linux__
+ udev_input_t *udev = (udev_input_t*)data;
+
+ if (!udev)
+@@ -4005,6 +4016,7 @@ static float udev_get_sensor_input(void *data, unsigne
+ default:
+ break;
+ }
++#endif
+
+ return 0.0f;
+ }
diff --git a/games/retroarch/files/patch-input_input__keymaps.c b/games/retroarch/files/patch-input_input__keymaps.c
deleted file mode 100644
index 4dd10b4c46c1..000000000000
--- a/games/retroarch/files/patch-input_input__keymaps.c
+++ /dev/null
@@ -1,20 +0,0 @@
---- input/input_keymaps.c.orig 2023-11-06 19:58:13 UTC
-+++ input/input_keymaps.c
-@@ -54,7 +54,7 @@
- #include "SDL.h"
- #endif
-
--#if defined(__linux__) || defined(HAVE_WAYLAND)
-+#if defined(__linux__) || defined(HAVE_WAYLAND) || defined(__FreeBSD__) && !defined(__PS4__)
- #if defined(__linux__)
- #include <linux/input.h>
- #include <linux/kd.h>
-@@ -1130,7 +1130,7 @@ const struct rarch_key_map rarch_key_map_x11[] = {
- };
- #endif
-
--#if defined(__linux__) || defined(HAVE_WAYLAND)
-+#if defined(__linux__) || defined(HAVE_WAYLAND) || defined(__FreeBSD__) && !defined(__PS4__)
- /* Note: Only one input can be mapped to each
- * RETROK_* key. If several physical inputs
- * correspond to the same key, these inputs
diff --git a/games/retroarch/files/patch-libretro-common_features_features__cpu.c b/games/retroarch/files/patch-libretro-common_features_features__cpu.c
deleted file mode 100644
index 183304f479bc..000000000000
--- a/games/retroarch/files/patch-libretro-common_features_features__cpu.c
+++ /dev/null
@@ -1,20 +0,0 @@
---- libretro-common/features/features_cpu.c.orig 2024-02-03 00:11:03 UTC
-+++ libretro-common/features/features_cpu.c
-@@ -45,7 +45,7 @@
-
- #if defined(_XBOX360)
- #include <PPCIntrinsics.h>
--#elif !defined(__MACH__) && (defined(__POWERPC__) || defined(__powerpc__) || defined(__ppc__) || defined(__PPC64__) || defined(__powerpc64__))
-+#elif !defined(__MACH__) && !defined(__FreeBSD__) && (defined(__POWERPC__) || defined(__powerpc__) || defined(__ppc__) || defined(__PPC64__) || defined(__powerpc64__))
- #ifndef _PPU_INTRINSICS_H
- #include <ppu_intrinsics.h>
- #endif
-@@ -181,7 +181,7 @@ retro_perf_tick_t cpu_features_get_perf_counter(void)
- time_ticks = (1000000 * tv_sec + tv_usec);
- #elif defined(GEKKO)
- time_ticks = gettime();
--#elif !defined(__MACH__) && (defined(_XBOX360) || defined(__powerpc__) || defined(__ppc__) || defined(__POWERPC__) || defined(__PSL1GHT__) || defined(__PPC64__) || defined(__powerpc64__))
-+#elif !defined(__MACH__) && !defined(__FreeBSD__) && (defined(_XBOX360) || defined(__powerpc__) || defined(__ppc__) || defined(__POWERPC__) || defined(__PSL1GHT__) || defined(__PPC64__) || defined(__powerpc64__))
- time_ticks = __mftb();
- #elif (defined(_POSIX_MONOTONIC_CLOCK) && _POSIX_MONOTONIC_CLOCK > 0) || defined(__QNX__) || defined(ANDROID)
- struct timespec tv;