4925 Commits

Author SHA1 Message Date
Eric Warmenhoven
ef4512dd02
macOS: ensure bundled assets get extracted properly (#17444) 2025-01-20 21:38:29 +01:00
Apteryks
52320dfaa8
* platform: Honor the LIBRETRO_CHEATS_DIRECTORY environment variable. (#17440)
* frontend/drivers/platform_unix.c
(libretro_cheats_directory): New variable.
(frontend_unix_get_env): Set DEFAULT_DIR_CHEATS to the value of
the LIBRETRO_CHEATS_DIRECTORY environment variable, if available.
* frontend/drivers/platform_win32.c: Likewise.
* configuration.c (config_load_file)
<libretro_cheats_directory>: New variable. Use the values of
the LIBRETRO_CHEATS_DIRECTORY environment variables instead of their
corresponding configured values, when set.
* docs/retroarch.6: Document it.
* retroarch.c (retroarch_print_help): Extend help text.
2025-01-20 15:08:45 +01:00
LibretroAdmin
4020326f58 Style nits 2025-01-20 04:37:27 +01:00
Apteryks
274cd419fa
Honor the LIBRETRO_DATABASE_DIRECTORY environment variable. (#17431)
* Partially revert a change made in 69ceb95ddc.

The change caused the 'libretro_directory' config option to always
revert to the default value, which was not intended behavior.

Reported-by: Michael Cook

* platform: Honor the LIBRETRO_DATABASE_DIRECTORY environment variable.

This is a follow-up to commit 69ceb95ddc.

* frontend/drivers/platform_unix.c
(libretro_database_directory): New variable.
(frontend_unix_get_env): Set DEFAULT_DIR_DATABASE to the value of
the LIBRETRO_DATABASE_DIRECTORY environment variable, if available.
* frontend/drivers/platform_win32.c: Likewise.
* configuration.c (config_load_file)
<libretro_database_directory>: New variable. Use the values of
the LIBRETRO_DATABASE_DIRECTORY environment variables instead of their
corresponding configured values, when set.
* docs/retroarch.6: Document.
* retroarch.c (retroarch_print_help): List supported environment
variables, and cross-reference the man page.
2025-01-19 15:25:28 +01:00
Apteryks
69ceb95ddc
Add libretro assets directory search path, and have environment variables override configured values (#17054)
* platform_win32: Fix sizeof for DEFAULT_DIR_PLAYLIST.

* frontend/drivers/platform_win32.c (frontend_win32_env_get): Check
the size of correct destination array.

* frontend: Honor the LIBRETRO_ASSETS_DIRECTORY environment variable.

This builds on 763fcd8267 ("unix, win32: Allow set the default
libretro_directory via environment variable") to also allow specifying
the assets directory via an environment variable.

* frontend/drivers/platform_unix.c (frontend_unix_get_env)
<libretro_assets_directory> New variable. Use it to set
DEFAULT_DIR_ASSETS, when available.
* frontend/drivers/platform_win32.c (frontend_win32_env_get): Likewise.

* platform: Honor the LIBRETRO_DIRECTORY environment variable.

Until now, and unlike the defaut core directory, the default
core *info* directory would be hard-coded relative to the installation
directory. Honor the LIBRETRO_DIRECTORY environment variable the same
instead.

* frontend/drivers/platform_unix.c (frontend_unix_get_env): Set
DEFAULT_DIR_CORE_INFO default to the value of the LIBRETRO_DIRECTORY
environment variable, if available.
* frontend/drivers/platform_win32.c (frontend_win32_env_get): Likewise.

* platform: Honor the LIBRETRO_AUTOCONFIG_DIRECTORY environment variable.

* frontend/drivers/platform_unix.c
(libretro_autoconfig_directory): New variable.
(frontend_unix_get_env): Set DEFAULT_DIR_AUTOCONFIG to the value of
the LIBRETRO_AUTOCONFIG_DIRECTORY environment variable, if available.
* frontend/drivers/platform_win32.c: Likewise.

* platform: Honor the LIBRETRO_VIDEO_FILTER_DIRECTORY environment variable.

* frontend/drivers/platform_unix.c
(libretro_video_filter_directory): New variable.
(frontend_unix_get_env): Set DEFAULT_DIR_VIDEO_FILTER to the value of
the LIBRETRO_VIDEO_FILTER_DIRECTORY environment variable, if available.
* frontend/drivers/platform_win32.c: Likewise.

* platform: Honor the LIBRETRO_VIDEO_SHADER_DIRECTORY environment variable.

* frontend/drivers/platform_unix.c
(libretro_video_shader_directory): New variable.
(frontend_unix_get_env): Set DEFAULT_DIR_SHADER to the value of
the LIBRETRO_VIDEO_SHADER_DIRECTORY environment variable, if available.
* frontend/drivers/platform_win32.c: Likewise.

* platform: Honor the LIBRETRO_SYSTEM_DIRECTORY environment variable.

* frontend/drivers/platform_unix.c
(libretro_system_directory): New variable.
(frontend_unix_get_env): Set DEFAULT_DIR_SYSTEM to the value of
the LIBRETRO_SYSTEM_DIRECTORY environment variable, if available.
* frontend/drivers/platform_win32.c: Likewise.

* configuration: Have environment variables override configuration.

Because the configuration file is systematically written when
RetroArch terminates, persisting any previous default/configured
value, setting the LIBRETRO_DIRECTORY, LIBRETRO_ASSETS_DIRECTORY, etc.
environment variables would not have an effect unless the
retroarch.cfg configuration file was cleared.

This seems to go against the common expectation that environment
variables are set by users to *override* the default behavior or
configuration of an application.

* configuration.c (config_load_file) <libretro_directory>
<libretro_assets_directory, libretro_autoconfig_directory>
<libretro_system_directory, libretro_video_filter_directory>
<libretro_video_shader_directory>: New variables. Use the values of
the LIBRETRO_DIRECTORY, LIBRETRO_ASSETS_DIRECTORY,
LIBRETRO_AUTOCONFIG_DIRECTORY, LIBRETRO_SYSTEM_DIRECTORY,
LIBRETRO_VIDEO_FILTER_DIRECTORY and LIBRETRO_VIDEO_SHADER_DIRECTORY
environment variables instead of their corresponding configured
values, when set.
* docs/retroarch.6: Document the environment variables honored and
their behavior.
2025-01-17 20:04:23 +01:00
LibretroAdmin
b211adaaca Function argument name standardization 2025-01-17 19:55:32 +01:00
Eric Warmenhoven
2471082ced
macos: fix some sandbox handling for app store (#17424)
* minor safety check

* macos: fix some sandbox handling for app store
2025-01-17 19:54:54 +01:00
LibretroAdmin
839b7654db More standardization of local len variables 2025-01-07 03:20:39 +01:00
LibretroAdmin
9d15900979 Small cleanups: * Prevent some unneccessary strlcpy calls and intermediary string copies * Name local length variables for strings '_len', parameter/argument 'len' 2024-12-28 22:22:07 +01:00
Viačasłaŭ
b124fe6e65
Fix build with GCC 14 (#17282) 2024-12-24 23:51:48 -08:00
libretroadmin
de8f979cb7 less string copies 2024-12-24 05:10:09 +01:00
libretroadmin
442b9bc3da Syntax style nits 2024-12-23 05:44:40 +01:00
Eric Warmenhoven
d642e38423
apple: extract bundled assets.zip based on bundle version (#17231) 2024-12-03 23:37:01 -08:00
libretroadmin
2809421d4e Revert "static variables are initialized to '0' automatically as per C rules"
This reverts commit 2a0984b6e47b5f714ce4a360afeaadafdb634c36.
2024-11-19 03:03:13 +01:00
libretroadmin
82e4504968 Revert "(pt. 2) static variables are initialized to '0' automatically as per C rules"
This reverts commit 47410df7a3d2480dd8fc7fb97cf00319ce5e9344.
2024-11-19 03:03:05 +01:00
libretroadmin
47410df7a3 (pt. 2) static variables are initialized to '0' automatically as per C rules 2024-11-18 15:59:46 +01:00
libretroadmin
2a0984b6e4 static variables are initialized to '0' automatically as per C rules 2024-11-18 15:33:34 +01:00
Eric Warmenhoven
7ae8597765
macOS: Create App Store build (#17074) 2024-10-04 12:46:51 -07:00
Viačasłaŭ
3019b926c2
Fix typos (#17068) 2024-10-01 17:36:33 -07:00
libretroadmin
73e5d955c3 Downgrade some more variables to NAME_MAX_LENGTH 2024-09-09 16:01:29 +02:00
libretroadmin
b8391e233f * PATH_MAX_LENGTH redefined from 4096 to 2048
* Massive reduction in heap space allocation, going from settings struct
264kb to 119Kb
* Use NAME_MAX_LENGTH for base paths/names, etc
* Use DIR_MAX_LENGTH for directory sizes
2024-09-09 05:47:32 +02:00
Francisco Javier Trujillo Mata
fe4a15b15c
Fix pthread support (#16970)
* enabled pthread usage

* unload modules before loading back
2024-09-06 15:45:15 -07:00
kwyxz
d4920e76a9
restore Haiku build (#16872) 2024-08-11 13:12:19 -07:00
mahoneyt944
ef17034121
Fix sigterm (#16854) 2024-08-08 05:38:24 -07:00
Viačasłaŭ
204d9ff1b2
(Win32) Fix path to executable (#16852) 2024-08-06 17:02:36 -07:00
libretroadmin
3fc7024df9 (cheevos) Cleanups - only use snprintf for formatting 2024-06-16 22:20:15 +02:00
libretroadmin
c4685e8c31 Cut down on strlcats 2024-06-16 19:15:07 +02:00
Thiago Seus
17fc346a36 Accessibility: change the is_screen_reader_enabled function name to lower case and match with the function name in Java code 2024-06-08 12:01:53 -05:00
Thiago Seus
216f55c7b2 Accessibility: Refactor Android is_narrator_running to align with the rest of RetroArch accessibility API 2024-06-08 12:01:53 -05:00
Thiago Seus
b4ed4b58d6 Accessibility: add first Android version 2024-06-02 14:49:19 -05:00
Eric Warmenhoven
a537af010e iOS/tvOS: better way of reporting available memory 2024-05-27 08:16:42 +02:00
Eric Warmenhoven
79b71179a5 macOS/iOS/tvOS: enable text-to-speech using AVSpeechSynthesizer.
Fixes #16532.
2024-05-22 13:29:48 -07:00
Tomáš Kelemen (vudiq)
8dafa0ce0d add cast to void** to fix build with gcc14 2024-05-22 04:48:56 -07:00
Eric Warmenhoven
ee8d8b1689 iOS/tvOS: Post Apple App Store fixes
- both: default VRR true
- tvOS: default overlay off
- tvOS: default directory fix
- both: default language fix
- tvOS: jit support fix
2024-05-17 14:38:35 -07:00
Eric Warmenhoven
0415ed2f95
apple: Use C function from CoreFoundation instead of ObjC from Foundation (#16476) 2024-04-29 18:30:56 -07:00
Eric Warmenhoven
e7f726bd19
iOS: import roms from iCloud (#16478) 2024-04-29 18:30:15 -07:00
Eric Warmenhoven
4d4a5c2f72
apple: try to use system preferred language (#16472) 2024-04-27 10:42:02 -07:00
Eric Warmenhoven
5fd4eb905c
iOS QOL improvements (#16444)
* iOS/tvOS: bundle cores as frameworks as opposed to dylibs

* iOS/tvOS: update plist to indicate controller support

* iOS/tvOS: living within the sandbox

* iOS/tvOS: import content through share sheet

* iOS/tvOS: default audio sync off due to crash on background

* iOS/tvOS: don't try altkit if there's no reason to

* iOS/tvOS: enumerate cores for appstore distribution
2024-04-18 03:01:39 -07:00
Barry Rowe
26a824caff
Revert of AI service changes (#16428) 2024-04-12 16:17:24 -07:00
Patrick Stankard
5452999b2a
Fix mouse grab behavior on Android (#16203)
* Add grab_mouse interface for Android
Makes mouse grabbing and 'Game Focus' work on Android with a real mouse
Properly handle relative mouse motion events on Android (SDK 28 and newer)

* Enable workflow_dispatch on CI Android

* Update android_mouse_calculate_deltas callsites

* Add RETRO_DEVICE_MOUSE to android_input_get_capabilities

* Use Handler to trigger UI events (toggle mouse, immersive mode) with 300ms delay

* Enable input_auto_mouse_grab by default for Android

* Handle RARCH_DEVICE_MOUSE_SCREEN in Android input driver

* Add android.hardware.type.pc to manifest

* Don't attempt to set pointer speed via scaling in android_mouse_calculate_deltas

* Keep x/y values within viewport resolution for screen mouse

* Use video_driver_get_size to get width/height

---------

Co-authored-by: Bernhard Schelling <14200249+schellingb@users.noreply.github.com>
2024-03-19 05:33:02 -07:00
zoltanvb
82ad6a0320
Logging config file writes in all places where it was not done so far. (#16311) 2024-03-03 08:09:46 -08:00
Eric Warmenhoven
50f4807f88
tvOS: when cache is deleted, force assets.zip re-extraction (#16264)
Also including a script to make building assets.zip easier, for people
building from source themselves
2024-02-19 11:12:09 -08:00
Eric Warmenhoven
8071b49f9d
macos: add portable.txt as flag for portable install (#16244) 2024-02-18 08:23:40 -08:00
Viačasłaŭ Chalikin
997c7453a8
Fix narrator modes (#16179)
* Fix narrator

* Refactor accessibility
2024-02-08 21:14:23 -08:00
Francisco Javier Trujillo Mata
3e0a4faa96 fixing usage of cwd 2024-01-25 17:19:08 +01:00
Eric Warmenhoven
286e31dc7d
Create directories after the config is read (#16093) 2024-01-11 13:16:27 -08:00
Eric Warmenhoven
272b66a5db
Make it easy to create a "portable" osx build (#16081)
Default to false, except steam builds where it's forced true; a
portable build has the behavior of putting all files next to the
application.
2024-01-07 07:58:06 -08:00
Eric Warmenhoven
ca6e60f41b
Don't needlessly (re-)create default directories on apple platforms (#16073) 2024-01-05 13:49:15 -08:00
Eric Warmenhoven
1aeac90d8c
Apple - don't call mkdir needlessly (#15954) 2023-11-26 19:34:56 -08:00
Viačasłaŭ Chalikin
9e2da4ace7
Fix linux narrator (#15904)
* Fix forking process for narrator

* Use compatible languages for eSpeak
2023-11-14 09:52:19 -08:00