* common/thread: Remove unused functions
Many of these functions are carried over from Dolphin (where they aren't
used anymore). Given these have no use (and we really shouldn't be
screwing around with OS-specific thread scheduler handling from the
emulator, these can be removed.
The function for setting the thread name is left, however, since it can
have debugging utility usages.
* input_common/sdl: Use a type alias to shorten declaration of GetPollers
Just makes the definitions a little bit more tidy.
* input_common/sdl: Correct return values within implementations of GetPollers()
In both cases, we weren't actually returning anything, which is
undefined behavior.
* yuzu/debugger/graphics_surface: Fill in missing surface format listings
Fills in the missing surface types that were marked as unknown. The
order corresponds with the TextureFormat enum within
video_core/texture.h.
We also don't need to all of these strings as translatable (only the
first string, as it's an English word).
* yuzu/debugger/graphics_surface: Clean up connection overload deduction
We can utilize qOverload with the signal connections to make the
function deducing a little less ugly.
* yuzu/debugger/graphics_surface: Tidy up SaveSurface
- Use QStringLiteral where applicable.
- Use const where applicable
- Remove unnecessary precondition check (we already assert the pixbuf
being non null)
* yuzu/debugger/graphics_surface: Display error messages for file I/O errors
* core: Add missing override specifiers where applicable
Applies the override specifier where applicable. In the case of
destructors that are defaulted in their definition, they can
simply be removed.
This also removes the unnecessary inclusions being done in audin_u and
audrec_u, given their close proximity.
* kernel/thread: Make parameter of GetWaitObjectIndex() const qualified
The pointed to member is never actually modified, so it can be made
const.
* kernel/thread: Avoid sign conversion within GetCommandBufferAddress()
Previously this was performing a u64 + int sign conversion. When dealing
with addresses, we should generally be keeping the arithmetic in the
same signedness type.
This also gets rid of the static lifetime of the constant, as there's no
need to make a trivial type like this potentially live for the entire
duration of the program.
* kernel/codeset: Make CodeSet's memory data member a regular std::vector
The use of a shared_ptr is an implementation detail of the VMManager
itself when mapping memory. Because of that, we shouldn't require all
users of the CodeSet to have to allocate the shared_ptr ahead of time.
It's intended that CodeSet simply pass in the required direct data, and
that the memory manager takes care of it from that point on.
This means we just do the shared pointer allocation in a single place,
when loading modules, as opposed to in each loader.
* kernel/wait_object: Make ShouldWait() take thread members by pointer-to-const
Given this is intended as a querying function, it doesn't make sense to
allow the implementer to modify the state of the given thread.
Since C++17, the introduction of deduction guides for locking facilities
means that we no longer need to hardcode the mutex type into the locks
themselves, making it easier to switch mutex types, should it ever be
necessary in the future.
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.
Any SDL invocation can call the even callback on the same thread, which can call GetSDLJoystickBySDLID and eventually cause double lock on joystick_map_mutex. To avoid this, lock guard should be placed as closer as possible to the object accessing code, so that any SDL invocation is with the mutex unlocked
Changes the interface as well to remove any unique methods that
frontends needed to call such as StartJoystickEventHandler by
conditionally starting the polling thread only if the frontend hasn't
started it already. Additionally, moves all global state into a single
SDLState class in order to guarantee that the destructors are called in
the proper order
* use SDL_PollEvent instead of SDL_JoystickUpdate
Register hot plugged controller by GUID if they were configured in a previous session
* Move SDL_PollEvent into its own thread
* Don't store SDLJoystick pointer in Input Device; Get pointer on each GetStatus call
* Fix that joystick_list gets cleared after SDL_Quit
* Add VirtualJoystick for InputDevices thats never nullptr
* fixup! Add VirtualJoystick for InputDevices thats never nullptr
* fixup! fixup! Add VirtualJoystick for InputDevices thats never nullptr
* Remove SDL_GameController, make SDL_Joystick* unique_ptr
* fixup! Remove SDL_GameController, make SDL_Joystick* unique_ptr
* Adressed feedback; fixed handling of same guid reconnects
* fixup! Adressed feedback; fixed handling of same guid reconnects
* merge the two joystick_lists into one
* make SDLJoystick a member of VirtualJoystick
* fixup! make SDLJoystick a member of VirtualJoystick
* fixup! make SDLJoystick a member of VirtualJoystick
* fixup! fixup! make SDLJoystick a member of VirtualJoystick
These functions include reloading udp client, testing communication and configuring calibration. I also added a function to common/thread.h to use WaitFor.
An implementation of the cemuhook motion/touch protocol, this adds the
ability for users to connect several different devices to citra to send
direct motion and touch data to citra.
* Add tilt clamp setting
* Updated `clamp` to use variable
* Fixed a minor typo
* Include possibly necessary header
* expose setting in sdl2
* expose setting in qt
* incorporate @wwylele 's suggestion in sdl2
* Incorporate @wwylele 's suggestion (?)
Please review the code, this is the first time I'm working with `ParamPackage`s so I may just screw up the code.
* Forgot to change in qt
* Fixed an fatal error
* fixed clang format error
* remove the old setting
* fixed typos cusing errors
* removed old setting
* Changed init style
* Forgot this one
* Removed unnecessary header inclusion
* Update config.cpp
* update qt-config
* Update motion_emu.cpp
* Update motion_emu.cpp
* Add infrastructure to poll joystick input and get ParamPackages
* Generalize the callbacks in configure_input.cpp and add buttons for analog sticks
* Use the polling classes in the input dialog
* Fix includes
* Formatting fix
* Include real header instead of forward declaring, to fix compiler error
* Split up pair and add deadzone for joystick configuration
* Pass ParamPackages by reference to callback
* fix formatting
* getPollers -> GetPollers
* Add forward declarations and simplify code a bit
* Update joysticks before opening them
* Fix mixup between joystick IDs and device indices