Skip to content

Commit

Permalink
Add libsdl2 patch so it actually builds
Browse files Browse the repository at this point in the history
  • Loading branch information
qwerty12 committed May 1, 2022
1 parent 34a111a commit 67a6f73
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
16 changes: 16 additions & 0 deletions packages/libsdl2-0001-wgl-mingw64.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
diff --git a/src/joystick/windows/SDL_windows_gaming_input.c b/src/joystick/windows/SDL_windows_gaming_input.c
index 8b552bb..c1608a7 100644
--- a/src/joystick/windows/SDL_windows_gaming_input.c
+++ b/src/joystick/windows/SDL_windows_gaming_input.c
@@ -34,6 +34,11 @@
#include <cfgmgr32.h>
#include <roapi.h>

+#ifdef __MINGW32__
+#define __FIReference_1_int __FIReference_1_INT32
+#define __FIReference_1_int_get_Value __FIReference_1_INT32_get_Value
+#define __FIReference_1_int_Release __FIReference_1_INT32_Release
+#endif

struct joystick_hwdata
{
1 change: 1 addition & 0 deletions packages/libsdl2.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ ExternalProject_Add(libsdl2
URL https://www.libsdl.org/release/SDL2-2.0.20.tar.gz
URL_HASH SHA256=c56aba1d7b5b0e7e999e4a7698c70b63a3394ff9704b5f6e1c57e0c16f04dd06
DOWNLOAD_DIR ${SOURCE_LOCATION}
PATCH_COMMAND patch -p1 < ${CMAKE_CURRENT_SOURCE_DIR}/libsdl2-0001-wgl-mingw64.patch
CONFIGURE_COMMAND ${EXEC} <SOURCE_DIR>/configure
--host=${TARGET_ARCH}
--prefix=${MINGW_INSTALL_PREFIX}
Expand Down

0 comments on commit 67a6f73

Please sign in to comment.