1
0
mirror of https://github.com/libretro/RetroArch synced 2024-07-08 12:15:49 +00:00
Commit Graph

1045 Commits

Author SHA1 Message Date
sonninnos
f46550bd7c
Ignore system subdir replacement if subdir has subdirs (#14887) 2023-01-22 13:03:10 +01:00
sonninnos
c3fe980a1d
Add support for system subdirs per core/database (#14885) 2023-01-21 19:20:17 +01:00
sonninnos
3b129e6098
State slot hotkey adjustments (#14881) 2023-01-21 13:47:55 +01:00
sonninnos
f421194974
Pause + hotkey + runloop related changes (#14879) 2023-01-21 01:17:47 +01:00
Joe Osborn
17c7e8744e
Don't autoload states if a BSV file is being played back or recorded (#14877)
- Moved BSV initialization before autoload code
- Don't trigger autoload code if there is bsv movie state

Open question: What's the difference between entry state and autoload
state? Should BSV recording use the entry state even if playback does
not?

Co-authored-by: Joseph C. Osborn <jcoa2018@pomona.edu>
2023-01-21 00:15:14 +01:00
libretroadmin
16621f0a0c Remove unused variables 2023-01-20 18:33:53 +01:00
reallibretroadmin
1e88300395 Remove unused variables 2023-01-16 20:32:18 +01:00
sonninnos
127c676048
Cleanup runloop_environment logging + readability (#14855) 2023-01-16 01:49:25 +01:00
sonninnos
2f1a03523b
Hotkey blocking correction (#14831) 2023-01-13 04:56:14 +01:00
libretroadmin
f0c8008bda Split up runahead into its own file(s) - runahead.c/runahead.h -
by Dwedit's request
2023-01-11 10:19:56 +01:00
neil4
7213aada8d
Add Preemptive Frames to Latency Settings (#14832) 2023-01-10 07:22:14 +01:00
libretroadmin
e10361ed52 Header include cleanups for driver.h 2023-01-09 15:28:15 +01:00
libretroadmin
daa9e352cc Remove asserts 2023-01-09 00:51:05 +01:00
reallibretroadmin
a34598512e (Auto frame delay) silence some warnings that pop up in Xcode 2023-01-09 00:05:21 +01:00
Tatsuya79
f441821297 Start unpause restriction. 2023-01-07 20:08:40 +01:00
libretroadmin
5ac8cc0b6a * Rename retroarch_path_set_redirect to runloop_path_set_redirect
* move more retroarch path functions to runloop.c - because they
are related to the runloop state instead of retroarch state
2023-01-06 21:21:31 +01:00
libretroadmin
5debb7a622 Rewrite runloop_set_frame_limit 2023-01-06 20:59:15 +01:00
gugueU
b6aa95cf16 Update selected save slot when start with cli --entryslot 2023-01-03 19:34:58 +01:00
libretroadmin
27611288c0 Rename retroarch_get_current_savestate_path and retroarch_get_entry_state_path
to runloop_{function_name}
2022-12-29 02:13:31 +01:00
LibretroAdmin
f836328c56
Append Preset (#14737) (#14757)
WIP version of Append and Prepend preset, Includes UI for Standard Retroarch, but not the QT UI companion

Co-authored-by: HyperspaceMadness <remimcgill@hotmail.com>
2022-12-22 21:36:32 +01:00
sonninnos
05c3c0a552
Automatic Frame Delay improvements (#14754) 2022-12-22 18:58:26 +01:00
LibretroAdmin
f5133d8cc4
Revert "Add Xdelta support for softpatching (#14706)" (#14743)
This reverts commit aaad220836.
2022-12-19 03:29:46 +01:00
Jesse Talavera-Greenberg
aaad220836
Add Xdelta support for softpatching (#14706)
* Add xdelta in deps

* Include <assert.h> in xdelta3.h

- Otherwise the static_assert calls can fail

* Build xdelta3 in Makefile.common

* Add xdelta support to the softpatching infrastructure

- The patching itself isn't fully implemented yet

* Adjust how xdelta3.h checks the sizes of some types

- Now checks max values instead of relying on autotools

* First crack at xdelta softpatching support

- There may be undiscovered edge cases or bugs

* Add xdelta in deps

* Include <assert.h> in xdelta3.h

- Otherwise the static_assert calls can fail

* Build xdelta3 in Makefile.common

* Add xdelta support to the softpatching infrastructure

- The patching itself isn't fully implemented yet

* Adjust how xdelta3.h checks the sizes of some types

- Now checks max values instead of relying on autotools

* First crack at xdelta softpatching support

- There may be undiscovered edge cases or bugs

* Remove trailing commas from the enums I modified

- C89 doesn't allow them

* Remove stray whitespace

* Adjust SIZE macros in xdelta3.h

- Move them outside the XD3_USE_LARGEFILE64 block
- Add more SIZE declarations
- Make SIZEOF_UNSIGNED_LONG_LONG contingent on the presence of ULLONG_MAX

* Add some RARCH_DBG calls for xdelta patching

* Enable support for xdelta's secondary compressors

- Necessary for some patches

* Fix some format specifiers

* Remove unnecessary files from xdelta

* Include xdelta3.h with a relative path

* Add xdelta3 headers to HEADERS variable

* Gate Xdelta support behind HAVE_XDELTA

- HAVE_XDELTA is on by default
- HAVE_PATCH is still required for HAVE_XDELTA to be meaningful
- Support is mostly contingent on the availability of LZMA
- Anything modern should be okay
- Legacy platforms (e.g. DOS) may need to have Xdelta support disabled
- At least until some other solution can be found

* Disable HAVE_XDELTA on platforms where the build recently failed

- These come from looking at the failed builds on GitHub
- These are guesses, and may turn out to be wrong

* Fix a potential memory leak

- Whoops, looks like I need to call two cleanup functions
- xd3_close_stream exists separately from xd3_free_stream

* Split the --help printout for --xdelta into its own strlcat call

- GCC was complaining about #ifdefs within macro arguments being non-portable

* Fix some incorrect printf format specifiers

* Modify Xdelta to adhere to C89

- It's mostly using RetroArch's INLINE macro instead of the inline keyword
2022-12-19 01:10:04 +01:00
sonninnos
88c1e276a3
Restore framelimit on fastforward toggle (#14668) 2022-11-24 16:53:52 +01:00
libretroadmin
f062b74e26 Overlays/Input: Turn a bunch more functions static 2022-11-23 19:54:15 +01:00
libretroadmin
9bbe6992e2 (UI Companion) simplify boolean code by replacing it with flags 2022-11-23 06:14:56 +01:00
sonninnos
9bc7bebf51
More hotkey cleanups (#14657) 2022-11-22 14:45:30 +01:00
LibretroAdmin
b04853faf7
Runahead buildfixes #1 for Switch (#14655) 2022-11-21 20:16:10 +01:00
libretroadmin
8335e347f0 Simplify core_load_game 2022-11-21 19:41:57 +01:00
libretroadmin
065cdc87ac Final buildfixes for runahead 2022-11-21 19:38:15 +01:00
libretroadmin
6b71214ed7 Silence some signed/unsigned mismatch warnings 2022-11-21 19:34:43 +01:00
libretroadmin
0eed1c4853 Buildfixes for targets with no runahead support 2022-11-21 19:26:01 +01:00
libretroadmin
cc3169febe (runloop) Cleanups 2022-11-21 19:11:55 +01:00
libretroadmin
6815383113 * Create runloop_state_free (instead of duplicated code lines in
retroarch.c and runloop.c
* Turn a whole bunch of unctions in runloop.c static as a consequence
2022-11-21 17:45:39 +01:00
sonninnos
10a74657c3
Move SRAM init to content init (#14653) 2022-11-21 15:24:58 +01:00
libretroadmin
0b71407b62 Use flags for state_manager_rewind_state 2022-11-16 15:13:59 +01:00
sonninnos
3b921ffbfa
Fix shader toggle and add hotkey + sublabel (#14628) 2022-11-15 22:14:09 +01:00
libretroadmin
d5a268a2ac * Fix signed/unsigned mismatches
* Fix missing IPAddr on MSVC2017 UWP - use ULONG instead since this is
just a typedef
2022-11-15 00:24:26 +01:00
sonninnos
86669d21e2
Pausing cleanups and corrections (#14618) 2022-11-13 17:22:36 +01:00
neil4
2de52baf74
Overlays: Add eightway area types (#14565)
- New descriptors: 'dpad_area' and 'abxy_area'
- Each has a diagonal sensitivity setting, 100% being 8-way symmetry
- Buttons can be redefined in the cfg file

E.g. This would create a d-pad area, then redefine it to use analog directions:
overlay0_desc0 = "dpad_area,0.85,0.57,rect,0.166228,0.295516"
overlay0_desc0_up = "r_y_minus"
overlay0_desc0_down = "r_y_plus"
overlay0_desc0_left = "r_x_minus"
overlay0_desc0_right = "r_x_plus"
2022-10-30 06:31:27 +01:00
LibretroAdmin
c7eee86fd5 Turn core boolean variables into flags 2022-10-27 00:29:24 +02:00
LibretroAdmin
18ea6fa81e Turn more boolean variables into flags for runloop
- Get rid of RARCH_CTL_IS_INITED, use runloop_get_flags instead
2022-10-24 18:16:00 +02:00
sonninnos
50ace058ce
Config appendconfig + saving + logging (#14505)
* Config override + logging cleanups

* 'config_save_on_exit' cleanup
2022-10-12 11:37:36 +02:00
LibretroAdmin
cc3a339011 (Runloop) Use more flags 2022-10-10 19:54:54 +02:00
LibretroAdmin
2371e5cbd2 (Runloop) Turn more bools into flags 2022-10-10 18:53:55 +02:00
LibretroAdmin
d100e73780 Use more runloop flags 2022-10-10 08:59:27 +02:00
LibretroAdmin
076a1a398c (Runloop) Turn some boolean variables into flags 2022-10-10 04:37:17 +02:00
LibretroAdmin
2cddea21f8 * Cleanups
* Less pointer grabbing (dispwidget_get_ptr)
2022-10-09 22:53:39 +02:00
LibretroAdmin
479e3b23d9 Turn content_get_status into content_get_flags 2022-10-09 20:32:39 +02:00
LibretroAdmin
a1edae126c Fix Pending Quick Menu 2022-10-08 23:01:42 +02:00
LibretroAdmin
d506210fbe
(menu_driver.c) Use flags instead of bools (#14500)
* (menu_driver.c) Use flags instead of bools
2022-10-08 22:52:18 +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
LibretroAdmin
91119d038f
(gfx_display/gfx_animation) Use flags instead of bools (#14488)
* (gfx_display/gfx_animation) Use flags instead of bools
* (task_save) Use flags instead of bools
2022-10-07 00:10:32 +02:00
reallibretroadmin
0033224c25 Fix some implicit conversion signedness warnings 2022-10-02 03:22:34 +02:00
LibretroAdmin
3bd36941a6 (Menu) Allow the user to use volume up/down/mute hotkeys from within the menu 2022-09-04 21:01:18 +02:00
LibretroAdmin
bea2eb719b write_file_with_random_name - don't cast strlen return result to
different type
2022-09-03 03:38:14 +02:00
LibretroAdmin
60030e373e
Reduce snprintfs + assorted cleanups (#14369)
* Reduce snprintf and/or use them only for concatenating the
string formatting of numbers/values
* Reduce snprintfs
* Use snprintf for concatenation at parts
* * We don't need to NULL-terminate strings that get passed to strlcpy/strlcat
and friends
* Use snprintf for concatenation in certain instances
* Do away with some string intermediary copies where we can avoid it
* Fix warning unused variable
* * Reduce snprintf calls
* Rewrite snprintf calls into strlcpy where possible
* Use snprintf for concatenation when necessary
* Do away with some string intermediary copies in task_translation.c
* run_translation_service - make switch slightly smaller
2022-09-01 04:17:07 +02:00
LibretroAdmin
61e24132bf (task_save.c) Simplification in control flow
(snprintf) Try to reduce or simplify snprintf calls, only tend to
use it for processing integers/numbers and avoid it for regular
string concatenation (NOTE: we try to be a bit safer about it to
address earlier cited criticism, although we don't consider concatenating
3 or 4 characters at the end to be insecure)
(msg_hash_to_str) Try to avoid duplicate calls to the same localized
string when we can just cache the results once instead locally
2022-08-27 07:55:02 +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
Cthulhu-throwaway
2d1c238c1d
Special functions for core serialization (#14317) 2022-08-13 02:24:28 +02:00
Cthulhu-throwaway
976a49ad2b
Ensure #ifdef instead of #if for HAVE_NETWORKING (#14299) 2022-08-07 13:42:09 +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
e7f3432e48 Replace some trivial strlcat usage - use return value of preceding
strlcpy then simply append the extension to it at this location
2022-08-04 03:45:09 +02:00
LibretroAdmin
5b56ff145f Refine documentation 2022-08-01 15:46:08 +02:00
libretroadmin
34a18f64e8 Don't do NULL termination on string when we pass the string to
strlcpy and/or a file_path function that does strlcpy under the hood
2022-07-23 10:46:05 +02:00
libretroadmin
4b5c7856e6 Remove some more explicit NULL-termination when we're calling a
string function that calls strlcpy under the hood
2022-07-19 20:43:12 +02:00
LibretroAdmin
29774f5b7a
Small opts (#14186)
* (joypad_connection) Small optimizations -
* Turn functions static where possible
* Hose strlen call out of loop

* (input_driver.c) General cleanups:
* Some small code/style nits

task_screenshot.c:
* Move widget callback function for screenshots to task_screenshot.c

(file_path.c):
* Turn get_pathname_num_slashes into static function
* path_linked_list_free - always returns true, so get rid of return value
* path_linked_list_new - fix function signature
* path_get_archive_delim - do not NULL-terminate string, already done by strlcpy later on

General:
* Slight optimizations - use int/size_t for loop counter variable instead of unsigned
* Take advantage of fact that strlcpy already NULL-terminates, so don't do this explicitly
outside if we're just going to end up calling strlcpy/fill_pathname_join on it anyway
2022-07-19 10:01:33 +02:00
libretroadmin
f7194e167f use path_basename_nocompression where it is safe to do so 2022-07-12 19:14:12 +02:00
libretroadmin
293722ac38 Get rid of fill_pathname_join_concat_ext 2022-07-11 22:01:20 +02:00
libretroadmin
e91cf0e40d No longer use fill_pathname_noext - just basic strlcpy/strlcat string
concatenation
2022-07-11 18:48:02 +02:00
Cthulhu-throwaway
177691e6fa
(Core Info) Ensure current core info is initialized at runloop_event_init_core when netplay is enabled (#14162) 2022-07-09 16:25:27 +02:00
libretroadmin
aae8c65880 Prevent unnecessary variable self-assignments caused by tertiary
operators - also simplify focused variable assignment
2022-07-09 13:58:10 +02:00
Cthulhu-throwaway
ef022ffe90
(Netplay) Force a core update when starting netplay (#14157) 2022-07-08 18:20:01 +02:00
libretroadmin
fbd37f8926 Consistency in variable naming conventions - rename temp_path to tmp_path
for uniformity with rest of code
2022-07-05 19:06:38 +02:00
libretroadmin
126940a98b Silence unused variable warnings for Emscripten 2022-07-01 13:49:49 +02:00
barbudreadmon
e9d67f2bbe
savestates: implement an api call for context awareness (#14101) 2022-06-30 10:45:59 +02:00
sonninnos
3d619de114 Automatic Frame Delay improvements 2022-06-14 07:11:43 +03:00
jdgleaver
801b16885e Enable automatic configuration of 'VSync Swap Interval' 2022-05-12 14:22:46 +01:00
jdgleaver
37c56d0d09
Add option to disable automatic saving of input remap files (#13894) 2022-04-27 19:12:53 +02:00
Jamiras
56c9db9c4c
re-enforce hardcore limitations once achievements are loaded (#13862) 2022-04-19 09:41:49 +02:00
barbudreadmon
d14d218b76
allow proper descriptor declaration for analog triggers (#13845) 2022-04-13 15:11:30 +02:00
Mats
4a1a1e2fa7
(steam) Introduce Steam Rich Presence (#13798) 2022-04-02 08:07:40 +01:00
strotlog
91bf7b553a (mmap) Handle disconnect bits on both sides of len 2022-03-27 04:36:03 +01:00
jdgleaver
c6e83d23f5 RETRO_ENVIRONMENT_SHUTDOWN Fixes
- Ensure core is properly unloaded when RETRO_ENVIRONMENT_SHUTDOWN is called
- Ensure menu stack is properly flushed when RETRO_ENVIRONMENT_SHUTDOWN is called
2022-03-18 13:15:47 +01:00
jdgleaver
ea77410037 Add 'Manage Remap Files' submenu + automatically save input remaps when closing content 2022-03-16 18:59:49 +01:00
jdgleaver
1490ad18a2
Prevent log spam when using rewind hotkey with cores that don't support rewind if rewind functionality itself is disabled (#13741) 2022-03-14 18:17:43 +01:00
Nikos Chantziaras
b094c58081
Add hotkey for toggling sync to exact content framerate (#13725)
* Add hotkey for toggling sync to exact content framerate

* CHANGES.md: add sync to exact content framerate toggle hotkey
2022-03-10 17:21:08 +01:00
Vladimir Serbinenko
4a53c6771c
Several fixes and improvements do NGC and Wii (#13698)
* Support new elf2dol path in Makefile.griffin

* Fix NULL pointer dereference when no core info is available

* Fix double include of different versions of libogc

* Move ngc and wii to Makefile.common

Resulting binary is 60K *smaller*. This is surprising but probably due to
less inlining happening

* gx_gfx: Fix hang on gfx initialization

* Remove sthread_isself on NGC/Wii

It relies on pthread_equal that is not there for either legacy pthreads
or normal pthreads on those platforms

* Wii networking

* Missing includes in split

* Network fixes

* Fix logging of non-format string as a format

* Support for gx netlogger

* Network fix

* Network fixes

* Network info

* gx: Move config files to app directory

Otherwise it clashes between wiiU and vWii version with unpredictable
effects
2022-03-04 13:43:00 +01:00
Tony
977a7d3eb6
Volume hotkey logic+response improvement (#13667) 2022-02-24 23:09:17 +01:00
jdgleaver
9b0cb0fc92
Add 'Standalone Cores' menu (#13655) 2022-02-22 19:23:48 +01:00
Vladimir Serbinenko
f0d8af0d34
Remove gong now that it has been successfully extracted into a standalone core (#13637) 2022-02-18 17:03:35 +01:00
jdgleaver
e541dd5ab1
Disable run-ahead and rewind based on save state support level defined in core info files (#13594)
* Disable run-ahead based on save state support level defined in core info files

* Disable rewind based on save state support level defined in core info files
2022-02-05 00:25:33 +01:00
jdgleaver
a953b27614
Rework optional fast-forward frame skipping: Drop frames based on frame timing (#13578) 2022-01-31 16:32:17 +01:00
Tony
84f558db0b
Add optional frame skipping when fast-forwarding (#13550) 2022-01-26 18:30:33 +01:00
Tony
940f7553fd
Add delay + acceleration to volume hotkeys (#13434) 2021-12-31 18:17:32 +01:00
twinaphex
689057a9b2 Fix iOS/CocoaTouch builds 2021-12-24 15:42:00 +01:00
twinaphex
43d0fa6248 remove unused variable 2021-12-24 12:51:23 +01:00
Jamiras
7ad71a4a05
fix memory map conversion (#13386) 2021-12-21 21:15:03 +01:00
Nikos Chantziaras
0357b6c922
Add on-screen statistics toggle hotkey (#13381)
* Add on-screen statistics toggle hotkey

* CHANGES.md: Add technical statistics hotkey
2021-12-21 00:03:35 +01:00