Commit Graph

2437 Commits

Author SHA1 Message Date
sonninnos 0e4cf00d1f
Add option for suggesting cores when a core is loaded (#17920) 2025-05-20 15:54:22 +03:00
Eric Warmenhoven b632a1373e cloud sync: don't always trust the server hash 2025-05-17 21:59:27 -04:00
sonninnos 97bc2da36c Fix menu core unload 2025-05-17 18:53:33 +03:00
pstef 66aa1424f0 Define WIN32_LEAN_AND_MEAN to avoid collision with winsock2 2025-04-12 10:45:08 +00:00
pstef 83e974077f Guarantee space for string characters after strlcpy
to silence a couple of stringop-overflow warnings (3DS).
2025-03-28 11:11:09 +00:00
pstef df6e3dbda8 Silence warnings about sign mismatch 2025-03-28 10:57:53 +00:00
pstef a4bfd84cc7 Silence warnings about sign mismatch 2025-03-25 16:55:39 +00:00
pstef b0109b5829 Reduce stack usage in task_database_cue.c
Move disc_data from stack to heap.
2025-03-23 13:28:28 +00:00
pstef 3fb7d190bf Silence warning about possible truncation
Also simplify this part; the point here is to start the copy later, but
otherwise the buffer size is the same, and it's still a string, so needs
no special handling.
2025-03-20 16:51:58 +00:00
LibretroAdmin e6887be45c
Merge pull request #17710 from warmenhoven/warmenhoven/pr/apple-strlcpy
apple: fix strlcpy where src and dst are the same
2025-03-19 18:04:41 -07:00
pstef 3dca8dbf66 Silence -Walloc-size-larger-than=byte-size
One of the GCC14's optimization heuristic triggered here, suggesting
that the special value of len (size_t) could potentially be lesser than
the file's size (int64_t) but greater than "maximum object size" (set by
byte-size, PTRDIFF_MAX by default).

