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.
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.
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)
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.
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.
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.
* Update deps.sh
GitHub's virtual environment provides 7zip and llvm by default, so brew may fail to install them as another version is already installed
* Use || true to ignore brew installation errors
Allocating new textures has fairly high driver overhead.
We can avoid some of this by reusing the textures from destroyed surfaces since the game will probably create more textures with the same dimensions and format.
Some games (e.g. Pilotwings Resort) create many surfaces that are invalidated quickly but were never removed.
This occasionally lead to large lag spikes due to high lookup times and other data structure management overhead.
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>
setMargin() has been deprecated since Qt 5, and replaced with
setContentsMargins(). We can move over to setContentsMargins() to stay
forward-compatible with Qt 6.0.
Co-Authored-By: LC <712067+lioncash@users.noreply.github.com>
I made a request on the Xbyak issue tracker to allow some constructors
to be constexpr in order to avoid static constructors from needing to
execute for some of our register constants.
This request was implemented, so this updates Xbyak so that we can make
use of it.
Previously core itself was the library containing the code to gather
common information (build info, CPU info, and OS info), however all of
this isn't core-dependent and can be moved to the common code and use
the common interfaces. We can then just call those functions from the
core instead.
This will allow replacing our CPU detection with Xbyak's which has
better detection facilities than ours. It also keeps more
architecture-dependent code in common instead of core.
Saves UISettings and Settings when booting a guest. Moves updating
UISettings::values from GMainWindow::closeEvent into its own function,
then reuses it in GMainWindow::BootGame.
Co-Authored-By: lat9nq <22451773+lat9nq@users.noreply.github.com>
* Look at direction of analog axis travel instead of instantaneous sample
* Clang-format
* Use map count, use unordered_map
* Improve digital vs. true analog axis heuristics
* Implement the basics of controller auto mapping. From testing doesn't currenlty work.
Opening the controller requires the device index, but it is only known and guaranteed
at boot time or when a controller is connected.
* Use the SDL_INIT_GAMECONTROLLER flag to initialize the controller
subsystem. It automatically initializes the joystick subsystem too,
so SDL_INIT_JOYSTICK is not needed.
* Implement the SDLGameController class to handle open game controllers.
Based on the SDLJoystick implementation.
* Address review comments
* Changes SDLJoystick and SDLGameController to use a custom default
constructible destructor, to improve readability. The only deleters
used previously were SDL_JoystickClose and SDL_GameControllerClose,
respectively, plus null lambdas. Given that both SDL functions
accept null pointers with just an early return, this should be
functionally the same.
with just an early return
* warn the user when a controller mapping is not found
* Get axis direction and threshold from SDL_ExtendedGameControllerBind
* Reject analog bind if it's not axis, for the couple of examples present in SDL2.0.10's db.
Also add SDL_CONTROLLER_BINDTYPE_NONE for the button bind switch, with a better log message.
* sdl_impl.cpp: Log the error returned by SDL_GetError upon failure to open joystick
* sdl: only use extended binding on SDL2.0.6 and up
* sdl_impl.cpp: minor changes