Commit graph

4194 commits

Author SHA1 Message Date
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
liushuyu 04f201ab34
dumping/ffmpeg_backend: add support for ffmpeg 5.0 2022-02-20 04:07:10 -07:00
Mai M 54a36bc54f
fs_user: Resolve sign conversion warning in GetPriority() (#5396)
Prevents a -Wsign-compare warning from occurring.
2022-02-19 09:49:16 +05:30
bunnei 62753e882e
Merge pull request #5448 from zhaowenlan1779/rerecording
Implement basic rerecording features
2022-02-18 20:29:36 -07:00
bunnei bae1c31406
Merge pull request #5718 from liushuyu/httpc
externals: update httplib and libressl
2022-02-05 02:59:18 -07:00
SachinVin 2fc7def6f6
Merge pull request #5395 from lioncash/gsp
gsp_gpu: Resolve sign conversion warnings
2022-01-30 21:55:24 +05:30
liushuyu af24f75c18
externals: update httplib and libressl ...
* In older `httplib`, SSL connections were not handled correctly and
  will have issues with proxy servers. Also, keep alive directives were
  not available back then, which is probably necessary to implement
  HTTP_C service correctly.
* Another reason being `httplib` now requires OpenSSL 1.1+ API while
  LibreSSL 2.x provided OpenSSL 1.0 compatible API.
* The bundled LibreSSL has been updated to 3.2.2 so it now provides
  OpenSSL 1.1 compatible API now.
* Also the path hint has been added so that it will find the correct
  path to the CA certs on *nix systems.
* An option is provided so that *nix system distributions/providers can
  use their own SSL implementations when compiling Yuzu/Citra to
  (hopefully) complies with their maintenance guidelines.
* LURLParse is also removed since `httplib` can handle
  `scheme:host:port` string itself now.
2022-01-13 19:32:50 -07:00
bunnei 67f1e4111d
Merge pull request #5792 from vitor-k/username
service/frd: return cfg username on GetMyScreenName
2022-01-08 02:01:31 -08:00
bunnei c01dca4920
Merge pull request #5901 from vitor-k/subregion
cfg: use a default subregion based on the country
2022-01-08 02:00:15 -08:00
SachinVin 666787bf4d core/frontend/emu_window: return true when TouchPressed is consumed 2021-12-18 16:52:24 +05:30
SutandoTsukai181 60235827c5 Add Cardboard VR
Based on hrydgard/ppsspp/pull/12449
2021-12-18 16:52:24 +05:30
bunnei da3a9bfc96 core: Reset cpu_core after kernel.
- Fixes a crash on Android.

core.cpp: check if video_dumper is created before trying to shut it down
2021-12-18 16:52:21 +05:30
bunnei b7a156f7c8 android: frontend: Track screen layout separately for orientation.
android framebuffer
2021-12-18 16:52:17 +05:30
bunnei e8f57d7e3c android: frontend: Add MobileLandscape layout profile for mobile devices. 2021-12-18 00:06:16 +05:30
BreadFish64 5a8c6990bf memory: fix memory leak related to un-freed shared memory 2021-12-18 00:06:15 +05:30
SachinVin a515df01db
savestate.cpp: log the savestate revision on revision mismatch (#5894) 2021-12-12 20:22:50 +05:30
Vitor Kiguchi f0fd776fa2 cfg: use a default subregion based on the country 2021-12-10 16:55:20 +01:00
SachinVin 6183b5d76c
Merge pull request #5823 from SachinVin/dyn
Android: Backport easy stuff
2021-10-03 18:58:20 +05:30
bunnei a2109933f6 (zhaowenlan1779) android/applets: Implement Mii Selector
See merge request CitraInternal/citra-android!33
# Conflicts:
#	src/android/app/src/main/jni/CMakeLists.txt
#	src/android/app/src/main/jni/id_cache.cpp
#	src/android/app/src/main/jni/native.cpp
#	src/android/app/src/main/res/values/strings.xml

gl_shader_gen.cpp: Fix separable shaders when GL_EXT_clip_cull_distance is not supported
2021-10-02 16:38:32 +05:30
bunnei 3e6fce7553 core/CmakeLists.txt: correct mic.h order 2021-09-29 22:50:55 +05:30
SachinVin a1b4daa9d4
core.h: remove nodiscard for SendSignal (#5837)
We use this in four places and discard the result everywhere
2021-09-06 21:27:11 +05:30
fadillzzz 89410c164a
fix(bps): Fixes BPS patch changing target size (#5829) 2021-08-22 15:24:35 -05:00
James Rowe 9f4501aceb Perf: Remove more breakpoint checking in the interpreter. Move filtering earlier in the logging chain 2021-07-24 23:36:56 +05:30
Pengfei f85bde3ca3
Replace &vec[0] with vec.data()
When the vector is empty, using `&vec[0]` involves undefined behaviour. While that works fine most of the time, Flatpak builds aborted on a failed `__builtin_expect`.

I searched for such occurences across the codebase with the regex `(?<!&)&\w+\[0\]` and fixed those that would potentially cause issues.
2021-07-14 17:01:14 +08:00
Vitor Kiguchi 3e71d68b94 service/frd: don't use global system
address review comments + clang format
2021-07-07 16:45:13 -03:00
Pengfei Zhu 5241032fc5
Merge pull request #5382 from zhaowenlan1779/uds-2
service/nwm_uds: Various improvements/corrections
2021-06-22 20:40:18 +08:00
Vitor Kiguchi 6d99b5d332 service/frd: return cfg username on GetMyScreenName
as some games apparently use this for the multiplayer display name
2021-06-05 21:53:16 -03:00
Ben 7325f58763
NWM_UDS: implement disconnect_reason and EjectClient (#5331)
* NWM_UDS: Stub disconnect_reason and EjectClient

* addressed review comments

* fix additional semicolon

Co-authored-by: Valentin Vanelslande <vvanelslandedev@gmail.com>

Co-authored-by: Valentin Vanelslande <vvanelslandedev@gmail.com>
2021-05-16 10:41:54 +02:00
Max Fedotov a2f34ea82b
gcc 11 compatibility fix (suggestion) (#5778)
Fixes missing include and runtime variable in offsetof

* gcc 11 compatibility fix

* Revert "gcc 11 compatibility fix"

This reverts commit bf5711d944.

* gcc 11 compatibility fix (with pointer math)

* Don't require pointers for framebuffer field math

* Code style fix (clang-format)
2021-05-10 22:10:29 -05:00
bunnei 9ff97270cf
Merge pull request #5501 from FearlessTobi/port-1064-3948
Port yuzu-emu/yuzu#1064 and yuzu-emu/yuzu#3948: Changes to Telemetry and CPU feature detection
2021-04-23 22:58:08 -07:00
bunnei 24086d05bb
Merge pull request #5471 from vitor-k/misc
Fix some warnings and some small changes
2021-04-23 22:54:00 -07:00
Daniel Méndez 3be52f818a file_util: Add a function to update the user path
Added a default value when sdmc and nand are empty
2021-04-17 23:48:30 +02:00
Daniel Méndez 49c0766b73 settings: Save and load NAND/SD dirs from config 2021-04-08 00:20:52 +02:00
zhupengfei 996ca25a2e
core_timing: Lock CoreTiming event queue while deserializing
To handle those classic asymmetric constructor/destructor side effects
2021-02-08 11:25:39 +08:00
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 e60e20666e
citra_qt: Allow enabling frame advance before emulation start
Effectively allows starting emulation as paused.
2021-02-08 11:25:37 +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 113e0c7331
citra_qt: Rebuilt movie frontend
This is completely rebuilt, in order to allow setting author, displaying movie metadata, and toggling read-only mode.

The UX is changed to more closely match other emulators' behaviour. Now you can only record/play from start/reset (In the future, we might want to introduce 'record from savestate')

Also fixed a critical bug where movie file can be corrupted when ending the recording while game is still running.
2021-02-08 11:25:31 +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
Marshall Mohror a1d6396a90
Merge pull request #5695 from FearlessTobi/port-4942
Port yuzu-emu/yuzu#4942: "core: Make use of [[nodiscard]] with the System class"
2021-02-04 10:50:00 -06:00
Marshall Mohror 2539215f18
Merge pull request #5660 from FearlessTobi/port-5166
Port yuzu-emu/yuzu#5166: "core: Remove unnecessary enum casts in log calls"
2021-02-03 10:19:38 -06:00
xperia64 8df502a688
Implement APT command 0x0103 (#5478)
* WIP implement apt 0x0103

* Update src/core/hle/service/apt/apt.cpp

Co-authored-by: Pengfei Zhu <zhupf321@gmail.com>

* Names

Co-authored-by: Pengfei Zhu <zhupf321@gmail.com>
2021-01-26 15:27:52 -05:00
FearlessTobi 8d2e28cf76 core: Make use of [[nodiscard]] with the System class
Given this is a central class, we should flag cases where the return
value of some functions not being used is likely a bug.

Co-Authored-By: LC <712067+lioncash@users.noreply.github.com>
2021-01-17 19:05:43 +01:00
Pengfei Zhu 7c6d7905a4
Merge pull request #5670 from FearlessTobi/port-5277
Port yuzu-emu/yuzu#5277: "general: Fix various spelling errors"
2021-01-09 22:10:27 +08:00