Skip to content

Commit

Permalink
Update to SDL 2.30.6
Browse files Browse the repository at this point in the history
  • Loading branch information
Mailaender committed Aug 3, 2024
1 parent 4b6aad1 commit c62507e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-natives.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Build native dependencies (SDL2)
# Change SDL2 version based on https://github.com/libsdl-org/SDL/releases, but remember to check what SDL2 version SDL2-CS targets.
# Change Chromium revision numbers based on https://chromium.woolyss.com/download/.
env:
SDL2_VERSION: 2.0.22 # Make sure this matches the version mentioned in the description in the .nuspec file.
SDL2_VERSION: 2.30.6 # Make sure this matches the version mentioned in the description in the .nuspec file.
CHROMIUM_BUILD_x86: 1136315
CHROMIUM_BUILD_x64: 1136314

Expand Down
2 changes: 1 addition & 1 deletion OpenRA-SDL2-CS.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>
This is a version of SDL2-CS modified and packaged for OpenRA.
The package includes the C# wrapper (SDL2-CS) and the native binaries for SDL2 and targets version 2.0.22 of the native project.
The package includes the C# wrapper (SDL2-CS) and the native binaries for SDL2 and targets version 2.30.6 of the native project.
</description>
<copyright>
- Copyright (c) 2013-2021 Ethan Lee
Expand Down
18 changes: 13 additions & 5 deletions src/SDL2.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#region License
/* SDL2# - C# Wrapper for SDL2
*
* Copyright (c) 2013-2021 Ethan Lee.
* Copyright (c) 2013-2024 Ethan Lee.
*
* This software is provided 'as-is', without any express or implied warranty.
* In no event will the authors be held liable for any damages arising from
Expand Down Expand Up @@ -1913,6 +1913,14 @@ public static extern void SDL_GetWindowSize(
out int h
);

/* window refers to an SDL_Window* */
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void SDL_GetWindowSizeInPixels(
IntPtr window,
out int w,
out int h
);

/* IntPtr refers to an SDL_Surface*, window to an SDL_Window* */
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr SDL_GetWindowSurface(IntPtr window);
Expand Down Expand Up @@ -3067,7 +3075,7 @@ IntPtr dstrect

/* renderer refers to an SDL_Renderer*, texture to an SDL_Texture* */
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_RenderCopyEx(
public static extern int SDL_RenderCopyExF(
IntPtr renderer,
IntPtr texture,
ref SDL_Rect srcrect,
Expand All @@ -3083,7 +3091,7 @@ SDL_RendererFlip flip
* This overload allows for IntPtr.Zero (null) to be passed for srcrect.
*/
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_RenderCopyEx(
public static extern int SDL_RenderCopyExF(
IntPtr renderer,
IntPtr texture,
IntPtr srcrect,
Expand Down Expand Up @@ -8928,8 +8936,8 @@ out int pct
[StructLayout(LayoutKind.Sequential)]
public struct SDL_Locale
{
IntPtr language;
IntPtr country;
public IntPtr language; /* char* */
public IntPtr country; /* char* */
}

/* IntPtr refers to an SDL_Locale*.
Expand Down

0 comments on commit c62507e

Please sign in to comment.