Skip to content

Commit

Permalink
Update bundled MSVC SDL2 to latest release
Browse files Browse the repository at this point in the history
  • Loading branch information
dashodanger committed Nov 5, 2024
1 parent f1b129d commit 05c32fe
Show file tree
Hide file tree
Showing 15 changed files with 11 additions and 7 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,21 +58,21 @@ jobs:
- name: Extract w64devkit
run: ${{github.workspace}}\w64devkit.exe -y
- name: Download SDL2-devel
run: invoke-webrequest https://github.com/libsdl-org/SDL/releases/download/release-2.30.8/SDL2-devel-2.30.8-mingw.zip -outfile ${{github.workspace}}\sdl2-devel.zip
run: invoke-webrequest https://github.com/libsdl-org/SDL/releases/download/release-2.30.9/SDL2-devel-2.30.9-mingw.zip -outfile ${{github.workspace}}\sdl2-devel.zip
- name: Extract SDL2-devel
run: expand-archive -path ${{github.workspace}}\sdl2-devel.zip -destinationpath ${{github.workspace}}
- name: Copy SDL2-devel contents to w64devkit
run: |
robocopy ${{github.workspace}}\SDL2-2.30.8\i686-w64-mingw32 ${{github.workspace}}\w64devkit\i686-w64-mingw32 /s ; if ($lastexitcode -lt 8) { $global:LASTEXITCODE = $null }
robocopy ${{github.workspace}}\SDL2-2.30.8\i686-w64-mingw32 ${{github.workspace}}\w64devkit /s ; if ($lastexitcode -lt 8) { $global:LASTEXITCODE = $null }
robocopy ${{github.workspace}}\SDL2-2.30.9\i686-w64-mingw32 ${{github.workspace}}\w64devkit\i686-w64-mingw32 /s ; if ($lastexitcode -lt 8) { $global:LASTEXITCODE = $null }
robocopy ${{github.workspace}}\SDL2-2.30.9\i686-w64-mingw32 ${{github.workspace}}\w64devkit /s ; if ($lastexitcode -lt 8) { $global:LASTEXITCODE = $null }
- name: Set environment variables and build
run: |
$env:Path = "${{github.workspace}}\w64devkit\bin;" + $env:Path
cmake -B build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_CXX_FLAGS="-isystem ${{github.workspace}}\w64devkit\include" -G "MinGW Makefiles"
cmake --build build --config ${{env.BUILD_TYPE}}
strip ${{github.workspace}}\edge-classic.exe
- name: Copy SDL2 DLL
run: copy-item -path ${{github.workspace}}\SDL2-2.30.8\i686-w64-mingw32\bin\SDL2.dll -destination ${{github.workspace}}
run: copy-item -path ${{github.workspace}}\SDL2-2.30.9\i686-w64-mingw32\bin\SDL2.dll -destination ${{github.workspace}}
- uses: actions/upload-artifact@v4
with:
name: edge-classic-mingw
Expand Down
2 changes: 1 addition & 1 deletion libraries/sdl2/include/SDL2/SDL_audio.h
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,7 @@ extern DECLSPEC int SDLCALL SDL_GetDefaultAudioInfo(char **name,
* frames_ (with stereo output, two samples--left and right--would make a
* single sample frame). This number should be a power of two, and may be
* adjusted by the audio driver to a value more suitable for the hardware.
* Good values seem to range between 512 and 8096 inclusive, depending on
* Good values seem to range between 512 and 4096 inclusive, depending on
* the application and CPU speed. Smaller values reduce latency, but can
* lead to underflow if the application is doing heavy processing and cannot
* fill the audio buffer in time. Note that the number of sample frames is
Expand Down
2 changes: 1 addition & 1 deletion libraries/sdl2/include/SDL2/SDL_stdinc.h
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ typedef uint64_t Uint64;
#define SDL_PRIs64 "I64d"
#elif defined(PRIs64)
#define SDL_PRIs64 PRIs64
#elif defined(__LP64__) && !defined(__APPLE__)
#elif defined(__LP64__) && !defined(__APPLE__) && !defined(__EMSCRIPTEN__)
#define SDL_PRIs64 "ld"
#else
#define SDL_PRIs64 "lld"
Expand Down
2 changes: 1 addition & 1 deletion libraries/sdl2/include/SDL2/SDL_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ typedef struct SDL_version
*/
#define SDL_MAJOR_VERSION 2
#define SDL_MINOR_VERSION 30
#define SDL_PATCHLEVEL 8
#define SDL_PATCHLEVEL 9

/**
* Macro to determine SDL version program was compiled against.
Expand Down
4 changes: 4 additions & 0 deletions libraries/sdl2/include/SDL2/SDL_vulkan.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ extern "C" {
VK_DEFINE_HANDLE(VkInstance)
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSurfaceKHR)

/* Make sure to undef to avoid issues in case of later vulkan include */
#undef VK_DEFINE_HANDLE
#undef VK_DEFINE_NON_DISPATCHABLE_HANDLE

#endif /* !NO_SDL_VULKAN_TYPEDEFS */

typedef VkInstance SDL_vulkanInstance;
Expand Down
Binary file modified libraries/sdl2/lib/x64/SDL2.dll
Binary file not shown.
Binary file modified libraries/sdl2/lib/x64/SDL2.lib
Binary file not shown.
Binary file added libraries/sdl2/lib/x64/SDL2.pdb
Binary file not shown.
Binary file modified libraries/sdl2/lib/x64/SDL2main.lib
Binary file not shown.
Binary file added libraries/sdl2/lib/x64/SDL2test.lib
Binary file not shown.
Binary file modified libraries/sdl2/lib/x86/SDL2.dll
Binary file not shown.
Binary file modified libraries/sdl2/lib/x86/SDL2.lib
Binary file not shown.
Binary file added libraries/sdl2/lib/x86/SDL2.pdb
Binary file not shown.
Binary file modified libraries/sdl2/lib/x86/SDL2main.lib
Binary file not shown.
Binary file added libraries/sdl2/lib/x86/SDL2test.lib
Binary file not shown.

0 comments on commit 05c32fe

Please sign in to comment.