In cases where the size is not a known constant when inlining, AlignUp<std::size_t> currently generates two 64-bit div instructions.
This generates one div and a cmov which is significantly cheaper.
Some of the classes in this file already do this, so we can apply this
to the other ones to be consistent.
Allows these classes to play nicely and not churn copies when used with
standard containers or any other API that makes use of
std::move_if_noexcept.
* Change "Toggle Speed Limit" to toggle between 100% and a custom value
This will change the shortcut for "Toggle Speed Limit" to make it swap between 100% and the value of "Limit Speed Percent" in the config. Old functionality is still there, but renamed to "Unthrottle".
* Complete reimplementation of the function
* Fix something that didn't get saved correctly
* Fix missing indentation
* Rewrite to keep only a single QSpinBox
* Second rewrite
* set Unthrottled to 0 in the Qspinbox
* Hotkey for Unthrottle
* minor improvements to the design
* Apply suggestions from code review
Co-authored-by: Ben <bene_thomas@web.de>
* Default slider values
* clang-format fixes
* Prevent the speed slider from changing size
...when an element in its row has variable width.
* Change "Game Speed" to "Emulation Speed"
* Apply suggestions from code review
`game_speed` to` emulation_speed`
Co-authored-by: Valentin Vanelslande <vvanelslandedev@gmail.com>
* Fix for QSliders
* Revert "Prevent the speed slider from changing size"
This reverts commit ddaca2004484f1e024f49d2e6dc99ef5e261f64d.
* clang-format
...doesn't seem to stick to a choice
* Fix 2 for QSliders
Co-authored-by: B3n30 <benediktthomas@gmail.com>
Co-authored-by: Ben <bene_thomas@web.de>
Co-authored-by: Valentin Vanelslande <vvanelslandedev@gmail.com>
We can adjust the API to allow std::size_t indices, which simplifies
operating with standard container types. It also prevents truncation
warnings from occurring in these cases as well.
* archive: Make use of std::pair for OpenFileFromArchive
The tuple only makes use of two elements, so we can use a pair to
simplify the number of underlying template instantiations that need to
be done, while also simplifying the surrounding code.
* archive: Simplify MakeResult calls
MakeResult can deduce the contained result type based off the type of
the variable being passed to it, so explicitly specifying it is a little
verbose.
* Avoid deadlock when stopping video dumping
* Use static_cast, make quit atomic
* One more atomic load
* Use suggested lock instead of atomic
* Fix locking