mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-12-17 22:36:58 +00:00
misc: Replace references to IntPtr/UIntPtr with nint/nuint + code cleanups.
This commit is contained in:
parent
a09d314817
commit
dfb4854d19
172 changed files with 902 additions and 914 deletions
|
|
@ -71,11 +71,11 @@ namespace Ryujinx.Input.SDL2
|
|||
|
||||
public GamepadFeaturesFlag Features { get; }
|
||||
|
||||
private IntPtr _gamepadHandle;
|
||||
private nint _gamepadHandle;
|
||||
|
||||
private float _triggerThreshold;
|
||||
|
||||
public SDL2Gamepad(IntPtr gamepadHandle, string driverId)
|
||||
public SDL2Gamepad(nint gamepadHandle, string driverId)
|
||||
{
|
||||
_gamepadHandle = gamepadHandle;
|
||||
_buttonsUserMapping = new List<ButtonMappingEntry>(20);
|
||||
|
|
@ -127,11 +127,11 @@ namespace Ryujinx.Input.SDL2
|
|||
|
||||
protected virtual void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && _gamepadHandle != IntPtr.Zero)
|
||||
if (disposing && _gamepadHandle != nint.Zero)
|
||||
{
|
||||
SDL_GameControllerClose(_gamepadHandle);
|
||||
|
||||
_gamepadHandle = IntPtr.Zero;
|
||||
_gamepadHandle = nint.Zero;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -187,7 +187,7 @@ namespace Ryujinx.Input.SDL2
|
|||
{
|
||||
float* values = stackalloc float[ElementCount];
|
||||
|
||||
int result = SDL_GameControllerGetSensorData(_gamepadHandle, sensorType, (IntPtr)values, ElementCount);
|
||||
int result = SDL_GameControllerGetSensorData(_gamepadHandle, sensorType, (nint)values, ElementCount);
|
||||
|
||||
if (result != 0)
|
||||
return Vector3.Zero;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue