aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Ryujinx.Audio.Backends.SDL2/SDL2HardwareDeviceDriver.cs12
-rw-r--r--Ryujinx.Audio.Backends.SDL2/SDL2HardwareDeviceSession.cs4
-rw-r--r--Ryujinx.SDL2.Common/Ryujinx.SDL2.Common.csproj2
-rw-r--r--Ryujinx.SDL2.Common/SDL2Driver.cs5
4 files changed, 4 insertions, 19 deletions
diff --git a/Ryujinx.Audio.Backends.SDL2/SDL2HardwareDeviceDriver.cs b/Ryujinx.Audio.Backends.SDL2/SDL2HardwareDeviceDriver.cs
index 2c1baa47..13062ad1 100644
--- a/Ryujinx.Audio.Backends.SDL2/SDL2HardwareDeviceDriver.cs
+++ b/Ryujinx.Audio.Backends.SDL2/SDL2HardwareDeviceDriver.cs
@@ -96,23 +96,13 @@ namespace Ryujinx.Audio.Backends.SDL2
};
}
- // TODO: Fix this in SDL2-CS.
- [DllImport("SDL2", EntryPoint = "SDL_OpenAudioDevice", CallingConvention = CallingConvention.Cdecl)]
- private static extern uint SDL_OpenAudioDevice_Workaround(
- IntPtr name,
- int iscapture,
- ref SDL_AudioSpec desired,
- out SDL_AudioSpec obtained,
- uint allowed_changes
- );
-
internal static uint OpenStream(SampleFormat requestedSampleFormat, uint requestedSampleRate, uint requestedChannelCount, uint sampleCount, SDL_AudioCallback callback)
{
SDL_AudioSpec desired = GetSDL2Spec(requestedSampleFormat, requestedSampleRate, requestedChannelCount, sampleCount);
desired.callback = callback;
- uint device = SDL_OpenAudioDevice_Workaround(IntPtr.Zero, 0, ref desired, out SDL_AudioSpec got, 0);
+ uint device = SDL_OpenAudioDevice(IntPtr.Zero, 0, ref desired, out SDL_AudioSpec got, 0);
if (device == 0)
{
diff --git a/Ryujinx.Audio.Backends.SDL2/SDL2HardwareDeviceSession.cs b/Ryujinx.Audio.Backends.SDL2/SDL2HardwareDeviceSession.cs
index ceb6e706..843de01a 100644
--- a/Ryujinx.Audio.Backends.SDL2/SDL2HardwareDeviceSession.cs
+++ b/Ryujinx.Audio.Backends.SDL2/SDL2HardwareDeviceSession.cs
@@ -71,10 +71,6 @@ namespace Ryujinx.Audio.Backends.SDL2
}
}
- // TODO: Add this variant with pointer to SDL2-CS.
- [DllImport("SDL2", EntryPoint = "SDL_MixAudioFormat", CallingConvention = CallingConvention.Cdecl)]
- private static extern unsafe uint SDL_MixAudioFormat(IntPtr dst, IntPtr src, ushort format, uint len, int volume);
-
private unsafe void Update(IntPtr userdata, IntPtr stream, int streamLength)
{
Span<byte> streamSpan = new Span<byte>((void*)stream, streamLength);
diff --git a/Ryujinx.SDL2.Common/Ryujinx.SDL2.Common.csproj b/Ryujinx.SDL2.Common/Ryujinx.SDL2.Common.csproj
index 50b1ec2f..16eb3b3c 100644
--- a/Ryujinx.SDL2.Common/Ryujinx.SDL2.Common.csproj
+++ b/Ryujinx.SDL2.Common/Ryujinx.SDL2.Common.csproj
@@ -5,7 +5,7 @@
</PropertyGroup>
<ItemGroup>
- <PackageReference Include="Ryujinx.SDL2-CS" Version="2.0.15-build11" />
+ <PackageReference Include="Ryujinx.SDL2-CS" Version="2.0.17-build18" />
</ItemGroup>
<ItemGroup>
diff --git a/Ryujinx.SDL2.Common/SDL2Driver.cs b/Ryujinx.SDL2.Common/SDL2Driver.cs
index cc8e7614..944f8e57 100644
--- a/Ryujinx.SDL2.Common/SDL2Driver.cs
+++ b/Ryujinx.SDL2.Common/SDL2Driver.cs
@@ -56,9 +56,8 @@ namespace Ryujinx.SDL2.Common
SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE, "1");
SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_PS5_RUMBLE, "1");
SDL_SetHint(SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS, "1");
- // TODO: Add this in nuget package once SDL2 2.0.15 hit stable release.
- SDL_SetHint("SDL_JOYSTICK_HIDAPI_SWITCH_HOME_LED", "0");
- SDL_SetHint("SDL_JOYSTICK_HIDAPI_JOY_CONS", "1");
+ SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_SWITCH_HOME_LED, "0");
+ SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_JOY_CONS, "1");
if (SDL_Init(SdlInitFlags) != 0)
{