Commit graph

29 commits

Author SHA1 Message Date
SachinVin 8eb89c260d core: fix warnings 2023-06-17 21:23:58 +05:30
GPUCode 48ee112ceb
Add per game configuration options (#6187)
* common: Move settings to common from core.

- Removes a dependency on core and input_common from common.

* code: Wrap settings values

* Port from yuzu to allow per game settings

* citra_qt: Initial per-game settings dialog

* citra_qt: Use new API for read/save of config values

* citra_qt: Per game audio settings

* citra_qt: Per game graphics settings

* citra_qt: Per game system settings

* citra_qt: Per game general settings

* citra_qt: Document and run clang format

* citra_qt: Make icon smaller and centered

* citra_qt: Remove version number

* Not sure how to extract that, can always add it back later

* citra_qt: Wrap UISettings

* citra_qt: Fix unthottled fps setting

* citra_qt: Remove margin in emulation tab

* citra_qt: Implement some suggestions

* Bring back speed switch hotkey

* Allow configuration when game is running

* Rename/adjust UI stuff

* citra_qt: Fix build with separate windows

* citra_qt: Address feedback

* citra_qt: Log per-game settings before launching games

* citra_qt: Add shader cache options

* Also fix android build

* citra_qt: Add DLC menu option

* citra_qt: Run clang-format

* citra_qt: Adjust for time offset

* citra_qt: Implement suggestions

* Run clang-format

Co-authored-by: bunnei <bunneidev@gmail.com>
2022-12-08 13:27:25 +02:00
DaemonTsun 64062162c6
feat: add system time offset setting (#6139)
* Add setting for system time offset

Add a setting to displace citra system time by days, hours, minutes
or seconds
Add UI for the setting which is only visible when clock is set to
system time
Change core/settings.h to include the setting

* Add system time offset to kernel

Actually makes use of the time offset.

* Fix time offset calculatioon in core/movie.cpp

* Replace C++20 chrono::days with seconds

Hopefully fixes the build.
2022-11-20 17:34:53 +02:00
GPUCode cbd5d1c15c
Upgrade codebase to C++ 20 + fix warnings + update submodules (#6115) 2022-09-21 18:36:12 +02:00
benstephens56 c8a7185444
Convert Input Count to Frame Count (#5954)
* Convert Input Count to Frame Count

While recording or playing a movie file, the left side of the status bar currently displays an input counter which shows how many times the emulator has polled for button inputs during the movie. This information is far less easily understandable and less useful for TASing compared to a frame count. The frame count has a linear relationship with input count that can be expressed with Frame Count = 0.255689103308912 * Input Count. Simply put, instead of having a counter that goes up by 3 or 4 every frame, this makes it a counter that goes up by exactly 1 every frame.

* Update movie.cpp

* Update movie.cpp

* Fixing clang-format errors

* Update movie.cpp

Did not realize that the frame rate was defined as a constant somewhere in the source code. This makes this conversion far less sketchy.

* Update movie.cpp
2022-03-05 12:38:35 +05:30
zhupengfei b2531310b4
Minor improvements to the UX
1. Game will now be paused on movie finish
2. Added 'Save without Closing'
2021-02-08 11:25:38 +08:00
zhupengfei f8eb9a541d
citra_qt: Fix potential indeterminstism caused by starting record/playback
Previously the movie was started *after* core starts running, causing potential indeterminism.

Some desyncs are still not fixed; they may be caused by core timing. More investigation is required.
2021-02-08 11:25:38 +08:00
zhupengfei 1780f8b5b8
core/movie: Add MovieFinished mode
Also mentioned in Laws of TAS.
2021-02-08 11:25:35 +08:00
zhupengfei e188f86582
core/movie: Add future event and timeline check
As specified in TASVideos [Laws of TAS](http://tasvideos.org/LawsOfTAS/OnSavestates.html)
2021-02-08 11:25:34 +08:00
zhupengfei fb14bd956a
citra_qt: Add indicator in status bar
Since we do not have an overlay yet, it can be confusing whether movie is being recorded or played. This makes it clear.

Status messages (e.g. system archive missing) will be overriden, but that shouldn't be too important when recording movies.

Doubled the status bar updating frequency to provide a better experience. It now updates every second.
2021-02-08 11:25:32 +08:00
zhupengfei 5a42a80f40
core/movie: Allow setting a playback completion callback
Instead of specifying it when starting playback. This is necessary as
you can end up playing the movie even if you started as Recording
(for example, loading a state in R/O mode will switch to Playing mode)
2021-02-08 11:25:30 +08:00
zhupengfei 06bc37a67d
core/movie: Remove program ID checks
Most other emulators handle this automatically in the frontend,
booting/restarting the corresponding game instead of reporting an error.
Therefore, remove these checks and errors from the module.
2021-02-08 11:25:29 +08:00
zhupengfei bd88667247
core/movie: Add a few fields
These fields are included in most emulators and required by TASVideos.

`input_count` is implemented by counting the number of 'PadAndCircle' states, as this is always polled regularly and can act as a time/length indicator.
TASVideos also require the input count/frame count to be verified by the emulator before playback, which is also implemented in this commit.
2021-02-08 11:25:28 +08:00
zhupengfei ebaa225bcb
core: Add read-only mode and separate savestate slots for movies
The read-only mode switch affects how movies interact with savestates after you start a movie playback and load a savestate. When you are in read-only mode, the movie will resume playing from the loaded savestate. When you are in read+write mode however, your input will be recorded over the original movie ('rerecording'). If you wish to start rerecording immediately, you should switch to R+W mode, save a state and then load it.

To make this more user-friendly, I also added a unique ID to the movies, which allows each movie to have an individual set of savestate slots (plus another set for when not doing any movies). This is as recommended by staff at TASVideos.
2021-02-08 11:25:27 +08:00
FearlessTobi da908a9ed1 core: Remove unnecessary enum casts in log calls
Follows the video core PR. fmt doesn't require casts for enum classes
anymore, so we can remove quite a few casts.

Co-Authored-By: LC <712067+lioncash@users.noreply.github.com>
2020-12-29 06:39:21 +01:00
Weiyi Wang 104829ae58 remove all occurance of specifying endianness inside BitField
This commit it automatically generated by command in zsh:
sed -i -- 's/BitField<\(.*\)_le>/BitField<\1>/g' **/*(D.)

BitField is now aware to endianness and default to little endian. It expects a value representation type without storage specification for its template parameter.
2019-01-28 22:09:43 -05:00
RicBent 707bc48440 Added new buttons to movie system 2018-12-29 08:19:59 -06:00
fearlessTobi 5121fadb4f ir:/movie: Replace for-loops with fmt::join 2018-11-26 20:04:18 +01:00
fearlessTobi fc51a6fd08 Fix functions which used Common::ArrayToString 2018-11-20 15:05:54 +01:00
Valentin Vanelslande dcd6e7f99f movie: fix some checks
Fixes invalid movie error
2018-10-05 17:20:14 -05:00
zhupengfei ae5c658997
movie: Add clock init time to CTM header
This adds a clock init time field to the CTM header. The clock settings would be overridden when playing a movie. And when recording a movie, if the clock is set to System Time, it would be set to fixed init time at the current moment as well. In this way this keeps consistency with the RNG even if the user does just no setting.
2018-09-27 22:18:10 +08:00
zhupengfei 3b459f6eb3 citra_qt, movie: allow recording/playback before emulation starts 2018-08-20 11:34:27 +02:00
zhupengfei 0f44f7b481 core/movie: Movie refactor, add a completion callback 2018-08-20 11:27:25 +02:00
BreadFish64 74cd98ecad core: clean up warnings 2018-08-01 14:10:23 -05:00
wwylele 0eab948728 reformat all files with clang-format 2018-06-29 16:56:12 +03:00
wwylele 7c5a76e58b log: replace all NGLOG with LOG 2018-06-29 14:18:07 +03:00
Valentin Vanelslande 4fa1628fb6
movie: migrate logging macros 2018-03-31 00:24:21 -06:00
danzel 0238e0c5e7 Convert Movie to a class with a static instance, and other fixes based on B3n30 feedback. 2017-12-17 17:55:56 +13:00
danzel 04541150b1 Movie (recorded inputs) playback and recording. SDL has command lines to control it. 2017-12-17 16:43:09 +13:00