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
Try fixing macos build.
2to3 from 2.7 is not really used and is interfering with the
installation of Python 3.9, on which one of ffmpeg's dependencies
depends.
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>
fmt now automatically prints the numeric value of an enum class member by default, so we don't need to use casts any more.
Reduces the line noise in our code a bit.
Co-Authored-By: LC <712067+lioncash@users.noreply.github.com>
Conversions from void* to the proper data type are well-defined and
supported by static_cast. We don't need to use reinterpret_cast here.
Co-Authored-By: LC <712067+lioncash@users.noreply.github.com>
Co-authored-by: LC <712067+lioncash@users.noreply.github.com>
* game_list: Eliminate redundant argument copies
Several functions can be taken by const reference to avoid copies
Co-Authored-By: LC <712067+lioncash@users.noreply.github.com>
* game_list: Make game list function naming consistent
Makes the naming consistent with the rest of the functions that are
present.
Co-Authored-By: LC <712067+lioncash@users.noreply.github.com>
Co-authored-by: Lioncash <mathew1800@gmail.com>
Co-authored-by: LC <712067+lioncash@users.noreply.github.com>
Two of the members of the MicroProfileThreadLog contains two std::atomic
instances. Given these aren't trivially-copyable types, we shouldn't be
memsetting the structure, given implementation details can contain other
members within it.
To avoid potential undefined behavior on platforms, we can use aggregate
initialization to zero out the members while still having well-defined
behavior.
While we're at it we can also silence some sign conversion warnings.
Co-authored-by: Lioncash <mathew1800@gmail.com>
The current inconsistency can result in a developer unintentionally
creating a crash when using UNIMPLEMENTED_MSG, if they're only
familiar with UNIMPLEMENTED. The two macros shouldn't have such
wildly different behaviors.