Commit Graph

773 Commits

Author SHA1 Message Date
libretroadmin 91ea92e50b Get rid of some menu_driver_ctl commands 2023-05-10 21:30:09 +02:00
Joe Osborn d118259589
Make cmd interface more useful for replay information (#15132)
* Add 'active replay' config get to config command and flush stdout for command replies; tweak output of play replay command

* guard on have_bsv_movie
2023-03-24 22:41:07 +01:00
Joe Osborn 807640fed3
Associate states with replays (#15070)
* change bsv file suffix to replay, update strings

* add trivial RPLY block to save states

* WIP rerecording support, doesn't load states properly yet--issue with checking identifiers?

* Fixed a type error to get time identifiers working right, ready for testing

* handle case where state without replay data is loaded during replay

* cleanups

* whitespace cleanup

* Cleanups, change replay file format magic, fix logic around future states

* Remove failed future message

* Add play-replay-from-slot command, fix load-state-from-slot to use given slot

* build fixes

* Fix race conditions in emscripten build and incorrect replay state incrementing

* Style fix for single line if

---------

Co-authored-by: Joseph C. Osborn <jcoa2018@pomona.edu>
2023-03-08 00:10:59 +01:00
Joe Osborn 4d81f70f00
Replay nomenclature (#15054)
* change bsv file suffix to replay, update strings

* Fix bsv cli args

* Fix help whitespace

* Fix another message

---------

Co-authored-by: Joseph C. Osborn <jcoa2018@pomona.edu>
2023-03-03 23:16:48 +01:00
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 1314d9479b (Griffin) Add HAVE_MIST files
(Command.c) Remove some unused variables
2023-02-25 17:51:16 +01:00
libretroadmin f8b119031d Buildfix 2023-02-24 23:16:30 +01:00
libretroadmin 9f4439958b Turn function static 2023-02-24 23:08:44 +01:00
Joe Osborn d0ca2384c5
Add LOAD_STATE_SLOT N command to stdin/network protocol (#15010)
* Add LOAD_STATE_SLOT N command to stdin/network protocol

* Style fixes

---------

Co-authored-by: Joseph C. Osborn <jcoa2018@pomona.edu>
2023-02-24 23:04:39 +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
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
LibretroAdmin cc3a339011 (Runloop) Use more flags 2022-10-10 19:54:54 +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 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 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
Jamiras 906d885b8e
allow creating auto savestate in hardcore (#14392) 2022-09-06 05:04:54 +02:00
LibretroAdmin 84868ab21f (Setting) Windowed scale should be an integer instead of float 2022-09-05 04:03:04 +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 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
LibretroAdmin 10a351228b * Rewrite some snprintfs
* task_steam.c - add license header
2022-08-20 19:17:28 +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
Cthulhu-throwaway 3aa1811ca9
(Network) Add getnameinfo_retro (#14278) 2022-08-04 13:22:49 +02:00
Cthulhu-throwaway 9b10579a54
(Network) Fix getaddrinfo_retro (#14261) 2022-07-31 11:22:28 +02:00
libretroadmin e865ea83bd * Don't NULL terminate string if we pass it to strlcpy and/or a
file_path function that calls strlcpy under the hood
* Replace some snprintf calls to strlcpy/strlcat
2022-07-22 22:23:54 +02:00
libretroadmin ec70bb84ca Remove unused variable 2022-07-12 17:31:47 +02:00
libretroadmin adf9994828 Deprecate fill_pathname_base_noext 2022-07-11 20:13:44 +02:00
libretroadmin e91cf0e40d No longer use fill_pathname_noext - just basic strlcpy/strlcat string
concatenation
2022-07-11 18:48:02 +02:00
sonninnos ee8993c76a
Silence Linux snprintf warnings (#14131) 2022-07-02 14:08:27 +02:00
LibretroAdmin 4a38831c47
Try to reduce fixed size char arrays from PATH_MAX_LENGTH to lower sizes (#14062)
* Try to reduce fixed size char arrays from PATH_MAX_LENGTH to lower sizes
2022-06-18 19:07:15 +02:00
Cthulhu-throwaway 43ad2b64b2 (Network) Replace socket_select calls 2022-06-12 02:13:34 -03:00
jdgleaver 801b16885e Enable automatic configuration of 'VSync Swap Interval' 2022-05-12 14:22:46 +01:00
twinaphex 4d112da58d Silence some MSVC code analysis warnings 2022-03-07 19:02:46 +01:00
twinaphex 460f5e745d Silence some MSVC 2019 code analysis warnings 2022-03-05 14:39:56 +01:00
Jamiras e4d62a3b9f
apply disconnect logic for command_memory_read/write (#13668) 2022-02-25 18:23:38 +01:00
jdgleaver 42e03cae83
Disable save states based on save state support level defined in core info files (#13562) 2022-02-02 16:49:53 +01:00
Tony 8cc423e036
Logging cleanups (#13370) 2021-12-17 18:04:24 +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
twinaphex adc325e908 Move command_get_config_param to command.c 2021-11-23 17:14:38 +01:00
twinaphex 86f899c844 Revert "Shorten character arrays that are passed to fill_pathname_base_noext"
This reverts commit 318108ac82.
2021-11-10 08:22:19 +01:00
twinaphex f06b9ecf06 Revert "Reduce character arrays passed to fill_pathname_base"
This reverts commit a4a7c3bedf.
2021-11-10 08:21:59 +01:00
twinaphex a4a7c3bedf Reduce character arrays passed to fill_pathname_base 2021-11-10 00:57:32 +01:00
twinaphex 318108ac82 Shorten character arrays that are passed to fill_pathname_base_noext 2021-11-10 00:09:33 +01:00
twinaphex f671ce4f8c Move global->name to runloop_st 2021-11-09 06:03:00 +01:00
twinaphex be347e9d49 Move command_event_reinit to command.c 2021-11-04 00:38:18 +01:00
twinaphex f59b420fde * Move more code to command.c
* Buildfix for CTR/3DS
2021-11-03 21:59:58 +01:00
twinaphex ec7b7821fa Move code out of retroarch.c 2021-10-29 14:13:16 +02:00
twinaphex 22d70a64dd Move command_write_memory and command_read_memory to command.c 2021-10-13 18:15:35 +02:00
Autechre e7f182811a
Split up audio code into new file audio/audio_driver.c (#13097)
* Split up audio code into new file audio/audio_driver.c

* Fix build issues #1

* Small cleanup

* Fix typo
2021-10-11 18:01:37 +02:00
twinaphex b4f09f7a55 Fix some header includes 2021-09-30 23:31:54 +02:00
twinaphex e886e908d5 Create consistent naming conventions - use retroarch_ instead
of rarch_ for some functions for all functions coming from retroarch.h
2021-09-28 12:56:10 +02:00
Michael Burgardt d8db234df0
Concatinate some previously truncated strings for easier translation (#12120) 2021-09-16 19:00:14 +02:00
twinaphex 8564b4f8e3 Fix compilation problem when HAVE_BSV_MOVIE is not defined 2021-09-09 16:58:52 +02:00
twinaphex 6a310ecfed Move more code to command.c 2021-09-09 16:55:14 +02:00
twinaphex 14cd338b97 Move code from retroarch.c to command.c 2021-09-09 16:31:35 +02:00
twinaphex 2f14d2e4e2 Move some command functions over from retroarch.c to command.c - the
other ones have some dependencies on static locals in retroarch.c so
can't be easily transferred over for now
2021-08-30 16:08:50 +02:00
jsd1982 b3eebbd5ec command: initialize netcmd->cmd_source_len before recvfrom() 2021-05-13 22:13:10 -05:00
twinaphex 966e0640af Style nits 2021-04-05 20:02:19 +02:00
twinaphex 0e26077a64 Add license headers 2021-04-05 19:58:18 +02:00
David G. F b830b33cf1
Rewrite commands and add new command type (#12233)
* (OSX non-Metal build) Set disable execute page protection

* Rewrite commands and add new command type

This moves commands to a separate file and creates a consistent
interface for them. It is now possible to use multiple command
interfaces simultaneously (stdin, network and UDS).
Implemented a new interface for Lakka, UDS based (so Linux only). This
allow other Lakka servies to send certain commands to Retroarch in a
secure and reliable way.

Co-authored-by: twinaphex <libretro@gmail.com>
2021-04-05 19:55:59 +02:00
twinaphex 8438c9650a Last file to merge into retroarch.c - from here, we
can start refactoring things to split things off into tasks
that are not crucial to the main runloop
2019-07-22 16:46:33 +02:00
orbea e13ec54dc6 Fix --disable-overlay. 2019-07-21 10:26:42 -07:00
twinaphex b6b22a9a32 More shader refactors - make sure we can compile entirely
without shader support if HAVE_CG, HAVE_GLSL, HAVE_SLANG
and HAVE_HLSL are all not defined
2019-07-21 00:34:07 +02:00
twinaphex 7fe0662918 Cleanups 2019-07-20 12:51:52 +02:00
twinaphex d905986a52 Rename functions - change rarch_ prefix to retroarch_ 2019-07-20 12:43:43 +02:00
orbea ae6ea28220 Fix the iOS 11 build.
Fixes https://github.com/libretro/RetroArch/issues/9120.
2019-07-17 06:32:00 -07:00
twinaphex fa2e1fb0c1 overlay_ptr is now a static global variable inside retroarch.c 2019-07-10 06:53:47 +02:00
twinaphex b567bc7ead Revert "Remove BSV code - was obsolete and no longer working - input recording"
This reverts commit 7f731e390a.
2019-07-08 18:21:46 +02:00
twinaphex 7f731e390a Remove BSV code - was obsolete and no longer working - input recording
can be done in other ways instead of being held back by this old input
recording format - was decided along with Themaister that we want to
arrive at a codebase more easily maintained by all
2019-07-08 18:19:49 +02:00
twinaphex f4bf218f35 (Menu) We need to tell rarch_menu_running_finished whether we want
to exit RetroArch or not - to avoid certain crashes when trying to
access the settings pointer - which should already be freed at this
point
2019-06-30 11:23:18 +02:00
twinaphex faa52fb0df Use const for config_get_ptr global pointer to signify this pointer
isn't being written to, only read from
2019-06-26 07:40:47 +02:00
twinaphex 3b634b64fa Merge dirs.c into paths.c 2019-06-26 07:23:32 +02:00
twinaphex b0382d8f73 (Emscripten) Some buildfixes for platforms with no HAVE_NETWORKING support 2019-06-23 01:28:43 +02:00
Barry Rowe e9625b3ed9 AI Service feature. 2019-06-21 17:48:35 -07:00
radius d865c5e4a6 add some copyright on files I contributed considerably just in case 2019-06-20 05:45:17 +02:00
LazyBumHorse c20c67bd3a proper shader compatibility checks
- move shader flags from the video drivers to the context drivers
 - rework config_load_shader_preset() from configuration.c into retroarch_load_shader_preset() in retroarch.c with proper compatibility check
 - implicitly call retroarch_load_shader_preset() in retroarch_get_shader_preset() once per core/content life cycle
 - use video_shader_is_supported() instead of video_driver_test_all_flags() where appropriate
 - remove GFX_CTX_FLAGS_NONE because it is meaningless
2019-06-18 13:46:41 +02:00
LazyBumHorse 42e35c825f refactor some video_shader_parse functions
- video_shader_parse_type()'s fallback only worked for NULL paths and was wrongly used, now returns RARCH_SHADER_NONE like video_shader_get_type_from_ext().
 - video_shader_get_type_from_ext() should not be checking video driver flags, this is instead done by video_shader_is_supported()
 - video_driver_get_all_flags() did not actually 'get' flags, changed to video_driver_test_all_flags()

workaround for crash due to glcore not always using at least OpenGL 3.2
2019-06-18 13:12:56 +02:00
twinaphex f061941456 Integrate record_driver.c into retroarch.c 2019-06-17 16:23:46 +02:00
twinaphex ee3208ac39 Integrate video_driver.c into retroarch.c 2019-06-17 15:10:22 +02:00
twinaphex 61879bc8e0 audio_driver_dsp_filter_init - cleanup 2019-06-17 13:06:56 +02:00
twinaphex 127bf556c7 Merge audio_driver.c into retroarch.c 2019-06-17 12:49:21 +02:00
twinaphex 66022c1b13 Get rid of camera_driver_ctl and bsv_movie_ctl 2019-06-17 11:38:28 +02:00
twinaphex db87e050d5 Merge movie.c into retroarch.c 2019-06-16 16:52:48 +02:00
twinaphex e4b01642b9 Reimplement fullscreen toggle key 2019-06-16 16:20:43 +02:00
twinaphex 53c91d6e56 More runloop cleanups - create HOTKEY_CHECK3 2019-06-09 08:48:59 +02:00
twinaphex 640fb3a5cb command.c / retroarch.c cleanups 2019-06-09 08:35:16 +02:00
Twinaphex 3917d0c6c9
Merge pull request #8943 from orbea/networking
qb: Improve various tests.
2019-06-09 05:20:25 +02:00
twinaphex 9aa61a010f Fix build error 2019-06-09 04:25:22 +02:00
orbea c450b7d2f2 qb: Improve various tests.
Also fixes a compile failure with --disable-networking
2019-06-08 17:22:05 -07:00
twinaphex 5d301f321d Refactor hotkey checks 2019-06-08 15:19:15 +02:00
twinaphex 6d17d11132 Rewrite '== false' to '!' for our own code 2019-06-06 13:50:39 +02:00
twinaphex 58056a409d event_init_content - cleanup 2019-06-06 13:41:20 +02:00
twinaphex b87c9fd495 command_read_ram - small cleanups 2019-06-06 13:19:57 +02:00
twinaphex b4d2281f7d command_write_ram - cleanup 2019-06-06 13:12:38 +02:00
twinaphex 820ffb9d20 Cleanups - cut down on the rest of unnecessary filestream_exists calls
- only use filestream_exists immediately before filestream_delete or
any other genuine filestream-related operations - when just checking
if a path exists on the filesystem, just use path_is_valid - faster
2019-05-31 06:43:20 +02:00