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

4008 Commits

Author SHA1 Message Date
Joe Osborn
2125770236
Replay UI support (#15048)
* Add bsv replay controls (not yet fully implemented), remove toggle

see notes in task_movie.c, make sure command.c calls the right
functions, check retroarch.c and other todos.

bsv files are also now stored with states, not saves.

* Compilation fixes

* Added command impls for play and record replay, and some code in load state to do the right thing there

* Guard some parts of the new code with HAVE_BSV_MOVIE

* wip, menu fixes

* more menu fixes, osd for movie errors, halt recording properly

* Menu and label fixes

* move bsvs to own file suffix series under savestates, fix recording and playback command validity checks

* Fix replay autoincrement

* fix endif placement, whoops

---------

Co-authored-by: Joseph C. Osborn <jcoa2018@pomona.edu>
2023-03-03 00:52:22 +01:00
libretroadmin
7ebab640d7 Cleanups/style nits 2023-02-23 13:15:14 +01:00
libretroadmin
72ff8808af Silence MSVC warning 2023-02-19 12:21:14 +01:00
sonninnos
8b1881fe83
Restore cached video driver always on quit (#14988) 2023-02-18 01:09:05 +01:00
sonninnos
1b6a560816
Don't save switched video driver on quit (#14972) 2023-02-13 11:28:53 +01:00
sonninnos
6378d8e0f8
Override config + appendconfig fixes (#14920) 2023-01-29 00:12:08 +01:00
Joe Osborn
f149519351
Allow for both -e and -R to start a BSV file recording at a state (#14898)
* Allow for both -e and -R to start a BSV file recording at a state

The key issue is that loading a state takes some time, and the BSV
recording shouldn't start until that's done.

The minimal patch for this would just be a change to runloop.c which
moves movie initialization after entry state loading, throwing in a
task_queue_wait().  This makes for some awkward repeated autoload OSD
messages and doesn't solve the underlying issue.

Most of this change puts BSV recording start/stop into tasks, like
saving and loading are tasks; this was important to centralize BSV
operations a bit more and is the first part of a refactoring towards
more robust input recording.  The necessary wait is introduced in the
begin-recording callback.

Co-authored-by: Joseph C. Osborn <jcoa2018@pomona.edu>
2023-01-25 07:15:32 +01:00
sonninnos
c6dc92fc07
Override bind save + menu manager overhaul (#14895)
* Input bind override conf saving

* Override menu overhaul
2023-01-24 01:42:50 +01:00
libretroadmin
e798f99fea Several RARCH_CTL switches don't belong to retroarch state but
runloop state, hence remove
2023-01-22 20:16:14 +01:00
libretroadmin
378e90e745 retroarch.h functions should be namespaced 'retroarch_' instead
of 'rarch_'
2023-01-22 16:58:22 +01:00
sonninnos
f421194974
Pause + hotkey + runloop related changes (#14879) 2023-01-21 01:17:47 +01:00
sonninnos
72f6291069
Fix salamander config save on fork for static platforms (#14875) 2023-01-20 18:51:23 +01:00
Joe Osborn
baa14ae213
Fix #14870 (#14871)
* Don't start video recording when BSV recording starts

* Don't double-record inputs in BSV recording

- Will this work properly with the part of input handling outside of
input_state_wrap? Who knows?

Co-authored-by: Joseph C. Osborn <jcoa2018@pomona.edu>
2023-01-20 18:20:10 +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
ee6aa753c3
Fix Preemptive Frames #ifdefs (#14834) 2023-01-11 03:21:24 +01:00
neil4
7213aada8d
Add Preemptive Frames to Latency Settings (#14832) 2023-01-10 07:22:14 +01:00
libretroadmin
1ab6028b00 Combine driver.c into retroarch.c 2023-01-09 03:20:25 +01:00
libretroadmin
daa9e352cc Remove asserts 2023-01-09 00:51:05 +01:00
libretroadmin
8a3686df58 Revert "Header cleanups - don't include retroarch.h everywhere"
This reverts commit 0e3b478f8c.
2023-01-08 09:05:46 +01:00
libretroadmin
0e3b478f8c Header cleanups - don't include retroarch.h everywhere 2023-01-08 08:56:57 +01:00
libretroadmin
e447a4e8e6 Get rid of RARCH_CTL_SET_{IDLE/PAUSED} 2023-01-07 07:32:16 +01:00
libretroadmin
c14d14548a Buildfix 2023-01-07 05:04:46 +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
libretroadmin
5bac2b0204 Cleanups 2023-01-05 23:34:46 +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
libretroadmin
38bc51f5c2 (config.def.h) only try to include define headers 2022-11-27 22:57:17 +01:00
libretroadmin
9bbe6992e2 (UI Companion) simplify boolean code by replacing it with flags 2022-11-23 06:14:56 +01:00
libretroadmin
c309c102d8 Silence more warnings and create more of a distinction between variables
that belong to the runloop state vs. retroarch state
2022-11-23 05:28:07 +01:00
libretroadmin
b84416ac7c (retroarch.c) Silence warnings 'value stored to runloop_st during its initialization
is never read'
2022-11-23 05:23:35 +01:00
neil4
3b0db75782
Overlay cleanups; replace bools with flags (#14661) 2022-11-22 18:29:11 +01:00
sonninnos
9bc7bebf51
More hotkey cleanups (#14657) 2022-11-22 14:45:30 +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
sonninnos
43b6d59740
Command line output cleanups (#14649) 2022-11-20 16:48:29 +01:00
sonninnos
7275b82614
System Information cleanups (#14647) 2022-11-20 13:39:02 +01:00
sonninnos
3b921ffbfa
Fix shader toggle and add hotkey + sublabel (#14628) 2022-11-15 22:14:09 +01:00
sonninnos
86669d21e2
Pausing cleanups and corrections (#14618) 2022-11-13 17:22:36 +01:00
Michael Burgardt
b89692c532
Add Hungarian language option (#14585) 2022-11-04 19:52:39 +01:00
LibretroAdmin
b2e2330ed7 Addendum to prior commit - should be good now 2022-10-31 20:32:11 +01:00
LibretroAdmin
cb1b02a1c3 Revert changes to struct - concern trolling over perceived
backwards compat. regression (whether proven or not)
2022-10-31 19:17:05 +01:00
LibretroAdmin
11047c6f4d (netplay_frontend) Use flags instead of booleans 2022-10-30 18:20:08 +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
c0d6d6e750 Create video_driver_get_st_flags 2022-10-26 22:35:04 +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
Keith Bowes
72a076a58d
Fixed compiling with --disable-menu (#14535) 2022-10-19 03:30:52 +02:00
reallibretroadmin
c594abb10d Cleanups; fixes of warnings 2022-10-17 19:29:33 +02:00
LibretroAdmin
e62abac647 Add BSV movie flags 2022-10-15 14:32:26 +02:00
Michael Burgardt
254ac65549
Add British English language option (#14504) 2022-10-12 23:26:00 +02:00
LibretroAdmin
a153738bbd Create retroarch_get_flags and use it 2022-10-12 13:27:54 +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
da68e73f94 Get rid of some RARCH_CTL_ commands 2022-10-10 20:14:54 +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
479e3b23d9 Turn content_get_status into content_get_flags 2022-10-09 20:32:39 +02:00
LibretroAdmin
385029786c Simplify code part 2022-10-08 23:08:17 +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
f40d157571
Use flags pt3 (#14491)
* (Vulkan) Use flags for vulkan_emulated_mailbox

* Use flags for vk_texture

* dispgfx_widget - use flags instead of bools

* (Autoconfig) Use flags
2022-10-07 11:08:17 +02:00
reallibretroadmin
cd0d0eb541 Can save config now without WINRT ifdef - we do config file deinit
AFTER ui companion driver deinit now
2022-10-01 23:37:49 +02:00
LibretroAdmin
741b54d4be Ifdef this for UWP for now since this will segfault on OSX - we
need a more uniform way of tearing things down without ifdefs
for all platforms
2022-10-01 23:17:04 +02:00
Bashar Astifan
b93599c7e0
UWP OnSuspending and save on quit fix (#14452)
* Update uwp_main.cpp

* Update retroarch.c
2022-10-01 14:28:23 +02:00
LibretroAdmin
532840c4b8 Change size of path_config_append_file to PATH_MAX_LENGTH - fixes #12906 2022-09-03 17:27:16 +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
fabccce437 Silence some unused variable warnings 2022-08-27 17:52:19 +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
sonninnos
5f7d14966c
(Ozone+XMB) Fullscreen thumbnail browsing (#14342) 2022-08-24 12:35:54 +02:00
Cthulhu-throwaway
908667d97a
(Netplay) Removal of older unused code (#14312) 2022-08-11 23:17:33 +02:00
LibretroAdmin
96a0486790 C89_BUILD buildfix 2022-08-09 00:01:55 +02:00
LibretroAdmin
05cf639712 Reduce amount of strlcats in retroarch.c 2022-08-08 21:46:37 +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
Cthulhu-throwaway
976a49ad2b
Ensure #ifdef instead of #if for HAVE_NETWORKING (#14299) 2022-08-07 13:42:09 +02:00
LibretroAdmin
ef551478d3 Use fill_pathname_join when out and dir overlap 2022-08-05 05:27:51 +02:00
LibretroAdmin
0c21a92581 * fill_pathname_expand_special will NULL-terminate string so not
necessary to NULL terminate passed string
* fill_pathname - add size_t return value
* Some general cleanups
2022-08-04 17:10:51 +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
5b56ff145f Refine documentation 2022-08-01 15:46:08 +02:00
LibretroAdmin
592f9384b0 Silence code analysis warnings by Xcode - unused variables - nothing
done with value set - etc
2022-07-29 08:29:43 +02:00
Cthulhu-throwaway
8d4a64ab96
(Netplay) Disallow netplay start when content is not loaded for static core platforms (#14220) 2022-07-26 07:21:57 +02:00
libretroadmin
35d6c31b5b Solve some code analysis warnings 2022-07-24 11:27:39 +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
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
Cthulhu-throwaway
ef022ffe90
(Netplay) Force a core update when starting netplay (#14157) 2022-07-08 18:20:01 +02:00
libretroadmin
126940a98b Silence unused variable warnings for Emscripten 2022-07-01 13:49:49 +02:00
Cthulhu-throwaway
5b6d11cc60
(Netplay) Special saves directory for clients (#14111) 2022-06-29 10:18:39 +02:00
libretroadmin
0356c563b8 Simplify gfx_display_check_compatibility 2022-06-20 20:19:16 +02:00
libretroadmin
64bf25542f Android has HAVE_TRANSLATE defined but not HAVE_ACCESSIBILITY, so
add this to the conditional
2022-06-19 18:24:07 +02:00
libretroadmin
cf67c102ed command_event - access_st local variable is unused when HAVE_ACCESSIBILITY
is not defined
2022-06-19 18:17:00 +02:00
OsirizX
c6d51fdb32 [ORBIS] Initial changes for PS4 2022-05-21 16:31:10 +02:00
jdgleaver
801b16885e Enable automatic configuration of 'VSync Swap Interval' 2022-05-12 14:22:46 +01:00
Cthulhu-throwaway
796bc15837
C89 buildfix (#13923)
* C89 buildfix

* More buildfixes
2022-05-10 07:37:33 +02:00
Cthulhu-throwaway
0a52964015
(Netplay) Disable and hide stateless mode (#13915)
Stateless mode is nonfunctional at the moment, despite my attempts to get it working.
A significant amount of work is required to get it working.

For now, force-disable stateless mode and hide it from menus and the CLI's help text.
2022-05-05 20:46:48 +02:00
jdgleaver
37c56d0d09
Add option to disable automatic saving of input remap files (#13894) 2022-04-27 19:12:53 +02:00
Michael Burgardt
e185955bc1
Add Catalan language option (#13850) 2022-04-20 14:37:24 +02:00
Joel Puig Rubio
03146e4604
Label Valencian as a Catalan dialect (#13837) 2022-04-19 11:58:50 +02:00
jdgleaver
c687a29d6a
Input Remaps: Fix saving of 'Analog to Digital Type' when configuration overrides are used (#13824) 2022-04-04 19:08:17 +02:00
Mats
4a1a1e2fa7
(steam) Introduce Steam Rich Presence (#13798) 2022-04-02 08:07:40 +01:00
Michael Burgardt
fd35162cbe
Add Valencian language option (#13789) 2022-03-30 17:59:09 +02: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
b08314cf60 Prevent 'global' configuration of input libretro device type 2022-03-15 17:43:28 +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
Jamiras
b4d9d6c5fc
move slowdown disable into toggle_hardcore_active (#13734) 2022-03-11 07:17:54 +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
Mats
249241d7cd
(steam) Initial integration with Steam API w/ mist (#13710) 2022-03-09 15:05:07 +01:00
Michael Burgardt
56f2e2f7b8
Add Czech language option (#13680) 2022-03-07 19:11:39 +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
69cf8b1795
Fix some command line segfaults (#13682) 2022-02-28 10:32:50 +01:00
Tony
3b1d75d9cf
Console help output cleanup (#13678) 2022-02-27 05:30:04 +01:00
jdgleaver
b697f556e5
Ensure that cores are deinitialised correctly following initialisation failure (#13665) 2022-02-24 14:49:33 +01:00
twinaphex
d2ab5d05ee Remove GONG remnants 2022-02-19 05:33:32 +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
Keith Bowes
cce04bab70
Remove references to removed features (#13564) 2022-01-30 09:29:43 +01:00
jdgleaver
fa213a724f
Fix crash when cores using RETRO_ENVIRONMENT_SET_AUDIO_CALLBACK return false from retro_load_game() (#13547) 2022-01-26 18:30:07 +01:00
Michael Burgardt
311fec15d9
Add Indonesian, Swedish and Ukrainian language options (#13490)
* Add Indonesian, Swedish and Ukrainian language options

* Enable Indonesian and Swedish localisations for RGUI
2022-01-19 19:12:55 +01:00
Jamiras
0a1ffcd4d5
reset hardcore default to enabled; show message when trying to load state in hardcore (#13471) 2022-01-11 13:48:05 +01:00
jdgleaver
1935d217d2
Enable 'short form' notation when specifying core path on the command line (-L, --libretro=FILE) (#13454) 2022-01-08 04:03:06 +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
Cthulhu-throwaway
690c802921
Netplay Stuff (#13375)
* Netplay Stuff

## PROTOCOL FALLBACK
In order to support older clients a protocol fallback system was introduced.
The host will no longer send its header automatically after a TCP connection is established, instead, it awaits for the client to send his before determining which protocol this connection is going to operate on.
Netplay has now two protocols, a low protocol and a high protocol; the low protocol is the minimum protocol it supports, while the high protocol is the highest protocol it can operate on.
To fully support older clients, a hack was necessary: sending the high protocol in the unused client's header salt field, while keeping the protocol field to the low protocol. Without this hack we would only be able to support older clients if a newer client was the host.
Any future system can make use of this system by checking connection->netplay_protocol, which is available for both the client and host.

## NETPLAY CHAT
Starting with protocol 6, netplay chat is available through the new NETPLAY_CMD_PLAYER_CHAT command.
Limitations of the command code, which causes a disconnection on unknown commands, makes this system not possible on protocol 5.
Protocol 5 connections can neither send nor receive chat, but other netplay operations are unaffected.
Clients send chat as a string to the server, and it's the server's sole responsability to relay chat messages.
As of now, sending chat uses RetroArch's input menu, while the display of on-screen chat uses a widget overlay and RetroArch's notifications as a fallback.
If a new overlay and/or input system is desired, no backwards compatibility changes need to be made.
Only clients in playing mode (as opposed to spectating mode) can send and receive chat.

## SETTINGS SHARING
Some settings are better used when both host and clients share the same configuration.
As of protocol 6, the following settings will be shared from host to clients (without altering a client's configuration file): input latency frames and allow pausing.

## NETPLAY TUNNEL/MITM
With the current MITM system being defunct (at least as of 1.9.X), a new system was in order to solve most if not all of the problems with the current system.
This new system uses a tunneling approach, which is similar to most VPN and tunneling services around.

Tunnel commands:
RATS[unique id] (RetroArch Tunnel Session) - 16 bytes -> When this command is sent with a zeroed unique id, the tunnel server interprets this as a netplay host wanting to create a new session, in this case, the same command is returned to the host, but now with its unique session id. When a client needs to connect to a host, this command is sent with the unique session id of the host, causing the tunnel server to send a RATL command to the host.
RATL[unique id] (RetroArch Tunnel Link) - 16 bytes -> The tunnel server sends this command to the host when a client wants to connect to the host. Once the host receives this command, it establishes a new connection to the tunnel server, sending this command together with the client's unique id through this new connection, causing the tunnel server to link this connection to the connection of the client.
RATP (RetroArch Tunnel Ping) - 4 bytes -> The tunnel server sends this command to verify that the host, whom the session belongs to, is still around. The host replies with the same command. A session is closed if the tunnel server can not verify that the host is alive.

Operations:
Host -> Instead of listening and accepting connections, it connects to the tunnel server, requests a new session and then monitor this connection for new linking requests. Once a request is received, it establishes a new connection to the tunnel server for linking with a client. The tunnel server's address and port are obtained by querying the lobby server. The host will publish its session id together with the rest of its info to the lobby server.
Client -> It connects to the tunnel server and then sends the session id of the host it wants to connect to. A host's session id is obtained from the json data sent by the lobby server.

Improvements (from current MITM system):
No longer a risk of TCP port exhaustion; we only use one port now at the tunnel server.
Very little cpu usage. About 95% net I/O bound now.
Future backwards compatible with any and all changes to netplay as it no longer runs any netplay logic at MITM servers.
No longer operates the host in client mode, which was a source of many of the current problems.
Cleaner and more maintainable system and code.

Notable functions:
netplay_mitm_query -> Grabs the tunnel's address and port from the lobby server.
init_tcp_socket -> Handles the creation and operation mode of the TCP socket based on whether it's host, host+MITM or client.
handle_mitm_connection -> Creates and completes linking connections and replies to ping commands (only 1 of each per call to not affect performance).

## MISC
Ping Limiter: If a client's estimated latency to the server is higher than this value, connection will be dropped just before finishing the netplay handshake.
Ping Counter: A ping counter (similar to the FPS one) can be shown in the bottom right corner of the screen, if you are connected to a host.
LAN Discovery: Refactored and moved to its own "Refresh Netplay LAN List" button.

## FIXES
Many minor fixes to the current netplay implementation are also included.

* Remove NETPLAY_TEST_BUILD
2021-12-19 16:58:01 +01:00
Tilman M. Jaeschke
682bbab233
[New Feature] Load save states from command-line or playlist (#13354)
* load save states from command-line or playlist

* load save states from command-line or playlist

* removed some brackets
2021-12-14 14:08:06 +01:00
Tony
09880e92d2
Logging cleanups (#13320) 2021-12-04 14:21:12 +01:00
Tony
121ca3a482
'Automatic Frame Delay' improvements: (#13297)
- swap interval handling
- d3dx handling
2021-12-02 02:32:39 +01:00
twinaphex
adc325e908 Move command_get_config_param to command.c 2021-11-23 17:14:38 +01:00
twinaphex
bc6433e0f9 Move menu_content_environment_get to task_content.c 2021-11-23 17:10:52 +01:00
twinaphex
b4137915e8 Move code to proper locations 2021-11-23 16:58:36 +01:00
twinaphex
c2c36177b8 Move two variables to input_driver.c 2021-11-22 15:26:54 +01:00
twinaphex
9982452c18 Move code from retroarch.c to runloop.c 2021-11-22 03:33:58 +01:00
Autechre
2b87cd9313
Create runloop.c and split up runloop code to this new file; (#13269)
* Create runloop.c and split up runloop code to this new file;
retroarch.c now 207Kb and runloop.c 301Kb

* Define empty runloop_secondary_core_destroy
2021-11-22 03:27:23 +01:00
twinaphex
d3d7748f92 Move global error_on_init/error_string/sjlj jump to global
state - move g_extern out of p_rarch
2021-11-21 23:26:47 +01:00
Autechre
113e9340c1
Move ui_companion_driver code out of retroarch.c (#13268)
* Move ui_companion_driver code out of retroarch.c

* Buildfix

* Fix error - was reading the array out of (preinitialized) bounds

* Remove unused variable
2021-11-21 23:19:23 +01:00
Autechre
5f49899343
Bluetooth refactor (#13266)
* Use HAVE_BLUETOOTH ifdef to strip out this code when not defined

* Split up bluetooth code into its own file
2021-11-21 20:44:08 +01:00
Autechre
71b30d7846
Split up wifi networking code - move it into separate file (#13262) 2021-11-21 12:37:39 +01:00
Tomáš Kelemen (vudiq)
a2f9273979
Bluetooth: add option to remove pairing
Pressing the START button removes the device pairing. Useful in case
the device (e.g. gamepad) was paired with a different adapter/computer
and needs to be paired again with current adapter/computer.

To pair again, RetroArch needs to be restarted, so the device list is
populated again.

Upstream of patch used by Lakka at build time
1943ad296e/packages/libretro/retroarch/patches/retroarch-98-remove_bluetooth_pairing.patch
2021-11-17 22:15:35 +01:00
GavinDarkglider
a60df14d81
Lakka/Nintendo Switch: disable cpu scaling for Nintendo Switch
Lakka on Nintendo Switch uses own cpu governor.

Upstream of patch used by Lakka at build time
1943ad296e/packages/libretro/retroarch/patches/retroarch-04-cpufreq-wip-disable-on-switch.patch
2021-11-17 22:15:35 +01:00
Tomáš Kelemen (vudiq)
be92517b16
Lakka: use different shutdown/reboot system commands
To avoid any filesystem corruption during shutdown/reboot a sleep is
added before shutdown/reboot is called. Also no quit is called, as the
RetroArch process will be killed by systemd. Quitting RetroArch may
result in unwanted restart of RetroArch by systemd.

Upstream of patch used by Lakka at build time
1943ad296e/packages/libretro/retroarch/patches/retroarch-02-graceful-shutdown-reboot-hack.patch
2021-11-17 22:15:35 +01:00
Tomáš Kelemen (vudiq)
3fa1052dad
Honor config_save_on_exit when Reboot/Shutdown is called
When Shutdown or Reboot are selected from the main menu, configuration
is saved regardless of checking the user setting. Showing the widget and
saving the configuration should be called only in case user wants to
save configuration on exit.
2021-11-17 17:44:27 +01:00
Autechre
0c45d96a99
Merge pull request #13229 from libretro/move-driver
Move driver code to driver.c file - move code outside of retroarch.c
2021-11-15 19:29:54 +01:00
twinaphex
d7a8bc55a3 Revert "(Cthulhu88) Add netplay hotkey bind"
This reverts commit deaf116d38.
2021-11-12 19:00:24 +01:00
twinaphex
70ee3fbca7 Revert "(Cthulhu88) New Netplay MITM Part 2"
This reverts commit 34c374737c.
2021-11-12 18:58:40 +01:00
twinaphex
34c374737c (Cthulhu88) New Netplay MITM Part 2 2021-11-12 06:31:54 +01:00
twinaphex
2d5e090eb3 Move driver code to driver.c file - move code outside of retroarch.c 2021-11-12 04:45:09 +01:00
twinaphex
13d662d76b Silence some warnings 2021-11-11 22:28:16 +01:00
twinaphex
dfb0e298c5 Buildfix 2021-11-11 07:49:43 +01:00