OSDN Git Service

[Qt][HOMEBREW] Fix not detected SDL at configuration of Qt::Gamepad.
authorK.Ohta <whatisthis.sowhat@gmail.com>
Mon, 26 Aug 2019 14:14:09 +0000 (23:14 +0900)
committerK.Ohta <whatisthis.sowhat@gmail.com>
Mon, 26 Aug 2019 14:14:09 +0000 (23:14 +0900)
source/tool/cross-build/Qt5.12/config_sample.5.12.sh
source/tool/cross-build/Qt5.12/make_cross.sh
source/tool/cross-build/Qt5.12/patches/000_qtgamepad_config.test.mingw32.patch [new file with mode: 0644]

index 416e9bd..7f4d5ef 100755 (executable)
@@ -47,6 +47,7 @@ export PKG_CONFIG_SYSROOT_DIR=/usr/local/i586-mingw-msvc/pkgconfig
            -L $VULKAN_SDK/lib \
            -device-option SDL_PREFIX=$SDK_PREFIX/SDL/i686-w64-mingw32 \
            -device-option SDL2_PREFIX=$SDK_PREFIX/SDL/i686-w64-mingw32 \
+           -device-option LIBS_SDL2+=SDLmain \
            -device-option ICU_PREFIX=$SDK_PREFIX/icu \
            -device-option OPENGL_ES2_PREFIX=$SDK_PREFIX/Angle \
            -device-option VULKAN_PREFIX=$VULKAN_SDK \
index 7a72b7a..573a18e 100755 (executable)
@@ -7,4 +7,4 @@ export PATH="$PATH:\
             "
 export PKG_CONFIG_LIBDIR=/usr/i686-w64-mingw32/lib
 
-make CROSS_COMPILE=i686-w64-mingw32- PKG_CONFIG_LIBDIR=/usr/i686-w64-mingw32/lib $@ 2>&1 
+taskset 0xfbe make CROSS_COMPILE=i686-w64-mingw32- PKG_CONFIG_LIBDIR=/usr/i686-w64-mingw32/lib $@ 2>&1 
diff --git a/source/tool/cross-build/Qt5.12/patches/000_qtgamepad_config.test.mingw32.patch b/source/tool/cross-build/Qt5.12/patches/000_qtgamepad_config.test.mingw32.patch
new file mode 100644 (file)
index 0000000..9ea113a
--- /dev/null
@@ -0,0 +1,24 @@
+--- main.cpp.orig      2019-08-26 22:51:44.229281866 +0900
++++ main.cpp   2019-08-26 22:56:32.169706856 +0900
+@@ -34,6 +34,8 @@
+ **
+ ****************************************************************************/
++#include <windows.h>
++#include <tchar.h>
+ #include <SDL.h>
+ #include <SDL_gamecontroller.h>
+@@ -43,3 +45,12 @@
+     SDL_Quit();
+     return 0;
+ }
++
++int WINAPI WinMain(
++                   HINSTANCE hCurInst,
++                   HINSTANCE hPrevInst,
++                   LPSTR lpsCmdLine,
++                   int nCmdShow)
++{
++  return  main(0, NULL);
++}