Commit graph

741 commits

Author SHA1 Message Date
sonninnos fc6d251be9
Fix save new config name when core loaded (#16458) 2024-04-23 09:54:04 -07:00
libretroadmin 6c303be476 Fix core config saving 2024-04-23 18:52:56 +02:00
Eric Warmenhoven 5fd4eb905c
iOS QOL improvements (#16444)
* iOS/tvOS: bundle cores as frameworks as opposed to dylibs

* iOS/tvOS: update plist to indicate controller support

* iOS/tvOS: living within the sandbox

* iOS/tvOS: import content through share sheet

* iOS/tvOS: default audio sync off due to crash on background

* iOS/tvOS: don't try altkit if there's no reason to

* iOS/tvOS: enumerate cores for appstore distribution
2024-04-18 03:01:39 -07:00
sonninnos 9dfa1df39e
Remove some unneeded logging (#16298) 2024-02-26 20:59:01 -08:00
David G. F ab376eb669
Make auto-savestates not use the task queue (#16061)
Auto savestate (and its optional thumbnail) is generated on core unload
(quit, netplay start, etc). This ends up using the task-queue, which in
many cases deadlocks and/or causes a crash due to its asynchronous
nature.

Given that this is a state that must be generated before quiting or
reloading the core, it makes no sense to use the task queue, it should
be a synchronous job like for instance SRAM saving.

This should fix #15248 (tested by @schmurtzm)
2023-12-30 21:44:15 -08:00
David G. F ea87495a4e
Save improvements (#16053)
* Simplify autosave command function

* Simplify and split save and savestate logic

save.c contains "SRAM" saves and their logic, which uses no task/queue.
2023-12-28 11:10:46 -08:00
zoltanvb 232095797e
Set fixed locale for numbers, close to config read/write (#15782)
Move setlocale() closer to config file read/write.
2023-10-31 12:03:24 -07:00
Joe Osborn 2baf9ec7e0
Enqueue replay record/playback until next frame (#15751)
* Enqueue replay record/playback until next frame

This fixes a bug where stdin commands activated via polling would
trigger replay record/playback in the middle of a frame, then input
checking would pull from them before the next frame came around---it
only makes sense to change the active replay in between frames, not
during them.

* fix comment syntax
2023-10-04 00:53:51 -07:00
sonninnos 12136ad516
Add 'Save As' option for remaps and overrides (#15630) 2023-08-21 16:11:48 -07:00
libretroadmin 947249ac25 Cut down on more strlens 2023-07-15 09:52:47 +02:00
libretroadmin 9e34f22a29 Silence Xcode code warnings + general cleanups 2023-07-14 18:05:54 +02:00
libretroadmin aa8d029369 Turn command_memory_get_pointer function static 2023-07-05 03:37:00 +02:00
libretroadmin d514f1ded3 Avoid false positives with code analysis tools - rename
variables called 'system'
2023-07-05 03:29:49 +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 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 fc06e2f84f Simplify core_serialize_size and core_serialize_size_special 2023-06-16 17:20:27 +02:00
libretroadmin f66a8dc538 Cleanup unused variable warnings 2023-06-01 22:34:16 +02:00
libretroadmin c24744eae5 Remove video_driver_show_mouse/hide_mouse 2023-05-29 18:58:23 +02:00
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