mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-02-09 13:24:01 +00:00
Some fixes for msys2/mingw build
This commit is contained in:
parent
4cfeadeb6e
commit
64406419c1
4 changed files with 14 additions and 9 deletions
|
@ -22,6 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
#include "DSQ.h"
|
#include "DSQ.h"
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <SDL.h>
|
#include <SDL.h>
|
||||||
|
#include <SDL_main.h>
|
||||||
|
|
||||||
#ifdef BBGE_BUILD_WINDOWS
|
#ifdef BBGE_BUILD_WINDOWS
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
|
|
|
@ -61,18 +61,21 @@ void initIcon(void *screen)
|
||||||
HINSTANCE handle = ::GetModuleHandle(NULL);
|
HINSTANCE handle = ::GetModuleHandle(NULL);
|
||||||
if(!icon_windows)
|
if(!icon_windows)
|
||||||
icon_windows = ::LoadIcon(handle, "icon");
|
icon_windows = ::LoadIcon(handle, "icon");
|
||||||
SDL_SysWMinfo wminfo;
|
if(icon_windows)
|
||||||
SDL_VERSION(&wminfo.version)
|
{
|
||||||
|
SDL_SysWMinfo wminfo;
|
||||||
|
SDL_VERSION(&wminfo.version)
|
||||||
|
|
||||||
#ifdef BBGE_BUILD_SDL2
|
#ifdef BBGE_BUILD_SDL2
|
||||||
SDL_GetWindowWMInfo((SDL_Window*)screen, &wminfo);
|
SDL_GetWindowWMInfo((SDL_Window*)screen, &wminfo);
|
||||||
HWND hwnd = wminfo.info.win.window;
|
HWND hwnd = wminfo.info.win.window;
|
||||||
#else
|
#else
|
||||||
SDL_GetWMInfo(&wminfo);
|
SDL_GetWMInfo(&wminfo);
|
||||||
HWND hwnd = wminfo.window;
|
HWND hwnd = wminfo.window;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
::SetClassLongPtr(hwnd, -14, (LONG) icon_windows); // -14 is GCL_HICON (32bit) or GCLP_HICON (64bit)
|
::SetClassLongPtr(hwnd, -14, (LONG)(uintptr_t)icon_windows); // -14 is GCL_HICON (32bit) or GCLP_HICON (64bit)
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -260,7 +260,7 @@ public:
|
||||||
|
|
||||||
bool cull;
|
bool cull;
|
||||||
float updateCull;
|
float updateCull;
|
||||||
unsigned layer;
|
int layer;
|
||||||
|
|
||||||
InterpolatedVector *positionSnapTo;
|
InterpolatedVector *positionSnapTo;
|
||||||
|
|
||||||
|
|
|
@ -375,7 +375,8 @@ IF(CMAKE_COMPILER_IS_GNUCC)
|
||||||
# It doesn't seem to work well, and it adds bulk to the binary.
|
# It doesn't seem to work well, and it adds bulk to the binary.
|
||||||
CHECK_C_COMPILER_FLAG("-fno-stack-protector" AQUARIA_GCC_HAS_STACKPROT)
|
CHECK_C_COMPILER_FLAG("-fno-stack-protector" AQUARIA_GCC_HAS_STACKPROT)
|
||||||
IF(AQUARIA_GCC_HAS_STACKPROT)
|
IF(AQUARIA_GCC_HAS_STACKPROT)
|
||||||
ADD_DEFINITIONS(-fno-stack-protector)
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -fno-stack-protector")
|
||||||
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -fno-stack-protector")
|
||||||
ENDIF(AQUARIA_GCC_HAS_STACKPROT)
|
ENDIF(AQUARIA_GCC_HAS_STACKPROT)
|
||||||
|
|
||||||
# -O3 breaks on some GCC/MinGW versions, make sure CMake does not set this as default.
|
# -O3 breaks on some GCC/MinGW versions, make sure CMake does not set this as default.
|
||||||
|
|
Loading…
Add table
Reference in a new issue