Use the same type as the file size it's compared to, and adjust the
sentinel value to spell INT64_MAX.
2025-03-19 17:35:15 +00:00
Eric Warmenhoven 86fddd5326 apple: fix strlcpy where src and dst are the same 2025-03-17 15:34:45 -04:00
sonninnos ee8a641275 Core load+unload fixes 2025-03-13 15:09:38 +02:00
Eric Warmenhoven 3943f5b6b0 cloud sync: properly handle ignored directories 2025-03-09 18:24:02 -04:00
Joe Osborn 7a7c208c85
Only read first frame of inputs under new movie formats (#17634) 2025-02-27 20:15:14 -08:00
zoltanvb 9970d45367
Make autoconfig failure notifications optional. (#17636)
Introduce a new setting that controls autoconfiguration messages
when the config fails, either with fallback or without.
2025-02-27 20:15:06 -08:00
Joe Osborn 56014a27d6
Enable pthreads on Emscripten (#17586)
* workerized RA

* Workerized (non-async) web player, using OPFS

This patch eliminates the need for asyncify and uses modern filesystem
APIs instead of the deprecated, unmaintained BrowserFS.

This is a WIP patch because it won't fully work until these two
Emscripten PRs land and are released:

https://github.com/emscripten-core/emscripten/pull/23518
https://github.com/emscripten-core/emscripten/pull/23021

The former fixes an offscreen canvas context recreation bug, and the
latter adds an equivalent to BrowserFS's XHR filesystem (but without
the hazardous running-XHR-on-the-main-thread problem).

The biggest issue is that local storage of users who were using the
old version of the webplayer will be gone when they switch to the new
webplayer.  I don't have a good story for converting the old BrowserFS
IDBFS contents into the new OPFS filesystem (the move is worth doing
because OPFS supports seeking and reading only bits of a file, and
because BrowserFS is dead).

I've kept around the old libretro webplayer under
pkg/emscripten/libretro-classic, and with these make flags you can
build a non-workerized RA that uses asyncify to sleep as before:

make -f Makefile.emscripten libretro=$CORE HAVE_WORKER=0 HAVE_WASMFS=0 PTHREAD=0 HAVE_AL=1

I also moved the default directory for core content on emscripten to
not be a subdirectory of the local filesystem mount, because it's
confusing to have a subdirectory that's lazily fetched and not
mirrored to the local storage.  I think it won't impact existing users
of the classic web player because they already have a retroarch.cfg in
place.

* Get fetchfs working without manifest support

* makefile fixes

* fix scaling, remove zip dependency

* Support asset/cheats/etc downloaders for emscripten

- Add http transfer support for emscripten
  - At the task_http level, not the net_http level --- so no netplay
    or webdav.
- Change default paths to be more like other platforms
- Gives us smaller bundles and a faster boot time
- Had to work around a task queue bug on Emscripten
  - I made the smallest possible change to do it, but it may be better
    to fix in rthread.c

* Load an emscripten file_packager package on first run

If no ozone assets are present, load a libretro_minimal package
created using Emscripten's built-in file packager.

* updated readme, removed indexer from wasmfs libretro-web

* Put back zip dependency, load asset bundle into opfs on first run

* fix upload path

* Remove unused function

* easy testing setup for two multithreaded conditions

1. make PROXY_TO_PTHREAD=1 (slower)
2. make PROXY_TO_PTHREAD=0 (bad audio, because doesn't sleep in
openal.c)

* Remove condition on sleep in openal

also make input_driver check existence of drv->axis, drv->button
before calling them.

* Fix resizing under EGL

* Don't force config file path on emscripten

* Add time.h include to netplay, default HAVE_NETPLAYDISCOVERY to 0

* Remove nearly all proxied joypad calls under emscripten

* Fix file uploads under firefox

* Fix safari API uses, but Safari still hangs in OPFS filesystem mount

I think this can be fixed by moving the backend creation off the main
thread.

* Move filesystem init into emscripten C entry point

* Setup filesystems off of main thread

* re-set default player to async

Also improve Safari compatibility under proxy-to-pthread condition

* Safari upload file fixes

* Remove some excess prints

* Fix typo
2025-02-20 00:59:25 +01:00
LibretroAdmin d2d0e7a17d Style nits 2025-02-12 10:35:04 +01:00
LibretroAdmin f6006ae6ca Style nits 2025-02-12 10:17:35 +01:00
LibretroAdmin 366612fb82 Revert "Fix some string appending"
This reverts commit 65b9ea4e76.
2025-02-11 23:48:12 +01:00
LibretroAdmin 65b9ea4e76 Fix some string appending 2025-02-11 23:08:55 +01:00
LibretroAdmin 0f5a990141 Cleanups 2025-02-11 10:28:16 +01:00
LibretroAdmin 6559f4499c Cleanups - less settings_t pointer passing 2025-02-11 09:38:54 +01:00
LibretroAdmin a9a9075f5f (Qt) Cleanups 2025-02-10 23:06:32 +01:00
LibretroAdmin 56d3042efd Change db_crc size back 2025-02-10 17:14:13 +01:00
LibretroAdmin 7a7c4df2a1 Settings cleanups 2025-02-10 17:12:02 +01:00
LibretroAdmin d766a5b71e Cleanups 2025-02-10 16:31:30 +01:00
LibretroAdmin f71181d1c1 * Style nits
* task_database - db_crc allocated variable does not need to be of size PATH_MAX_LENGTH size
2025-02-09 17:49:44 +01:00
LibretroAdmin 91aa8034b1 Style nits/conventions 2025-02-09 16:43:51 +01:00
Eric Warmenhoven 5471a9ebfe
ios: jump back to selected item after closing content (#17534) 2025-02-08 20:32:41 +01:00
Eric Warmenhoven 4b5f782fe4
iOS: Fix crash during scanning (#17489) 2025-01-30 19:57:19 +01:00
LibretroAdmin fce755127c Cleanups/style nits 2025-01-17 20:06:47 +01:00
LibretroAdmin b211adaaca Function argument name standardization 2025-01-17 19:55:32 +01:00
LibretroAdmin dda78a4fc8 Use find_last_slash where possible 2025-01-17 13:26:17 +01:00
LibretroAdmin e2c8e98be0 Buildfixes and warning fixes 2025-01-17 12:03:30 +01:00
LibretroAdmin 31b7812720 Function argument name standardization 2025-01-17 04:16:12 +01:00
LibretroAdmin e982905eb4 content_get_subsystem_friendly_name - change function signature return
to size_t
2025-01-17 00:55:30 +01:00
LibretroAdmin 0b329018ee Less string buffers and less string copies 2025-01-16 23:59:22 +01:00
LibretroAdmin a5c9d9520f * Use fill_pathname_basedir where possible
* Move static variable to only function where it's used
* Change signature of file_path.c function
2025-01-15 22:17:59 +01:00
LibretroAdmin 9da7af46c3 len variable/argument name standardization 2025-01-15 16:04:25 +01:00
LibretroAdmin 047e04ed3e Standardize local len variable naming conventions 2025-01-15 15:00:12 +01:00
zoltanvb 31534438bc
Enable also alternative device names (#17412)
Enable input_device_device_display_name to also have alt_ variants.
Tests updated.
2025-01-14 16:19:05 +01:00
LibretroAdmin 47d888364d Standardize len variables - argument should always be named 'len',
while local len variables should have '_' prefix
2025-01-13 21:53:49 +01:00
LibretroAdmin bd413de842 Log messages are too small to hold entire path 2025-01-13 16:01:16 +01:00
Eric Warmenhoven 95dd1d8449
cloud sync: fix windows path issues (#17375) 2025-01-10 12:21:24 +01:00
LibretroAdmin e40f405b97 Play it on the safe side - go back to some of the code
from before
2025-01-07 02:47:37 +01:00
Eric Warmenhoven 53d9452439
Change config_get_path/array return back to bool (#17333) 2025-01-02 14:35:33 +01:00
LibretroAdmin 33ec89306e Fix savestate thumbnails - '.png' needs to be appended to the total
filepath, so fill_pathname can't be used since it would overwrite
the existing extension
2024-12-30 23:39:36 +01:00
LibretroAdmin 6be18bfee9 Standardize naming of local len variables 2024-12-30 14:27:24 +01:00
LibretroAdmin 1e656261b0 Local len variables need to have '_' prefix 2024-12-30 14:03:58 +01:00
LibretroAdmin 707f19640a (task_content_disc.c) Use fill_pathname 2024-12-30 10:29:06 +01:00
LibretroAdmin b4cf279b80 Fix gdi_find_track prototype 2024-12-30 10:13:05 +01:00
LibretroAdmin 56c63b8c19 Small cleanups - conventionalize char *s, size_t parameter usage 2024-12-30 09:44:40 +01:00
LibretroAdmin 3e6486db2b Small cleanups (Task_database_cue.c) 2024-12-29 00:25:22 +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
LibretroAdmin 18c85b5ccd Cleanups -
* Less string copies
* Some general cleanups
* Add extra param to runloop_message_queue_push so we can pass size_t
of the message
* Consistent conventions for local variable usage for certain things
2024-12-27 15:13:45 +01:00
LibretroAdmin ed58e4a8d8 Conventionalize len variables:
* In function arguments, use 'size_t len'
* Inside the function, use '_len'
* If you need a seciondary len variable inside the function, use '__len'
2024-12-27 05:51:33 +01:00
libretroadmin 5749a2179d Use members from path_data directly and bypass functions
in gfx_thumbnail_path
2024-12-26 02:48:05 +01:00
libretroadmin 700b13654c Some string cleanups 2024-12-25 19:18:45 +01:00
libretroadmin 44238e909f Consistent viewport naming conventions 2024-12-24 22:50:51 +01:00
libretroadmin 8074a833aa Cleanups/less string copies and indirection 2024-12-24 21:07:31 +01:00
libretroadmin de8f979cb7 less string copies 2024-12-24 05:10:09 +01:00
libretroadmin 99c7e08445 Don't use string_trim_whitespace 2024-12-23 00:51:01 +01:00
libretroadmin 5ddb9b990c Disable fetching Named_Logos for now - not only is it too much overhead
and bandwidth for our server but none of thse Named_Logos have been added to
any repos for now. We will also need to have settings for specifying how much
stuff we fetch at the same time (Named_Logos, Named_Snaps, Named_Titles, Named_Boxarts).
Trying to fetch all this stuff at the same time is prob a mistake
2024-12-21 17:59:59 +01:00
LibretroAdmin 739f2ff55c
Reduce calls to path_remove_extension - use fill_pathname instead (#17270)
* Reduce calls to path_remove_extension - use fill_pathname instead

* More fill_pathname usage
2024-12-20 21:40:58 -08:00
Zach Morris b16f04de0a
Add Named_Logos (#17216)
* Draft:  Add Named_Logos

* Allow selecting Content Logo as a thumbnail display

* Increase pl_thumbnail_download index

to 4 to match the 4 available thumb types

---------

Co-authored-by: Rob Loach <robloach@gmail.com>
2024-12-20 18:52:27 -08:00
libretroadmin 17fc55c762 fill_pathname_parent_dir_name - small cleanups 2024-12-19 21:05:43 +01:00
Eric Warmenhoven bee0d2226f
cleanup: minor tidying of unused code in task_http (#17251) 2024-12-11 22:54:26 -08:00
Eric Warmenhoven 7b29062e96
cloud sync: small bug fixes around handling deleted files (#17236) 2024-12-07 00:59:05 -08:00
Alex Kiraly 0b05b1e3f4
Fix CloudSync on Windows, enable by default (#16475)
* Make paths portable for CloudSync when building manifest

* Enable CloudSync on Windows builds

* Fix "fetech server file" - Forgot to commit this, oops!

* Fix definition conflict with gzguts.h

* "Enable Cloud Sync for Windows UWP builds"

---------

Co-authored-by: WindowsDEV <WindowsDEV@WindowsDEV-VM.lan>
2024-11-25 09:47:27 -08:00
Eric Warmenhoven b6f798655a
cloud sync: fix file resurrection (#17204) 2024-11-25 03:18:59 -08:00
libretroadmin 82e4504968 Revert "(pt. 2) static variables are initialized to '0' automatically as per C rules"
This reverts commit 47410df7a3.
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
Eric Warmenhoven a26f6f6b45
webdav: fixes for reauth and parallelism (#17132) 2024-10-29 12:03:46 -07:00
sonninnos c847b02206
Integer overscale GPU screenshot crash fixes (#17118) 2024-10-26 06:45:45 -07:00
Joe Osborn fbf2c70e0d
replay format extended to support external tools (#17042)
- replays now start each frame with the number of key events (8 bit
unsigned int, then key events) and the number of input events (16 bit
unsigned int, then the input events)
- this makes it possible to parse replay files without any core
loaded, and makes replays more portable if cores change their polling
strategies
- external tools can now parse replay files
- old (vsn 0) replays will still play back, but new (vsn 1) replays
will not play on old RA
- replay files grow faster now, with each input poll now taking 8
bytes instead of 2
2024-10-04 12:47:34 -07:00
Viačasłaŭ 3019b926c2
Fix typos (#17068) 2024-10-01 17:36:33 -07:00
Eric Warmenhoven 1211b2d56a
Fix steam build (#17007) 2024-09-16 13:15:19 -07:00
zoltanvb 05844c649f
Autoconfig extension with alternative name/vid/pid (#16990)
If there are several variants of a controller, but their button
layout is exactly the same, allow alternative identifiers, e.g.:
input_device_alt1
input_vendor_id_alt3
input_product_id_alt9
2024-09-12 11:50:46 -07:00
zoltanvb 8c2d2f5d74
Make individual thumbnail downloads obey filename match setting. (#16826) 2024-09-10 17:36:25 -07:00
Eric Warmenhoven e38b9ff734
Fix scanning .chd files (#16986) 2024-09-10 15:47:37 -07:00
libretroadmin 5a539a31bd Transfer structs/enums over to task_screenshot.c 2024-09-10 23:17:19 +02:00
libretroadmin 29f011acef * Inline find_last_slash
* explore_load_icons - fill_pathname_slash is equivalent to usage
of strlen here, no need to call strlen
2024-09-10 16:02:06 +02:00
libretroadmin f2ad4071bc Buildfix for Android 2024-09-10 03:00:37 +02:00
libretroadmin f4ed638347 Rewrite libretro-common task_queue, use flags 2024-09-10 02:42:07 +02:00
libretroadmin 36bcbefc96 Cleanup some char variables - title variables will always be 128
in size
2024-09-10 00:15:23 +02:00
libretroadmin 13cf0fc79c Add more TODO/FIXME notes 2024-09-09 20:19:29 +02:00
libretroadmin 7f87a46744 More downsizing of variables 2024-09-09 16:18:32 +02:00
libretroadmin 73e5d955c3 Downgrade some more variables to NAME_MAX_LENGTH 2024-09-09 16:01:29 +02:00
libretroadmin e675ea7e29 Variable cleanups - add TODO/FIXME notes for spurious variable sizes 2024-09-09 15:22:08 +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
libretroadmin 9efb498bde (config_file) Use flags 2024-09-08 18:12:12 +02:00
zoltanvb 8562c16b4c
Fine-tune device reservation. (#16979)
- add reserved device check against device display name as well
- selected device name matching in menu with or without vid:pid
- cosmetical change in test input file
2024-09-08 03:10:21 -07:00
libretroadmin 99a763c4e8 Global - turn bools into flag 2024-09-05 10:05:57 +02:00
kwyxz fab86199a8
fixed warning + allow cli arguments on Haiku (#16887) 2024-08-17 09:58:49 -05:00
Eric Warmenhoven 079ef42a40
cloud sync: fix bug from #16871 (#16879)
https://github.com/libretro/RetroArch/pull/16871/files#r1715823706
2024-08-15 15:27:09 -07:00
kwyxz 4016b2524b
Allow building RetroArch with menu disabled (#16881)
* allow building with --disable-menu --disable-cheevos --disable-qt --disable-slang

* allow building with cheevos while disabling menus and qt
2024-08-15 15:26:59 -07:00
Eric Warmenhoven 12def933dc
cloud sync: add options to sync thumbnails and system files, default off (#16869) 2024-08-11 13:12:35 -07:00
Eric Warmenhoven 9c5a95a126
cloud sync: speed up sync a bit by uploading/downloading in parallel (#16871) 2024-08-11 13:12:27 -07:00
libretroadmin 857d1e4ddb Buildfix 2024-07-20 19:46:34 +02:00