Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to SDL 2.30.6 #16

Merged
merged 1 commit into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .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 Expand Up @@ -48,7 +48,7 @@ jobs:

macos:
name: macOS (x64 + arm64)
runs-on: macos-11
runs-on: macos-12
steps:
- name: Setup Dependencies
run: |
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
Loading