Commit Graph

1487 Commits

Author SHA1 Message Date
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
zoltanvb 701d22d935
PS2 usability fixes (#15861)
- Make sure logs are written before frontend deinit
- Add memory stats
- Add process_args to frontend to fix some cases when salamander cfg was not filled
- Add a missing include in case someone wants to compile for PS2 with HAVE_THREADS
2023-11-05 15:33:17 -08:00
Joe Osborn 862bebf687
(Emscripten) Modularize the JavaScript and clean up the web build (#15688)
* Increase emscripten stack size and decrease path size to fix emscripten builds broken since de45fc2

* use modularize flags for better-behaved javascript output

* makefile and loader changes

* use specialHTMLTargets to support modular access to canvas

* bind key events to canvas, not document

This way focus means focus and we can have multiple RA instances in
one page.

* Work around an emscripten bug in strict mode

* (Emscripten) Use console.error() for error messages

* increase asyncify stack size

* Fix `-lm` flag-related compile warnings in emscripten

---------

Co-authored-by: Rob Loach <robloach@gmail.com>
2023-11-02 13:25:50 -07:00
Cpod12 274d47f957
Xunkar's AI service rework updated (#15640)
* AI service rework

* File missing

* Fixed C89 build

* Fixed usage of inline for C89 build

* Fixed an overlay unloading bug

Made sure to unload the overlay on release and when the server returns empty values in automatic modes.

* Fixed forward decl (c89)

* Fixed OpenGL texture loading

Moved image display to the main thread for now

* Changed some formatting slightly

* Fixed struct variable order and put brackets on newlines

* Moved pointer, fixed retroarch.cfg, and replaced strlcat with strlcpy

* Fixed catenation issue

* Fixed a few other catenation issues

* Fixed one more concatenation  issue

* Fixed concatenation issue

* Fixed a few other concatenation issues

* Fixed one more concatenation  issue

* potential fix for parsing issue

---------

Co-authored-by: Xunkar <329857+xunkar@users.noreply.github.com>
2023-10-24 00:27:06 -07:00
GavinDarkglider 4387b0ab94
Lakka Switch Updates.... (#15754)
* Lakka: Switch: Decouple From LibNX builds.

* Lakka: Always show Power Management Settings menu

* Lakka: Switch: Add Nintendo Switch Options Menu, and First Option

* Lakka: Switch: Add CEC Toggle

* Lakka: Switch: Add Bluetooth ERTM Toggle

* Retroarch: unix platform:  Always display battery meter even when the device reports it as unknown
This is useful for most arm devices that have unknown battery status until charger state changes

* Retroarch: Lakka: Remove Gamemode stuff from build

Lakka will never include this, as it only runs base system, and retroarch.
2023-10-06 04:55:22 -07:00
libretroadmin bc91eb6ceb Cut down on some strlens for xdk 2023-09-03 00:04:25 +02:00
GABO1423 f654d1bf30
(UWP/Menu) Small Tweaks (#15653) 2023-08-28 20:53:35 -07:00
libretroadmin f53ada6489 Cleanups, style nits, try to reduce some more strlens, etc. 2023-08-17 18:20:45 +02:00
libretroadmin f51b49f213 More explicit typecasts to bools 2023-08-16 03:22:02 +02:00
libretroadmin aeff636a0f Minor cleanups to config_file.c 2023-07-17 09:45:52 +02:00
libretroadmin bd090dea71 Replace more strlcat calls 2023-07-16 18:07:49 +02:00
nfore 12fc237351 Add default keyboard overlay directory to platform_darwin 2023-07-09 22:51:31 +02:00
nfore 9ca5c5e623 Revive/rewrite Keyboard Overlay and OSK Toggle
Add keyboard overlay preset, keyboard submenu, and osk_toggle hotkey. Use overlay caching for osk_toggle.

For now, keyboard menu has only preset path, auto-scale toggle, and opacity.

Related fixes:
- input_keyboard_event: Don't check hotkey binds when device is RETRO_DEVICE_POINTER
- Add input_keymaps_translate_rk_to_ascii() for correct character input to input_keyboard_event
- input_overlay_poll: Delay clearing INPUT_OVERLAY_BLOCKED flag until there is no overlay input (Avoids stray input after osk_toggle)
- Send keyboard events for modifiers before other keys (for correct modifier+key input if hitboxes overlap)
2023-07-09 04:42:49 +02:00
Eric Warmenhoven 9d7ce37f9b Implement memory queries on iOS/tvOS 2023-07-01 19:25:57 +02:00
Eric Warmenhoven ce49bd6dcc Enable option to rumble iOS device instead of controller (#14734). 2023-07-01 19:24:40 +02:00
libretroadmin bdc398d79f - Safer code - use strlcpy where possible instead of manual character
assignments for strings longer than 2 chars
- Use strlcpy concatenation instead of strlcat
- Make sure that what remains of iteration of the '_len' variable
for manual char assignment
is done in a safer way so mistakes are less possible
2023-06-20 16:33:55 +02:00
libretroadmin 1cff8e26f4 (Android) Move DPI metric code to dispserv_android.c - and remove
duplicate code
2023-06-20 08:31:19 +02:00
libretroadmin e8242253a7 Reduce strlcat calls where possible 2023-06-19 06:00:10 +02:00
libretroadmin 631301b3f7 * Cut down on strlcat calls when possible and replace them with clever
usage of strlcpy (when position/offset of previous strlcpy/snprintf call
is known. strlcat implementation in libretro-common makes implicit strlen
call, using strlcpy avoids this
* Reduce a bunch of local char variables by use of said clever usage,
should save up on local stack size usage
2023-06-18 12:06:12 +02:00
libretroadmin 246cceeb27 Silence more signedness warnings 2023-06-14 19:51:31 +02:00
Grisly Glee 4202f8650d
Fix trivial signedness warnings (#15377)
* Fix trivial signedness warnings

* Followup on trivial signedness warnings
2023-06-14 04:43:11 +02:00
libretroadmin f66a8dc538 Cleanup unused variable warnings 2023-06-01 22:34:16 +02:00
libretroadmin 36cf7f00a8 Cleanups 2023-06-01 19:59:11 +02:00
libretroadmin c400fa761c (UI companion driver) Remove unused notify_content_loaded 2023-04-27 03:02:00 +02:00
warmenhoven 11a7cc9d23
Include audio and video filters in ios/tvos bundles (#15197) 2023-04-15 11:55:46 +02:00
warmenhoven 29842aabdc
Fix steam osx core path (#15158) 2023-04-06 06:06:10 +02:00
warmenhoven 54055558f1
Fix several warnings (#15153) 2023-04-04 15:06:34 +01:00
warmenhoven a60249ff87
Fix #15059 Compile in presence for discord (#15063)
Also relying on $TMPDIR is problematic because Discord uses
NSTemporaryDirectory() which may not be the same.
2023-03-06 19:57:08 +01:00
warmenhoven 8f70da6b0c
OSX: Make sure to use the file system path name, not the URL name (#15038) 2023-03-01 02:01:46 +01:00
warmenhoven bf5739b735
More changes for Steam on Mac (#15036)
* Additional Steam build cleanups

* Fix Mac directories for Steam
2023-02-28 21:28:59 +01:00
sonninnos 9d8aee53fa
(Win32) Fix restart if path has spaces (#15034) 2023-02-27 22:24:41 +01:00
libretroadmin 51d238875e Get rid of obsolete HAVE_VIDEO_LAYOUT - obsolete spec, was only
ever implemented for OpenGL2 driver, lots of code debt, best to
instead just keep improving the overlay system instead which is
already available for most video drivers
2023-02-23 21:03:41 +01:00
libretroadmin f07fd91a88 (Apple) Buildfix 2023-02-23 13:24:25 +01:00
libretroadmin 7ebab640d7 Cleanups/style nits 2023-02-23 13:15:14 +01:00
libretroadmin 3f3262fba3 (PS3) Cleanups - don't assume GLSL is the default shader for PSL1GHT 2023-02-23 10:43:33 +01:00
OsirizX c0ccb8cda3
(PSL1GHT) Code cleanup (#15006)
* (PSL1GHT) Use RSX_SHADER_STOCK_BLEND and RSX_SHADER_MENU defines

* (PSL1GHT) Cleanup compiler warnings

* (PSL1GHT) Make sure we compile with librt
2023-02-22 08:14:38 +01:00
libretroadmin 23b8f3d97d (UWP) Simplify UWP code - there was pre-Windows 2000 ifdefs in here 2023-02-20 13:00:06 +01:00
crystalct 58282ee98a
PSL1GHT build fix and folders nromalization (#14993) 2023-02-19 16:13:25 +01:00
libretroadmin e8152870f6 (PSP) Buildfix 2023-02-11 09:12:42 +01:00
libretroadmin 35860b4d47 Typo fix 2023-02-10 19:23:14 +01:00
libretroadmin 824c1dea8c Fix header include 2023-02-10 19:19:32 +01:00
Francisco Javier Trujillo Mata 3d9c60be7c
Avoid loading extra drivers (#14959) 2023-02-07 22:11:42 +01:00
Barry Rowe 78326188c4
Fix nvda switching to powershell on speak. (#14944) 2023-02-03 08:40:53 +01:00
libretroadmin 9fbd62d7b8 Reduce dependence on strcpy_literal (just a macro for strcpy) - prefer
going through safer strlcpy
2023-01-22 17:13:38 +01:00
libretroadmin 378e90e745 retroarch.h functions should be namespaced 'retroarch_' instead
of 'rarch_'
2023-01-22 16:58:22 +01:00
reallibretroadmin 3ae8e35d0e (iOS) Buildfix and cleanup some unused variables 2023-01-09 01:54:45 +01:00
libretroadmin daa9e352cc Remove asserts 2023-01-09 00:51:05 +01:00
Thiago Kenji Okada c5bfd52159
Add `CORE_INFO_DIR` to `./configure` (#14761)
* Add missing FILTERS_DIR definition to qb/config.libs.sh

* Add CORE_INFO_DIR configuration option
2022-12-23 14:40:48 +01:00
Thiago Kenji Okada 894c44c5ea
Add more flags to `./configure` (#14756)
* Allow disabling "Update Core Info" from Online Updater

* Add ASSETS_DIR as an alternative to DEFAULT_DIR_ASSETS

* Add FILTERS_DIR configuration option

* Fix other platform_unix.c platforms

* Conditionally use ASSETS_DIR/FILTERS_DIR
2022-12-23 01:28:57 +01:00
libretroadmin 8f1af4a2e6 (Frontend) Style nits/cleanups 2022-12-15 14:34:22 +01:00
Francisco Javier Trujillo Mata b207ddbe84
[PS2] Use `ps2_drivers` library for simplify frontend (#14724)
* Use ps2_drivers

* improvements in frontend driver

* Resetting IOP drivers before load elf
2022-12-12 05:52:57 +01:00
libretroadmin daa4c19d18 Style nits/minor cleanups 2022-12-05 14:24:49 +01:00
libretroadmin 6a098d37ac Use HAVE_DYLIB instead of HAVE_DYNAMIC when loading shared libraries 2022-11-21 05:37:35 +01:00
LibretroAdmin cf0951b5d5 (Android) Do device initialization only once in init function 2022-10-31 00:36:55 +01:00
LibretroAdmin 03a2f10117 Turn some variables static 2022-10-31 00:20:23 +01:00
LibretroAdmin a94c4c72c2 Use size_t as type for returned value of strlen instead of int 2022-10-29 19:40:48 +02:00
LibretroAdmin c1a3085939 Fix UNIX builds 2022-10-29 19:07:49 +02:00
LibretroAdmin edfc96feea Fix PSL1GHT build 2022-10-29 18:59:19 +02:00
LibretroAdmin 91d7f5970b Cleanups in platform_unix.c 2022-10-29 18:37:12 +02:00
AKuHAK 3a6a34b2dd
(Frontend) Fix default remaps folder for various cores: remap should be nested in config folder (#14563) 2022-10-29 16:34:08 +02:00
LibretroAdmin 92a2c0f71a (Dinput) Turn boolean variables into flags 2022-10-26 19:22:35 +02:00
LibretroAdmin 27dbf06dfb Create g_plat_win32_flags - reduce amount of global booleans 2022-10-26 17:51:15 +02:00
LibretroAdmin d30f16dc79 Remove cursor directory/cursor manager list - Views obsoleted
this
2022-10-25 15:21:47 +02:00
neil4 b98c53ddb7
Improve haptic feedback for input overlays (#14517)
Repurpose vibrate_on_keypress to enable device's standard keypress feedback on overlay key/button state changes

- Add keypress_vibrate function ptr to input_driver_t (only implemented on Android for now)
- (Android) Remove APP_CMD_VIBRATE_KEYPRESS
- (Android) Add doHapticFeedback, called directly to avoid latency
2022-10-16 09:58:09 +02:00
LibretroAdmin fcbd72dbf3
Use flags pt4 (#14497)
* * Use flags for rarch_state
* Get rid of ^M linebreaks in retroarch_types.h

* Buildfixes for consoles

* (audio driver) use flags instead of bools

* (video) Use flags instead of bools

* Rewrite input driver state bools into flags
2022-10-08 10:39:15 +02:00
gblues 7f8d358f17
WIIU: Add some missing default directories (#14498)
There's a bunch of directories that should have defaults, that don't,
which causes a few issues.

Defaults added:
- thumbnails
- overlays
- screenshots
- autoconfig
2022-10-08 07:03:42 +02:00
LibretroAdmin be044c09dd Disable Feral GameMode for Android - only available on Linux 2022-09-13 19:29:45 +02:00
MrHuu 422d2fcf12
(3DS) Fix CIA installation issues (#14399)
- Fixes CIA installation failing
- Add CIA installation progress stats
2022-09-11 02:57:31 +02:00
LibretroAdmin 8f1389c067 (GX) Fix potential datarace (#13795) 2022-08-29 18:31:14 +02:00
LibretroAdmin f1ff92c881 * menu_entries_append and menu_entries_append_enum are now combined into
one - if you set the last parameter to a valid 'rarch_setting_t' pointer
and enum_msg to MSG_UNKNOWN, you will get the previous menu_entries_append
behavior
* Renamed remaining function to menu_entries_append so that we have one
consistent way of adding menu entries instead of two
Reduces some code duplication significantly
2022-08-27 17:40:52 +02:00
LibretroAdmin c3a1c578b6 Prefer to use string_starts_with_size/string_ends_with_size (less strlen
calls)
2022-08-26 17:27:55 +02:00
LibretroAdmin 29caa95f7e (platform_unix.c) Use safer 'fill_pathname_join_special' for assembling
file path names instead of snprintf
(ctr_gfx.c) Use strlcpy instead of snprintf where possible
(ctr_gfx.c) Use snprintf instead of sprintf where possible
(ctr_gfx.c) Some general style nits
2022-08-26 10:43:42 +02:00
LibretroAdmin 88187e7ef2 * Start getting rid of strncpy
* steam.c - cleanups:
  * Use string_to_lower from libretro-common/stdstring.c instead of
    its own version
  * Some stylistic changes
  * Rewrite strncpy calls into strlcpy/strlcat/manual assignment
  * Make it C89 compliant
  * Some unused variables
2022-08-25 06:51:39 +02:00
LibretroAdmin da13fb0f48 Don't include errno.h in files that don't justify its use 2022-08-25 05:19:30 +02:00
LibretroAdmin 6126a86259 Try to avoid sprintf/strcat/strcpy calls as much as possible in
RetroArch codebase
2022-08-24 13:49:05 +02:00
LibretroAdmin 6f738d4fbd Gradually get rid of strcpy_literal
Reasons:
1 - Just a macro for strcpy
1.2 - doesn't have a return type unlike strlcpy, can't be used
for string concatenation
1.3 - unsafe compared to strlcpy

Do either manual string assignment per character or strlcpy, no
inbetween by resorting to strcpy
2022-08-23 15:04:47 +02:00
MrHuu 46bafd6e46
(3DS) Add bottom menu options (#14323) 2022-08-17 08:23:07 +02:00
LibretroAdmin a9157f975e
String cleanups (#14304)
(retroarch.c) retroarch_get_capabilities - get rid of strlcat
party in RARCH_CAPABILITIES_CPU, do simple manual assignment for
concatenation instead and NULL terminate at the end
(menu_displaylist.c) Do something about some of the unnecessarily huge
local strings of PATH_MAX_LENGTH size (can be as large as 8192)
(menu_displaylist.c) Replace some trivial strlcats / snprintfs
(D3D10/D3D11/D3D12) Strings don't need to be initialized -
strlcpy already null-terminates - get rid of some constants
2022-08-08 19:11:15 +02:00
LibretroAdmin 94ed25be56
Cleanups (#14296)
- (database_info.c) Optimizations for database_info_build_query_enum() -
 it would call strlcat at the very least 3 times, normally more than that.
 Every strlcat call is at least one or more strlens. Reduce it all down
 to manual string concatenation and one strlcat
- (database_info_build_query_enum) - always NULL terminates string so no need for NULL termination done by callee
* (menu_displaylist) use smaller strings for basename paths, remove one unnecessary string
in menu_displaylist.c function
- (disk_index_file.c) Avoid another trivial string concatenation by doing
it manually after fill_pathname_join_special
- (fill_pathname_join_delim) since fill_pathname_join_delim() now has a return value, use it for 
string concatenation
- (platform_unix) - Use BUFSIZ as size for a buffer in system_property_get
- some other trivial strlcat usage replacements
2022-08-06 18:04:40 +02:00
LibretroAdmin b2634ea588 * Create fill_pathname_join_special - and specify fill_pathname_join
as deprecated.
* Use fill_pathname_join_special in the vast majority of cases where
we can ensure out_path is a new empty string
* Get rid of some extension concatenation with strlcat where encountered
* Some general cleanups with NULL termination of strings that get immediately
passed to strlcpy/strlcpy-adjacent functions
2022-08-04 14:19:38 +02:00
LibretroAdmin 36edb15c5b path_parent_dir - don't do implicit strlen inside 2022-07-31 12:31:55 +02:00
Cthulhu-throwaway 40c974a19c
(3DS) Silence Warnings (#14252) 2022-07-30 06:52:27 +02:00
Cthulhu-throwaway 6b9a2b4bb0
(Netplay) Small launch compatibility patch adjustments (#14251) 2022-07-29 22:49:10 +02:00
Cthulhu-throwaway aca5169416
(Netplay/WiiU) Launch compatibility patch (#14249) 2022-07-29 20:25:26 +02:00
Cthulhu-throwaway 02905650cc
(Switch) Silence Warnings (#14237) 2022-07-28 23:55:18 +02:00
Cthulhu-throwaway adea9559a7
(Netplay/Switch) Launch compatibility patch (#14235) 2022-07-28 21:40:07 +02:00
Cthulhu-throwaway 56130ec587
(Netplay/PS3) Launch compatibility patch (#14232) 2022-07-28 17:24:44 +02:00
Cthulhu-throwaway d7a30f2a18
(Netplay/Wii) Launch compatibility patch (#14230) 2022-07-27 16:26:48 +02:00
Cthulhu-throwaway 566b4b4520
(Vita) Silence warning (#14218) 2022-07-25 10:43:48 +02:00
Cthulhu-throwaway 262b0601e2
(Netplay/3DS) Launch compatibility patch (#14203) 2022-07-25 07:08:06 +02:00
Cthulhu-throwaway 153f77d764
(Netplay/Vita) Launch compatibility patch (#14215) 2022-07-25 07:07:22 +02:00
libretroadmin 05622ebe85 Some trivial strlen usage simplifications where possible, removing
the need for strlen
2022-07-20 17:23:28 +02:00
libretroadmin a23231525d (Android) frontend_android_get_version_sdk - use strtol again - this
time assign the return value to the dereferenced pointer
2022-07-19 10:59:32 +02:00
LibretroAdmin 87240556ea
Should fix Android strtol regression (when converting from sscanf) (#14183) 2022-07-18 04:38:52 +02:00