- updated windows build for sdl2
This commit is contained in:
parent
c402509853
commit
92aa2a7e04
|
@ -342,7 +342,7 @@
|
|||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>false</OmitFramePointers>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<AdditionalIncludeDirectories>../../../source/shared_lib/include/graphics;../../../source/shared_lib/include/graphics/gl;../../../source/shared_lib/include/platform;../../../source/shared_lib/include/platform/win32;../../../source/shared_lib/include/sound;../../../source/shared_lib/include/util;../../../source/shared_lib/include/lua;../../../source/shared_lib/include/xml;../../../source/shared_lib/include/xml/rapidxml;../../../source/glest_game/ai;../../../source/glest_game/facilities;../../../source/glest_game/game;../../../source/glest_game/global;../../../source/glest_game/graphics;../../../source/glest_game/gui;../../../source/glest_game/main;../../../source/glest_game/menu;../../../source/glest_game/network;../../../source/glest_game/sound;../../../source/glest_game/type_instances;../../../source/glest_game/types;../../../source/glest_game/world;../../../source/windows_deps_2012/include;../../../source/windows_deps_2012/xerces-c-3.1.1/src;../../../source/windows_deps_2012/SDL-1.2.15/include;../../../source/shared_lib/include/platform/sdl;../../../source/shared_lib/include/sound/openal;../../../source/windows_deps_2012/openal-soft-1.14/include;../../../source/shared_lib/include/platform/posix;../../../source/shared_lib/include/platform/common;../../../source/windows_deps_2012/curl-7.21.3/include;../../../source/shared_lib/include/map;../../../source/windows_deps_2012/libircclient/include;../../../source/windows_deps_2012/glew-1.7.0/include;../../../source/shared_lib/include/compression;../../../source/shared_lib/include/streflop/</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>../../../source/shared_lib/include/graphics;../../../source/shared_lib/include/graphics/gl;../../../source/shared_lib/include/platform;../../../source/shared_lib/include/platform/win32;../../../source/shared_lib/include/sound;../../../source/shared_lib/include/util;../../../source/shared_lib/include/lua;../../../source/shared_lib/include/xml;../../../source/shared_lib/include/xml/rapidxml;../../../source/glest_game/ai;../../../source/glest_game/facilities;../../../source/glest_game/game;../../../source/glest_game/global;../../../source/glest_game/graphics;../../../source/glest_game/gui;../../../source/glest_game/main;../../../source/glest_game/menu;../../../source/glest_game/network;../../../source/glest_game/sound;../../../source/glest_game/type_instances;../../../source/glest_game/types;../../../source/glest_game/world;../../../source/windows_deps_2012/include;../../../source/windows_deps_2012/xerces-c-3.1.1/src;../../../source/windows_deps_2012/SDL2-2.0.3/include;../../../source/shared_lib/include/platform/sdl;../../../source/shared_lib/include/sound/openal;../../../source/windows_deps_2012/openal-soft-1.14/include;../../../source/shared_lib/include/platform/posix;../../../source/shared_lib/include/platform/common;../../../source/windows_deps_2012/curl-7.21.3/include;../../../source/shared_lib/include/map;../../../source/windows_deps_2012/libircclient/include;../../../source/windows_deps_2012/glew-1.7.0/include;../../../source/shared_lib/include/compression;../../../source/shared_lib/include/streflop/</AdditionalIncludeDirectories>
|
||||
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;_WINDOWS;XML_LIBRARY;USE_PCH=1;_CRT_SECURE_NO_WARNINGS;USE_STREFLOP;STREFLOP_SSE;LIBM_COMPILING_FLT32;CURL_STATICLIB;UNICODE;XERCES_STATIC_LIBRARY;GLEW_STATIC;USE_FREETYPEGL_XXX;STATICLIB;USE_FTGL;FTGL_LIBRARY_STATIC;ZLIB_WINAPI;HAVE_GOOGLE_BREAKPAD_XXX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
|
@ -360,7 +360,7 @@
|
|||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>libstreflop.lib;dxguid.lib;glew32s.lib;libogg_static.lib;libvorbis_static.lib;libvorbisfile_static.lib;opengl32.lib;glu32.lib;wsock32.lib;libglest.lib;mmc.lib;lua.lib;xerces-c_static_3.lib;Dbghelp.lib;libpng15.lib;jpeg.lib;zlibstat.lib;sdl.lib;sdlmain.lib;winmm.lib;openal64.lib;iphlpapi.lib;libcurl.lib;ws2_32.lib;libircclient.lib;freetype244MT.lib;ftgl_static.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>libstreflop.lib;dxguid.lib;glew32s.lib;libogg_static.lib;libvorbis_static.lib;libvorbisfile_static.lib;opengl32.lib;glu32.lib;wsock32.lib;libglest.lib;mmc.lib;lua.lib;xerces-c_static_3.lib;Dbghelp.lib;libpng15.lib;jpeg.lib;zlibstat.lib;sdl2.lib;sdl2main.lib;winmm.lib;openal64.lib;iphlpapi.lib;libcurl.lib;ws2_32.lib;libircclient.lib;freetype244MT.lib;ftgl_static.lib;libeay32.lib;ssleay32.lib;version.lib;imm32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>../../../source/windows_deps_2012/lib;../../../build/$(Configuration)/libglest;$(DXSDK_DIR)/lib/x64;../../../source/windows_deps_2012/Microsoft DirectX SDK %28November 2007%29/Lib/x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<IgnoreSpecificDefaultLibraries>;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
|
|
|
@ -464,7 +464,9 @@
|
|||
<None Include="..\..\..\source\shared_lib\sources\streflop\libm\flt-32\Makefile" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<MASM Include="..\..\..\source\shared_lib\sources\streflop\FPUSettings.asm" />
|
||||
<MASM Include="..\..\..\source\shared_lib\sources\streflop\FPUSettings.asm">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
</MASM>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
|
|
|
@ -208,7 +208,7 @@
|
|||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<AdditionalIncludeDirectories>../../../source/shared_lib/include;../../../source/shared_lib/include/graphics;../../../source/shared_lib/include/graphics/gl;../../../source/shared_lib/include/platform;../../../source/shared_lib/include/sound;../../../source/shared_lib/include/util;../../../source/shared_lib/include/lua;../../../source/shared_lib/include/xml;../../../source/windows_deps_2012/include;../../../source/windows_deps_2012/xerces-c-3.1.1/src;../../../source/windows_deps_2012/xerces-c-3.1.1/src/xercesc/xinclude;../../../source/windows_deps_2012/lpng1510;../../../source/windows_deps_2012/jpeg-8a;../../../source/windows_deps_2012/SDL-1.2.15/include;../../../source/windows_deps_2012/openal-soft-1.14/include;../../../source/shared_lib/include/sound/openal;../../../source/shared_lib/include/platform/posix;../../../source/shared_lib/include/streflop;../../../source/shared_lib/include/streflop/libm_flt32_source;../../../source/shared_lib/include/platform/common;../../../source/windows_deps_2012/curl-7.21.3/include;../../../source/shared_lib/include/map;../../../source/shared_lib/include/platform/miniupnpc;../../../source/shared_lib/include/libircclient/include;../../../source/shared_lib/include/feathery_ftp;../../../source/windows_deps_2012/ftgl-2.1.3-rc5/src;../../../source/windows_deps_2012/freetype-2.4.4/include;../../../source/windows_deps_2012/glew-1.7.0/include;../../../source/shared_lib/include/graphics/md5;../../../source/shared_lib/include/streflop/softfloat;../../../source/shared_lib/include/xml/rapidxml;../../../source/shared_lib/include/platform/sdl;../../../source/shared_lib/include/platform/win32;../../../source/windows_deps_2012/vlc-2.0.1/include;../../../source/windows_deps_2012/fribidi-0.19.5/lib;../../../source/windows_deps_2012/fribidi-0.19.5/charset;../../../source/shared_lib/include/compression;../../../source/shared_lib/sources/</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>../../../source/shared_lib/include;../../../source/shared_lib/include/graphics;../../../source/shared_lib/include/graphics/gl;../../../source/shared_lib/include/platform;../../../source/shared_lib/include/sound;../../../source/shared_lib/include/util;../../../source/shared_lib/include/lua;../../../source/shared_lib/include/xml;../../../source/windows_deps_2012/include;../../../source/windows_deps_2012/xerces-c-3.1.1/src;../../../source/windows_deps_2012/xerces-c-3.1.1/src/xercesc/xinclude;../../../source/windows_deps_2012/lpng1510;../../../source/windows_deps_2012/jpeg-8a;../../../source/windows_deps_2012/SDL2-2.0.3/include;../../../source/windows_deps_2012/openal-soft-1.14/include;../../../source/shared_lib/include/sound/openal;../../../source/shared_lib/include/platform/posix;../../../source/shared_lib/include/streflop;../../../source/shared_lib/include/streflop/libm_flt32_source;../../../source/shared_lib/include/platform/common;../../../source/windows_deps_2012/curl-7.21.3/include;../../../source/shared_lib/include/map;../../../source/shared_lib/include/platform/miniupnpc;../../../source/shared_lib/include/libircclient/include;../../../source/shared_lib/include/feathery_ftp;../../../source/windows_deps_2012/ftgl-2.1.3-rc5/src;../../../source/windows_deps_2012/freetype-2.4.4/include;../../../source/windows_deps_2012/glew-1.7.0/include;../../../source/shared_lib/include/graphics/md5;../../../source/shared_lib/include/streflop/softfloat;../../../source/shared_lib/include/xml/rapidxml;../../../source/shared_lib/include/platform/sdl;../../../source/shared_lib/include/platform/win32;../../../source/windows_deps_2012/vlc-2.0.1/include;../../../source/windows_deps_2012/fribidi-0.19.5/lib;../../../source/windows_deps_2012/fribidi-0.19.5/charset;../../../source/shared_lib/include/compression;../../../source/shared_lib/sources/</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;USE_PCH=1;USE_STREFLOP;STREFLOP_SSE;STREFLOP_RANDOM_GEN_SIZE=32;LIBM_COMPILING_FLT32;CURL_STATICLIB;UNICODE;USE_FTGL;FTGL_LIBRARY_STATIC;TA3D_PLATFORM_MSVC;TA3D_PLATFORM_WINDOWS;STATICLIB;XERCES_STATIC_LIBRARY;GLEW_STATIC;XML_LIBRARY;ZLIB_WINAPI;HAS_LIBVLC;HAVE_FRIBIDI;HAVE_GOOGLE_BREAKPAD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
|
@ -224,7 +224,7 @@
|
|||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<AdditionalDependencies>libstreflop.lib;libcurl.lib;glew32s.lib;freetype244MT.lib;libvlc.lib;libfribidi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>libstreflop.lib;libcurl.lib;glew32s.lib;freetype244MT.lib;libfribidi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>.\;..\..\..\source\windows_deps_2012\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
|
||||
|
@ -268,7 +268,7 @@
|
|||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<AdditionalIncludeDirectories>../../../source/shared_lib/include;../../../source/shared_lib/include/graphics;../../../source/shared_lib/include/graphics/gl;../../../source/shared_lib/include/platform;../../../source/shared_lib/include/sound;../../../source/shared_lib/include/util;../../../source/shared_lib/include/lua;../../../source/shared_lib/include/xml;../../../source/windows_deps_2012/include;../../../source/windows_deps_2012/xerces-c-3.1.1/src;../../../source/windows_deps_2012/xerces-c-3.1.1/src/xercesc/xinclude;../../../source/windows_deps_2012/lpng1510;../../../source/windows_deps_2012/jpeg-8a;../../../source/windows_deps_2012/SDL-1.2.15/include;../../../source/windows_deps_2012/openal-soft-1.14/include;../../../source/shared_lib/include/sound/openal;../../../source/shared_lib/include/platform/posix;../../../source/shared_lib/include/platform/common;../../../source/windows_deps_2012/curl-7.21.3/include;../../../source/shared_lib/include/map;../../../source/shared_lib/include/platform/miniupnpc;../../../source/shared_lib/include/libircclient/include;../../../source/shared_lib/include/feathery_ftp;../../../source/windows_deps_2012/ftgl-2.1.3-rc5/src;../../../source/windows_deps_2012/freetype-2.4.4/include;../../../source/windows_deps_2012/glew-1.7.0/include;../../../source/shared_lib/include/graphics/md5;../../../source/shared_lib/include/xml/rapidxml;../../../source/shared_lib/include/platform/sdl;../../../source/shared_lib/include/platform/win32;../../../source/windows_deps_2012/vlc-2.0.1/include;../../../source/windows_deps_2012/fribidi-0.19.5/lib;../../../source/windows_deps_2012/fribidi-0.19.5/charset;../../../source/shared_lib/include/compression;../../../source/shared_lib/sources/;../../../source/shared_lib/include/streflop/</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>../../../source/shared_lib/include;../../../source/shared_lib/include/graphics;../../../source/shared_lib/include/graphics/gl;../../../source/shared_lib/include/platform;../../../source/shared_lib/include/sound;../../../source/shared_lib/include/util;../../../source/shared_lib/include/lua;../../../source/shared_lib/include/xml;../../../source/windows_deps_2012/include;../../../source/windows_deps_2012/xerces-c-3.1.1/src;../../../source/windows_deps_2012/xerces-c-3.1.1/src/xercesc/xinclude;../../../source/windows_deps_2012/lpng1510;../../../source/windows_deps_2012/jpeg-8a;../../../source/windows_deps_2012/SDL2-2.0.3/include;../../../source/windows_deps_2012/openal-soft-1.14/include;../../../source/shared_lib/include/sound/openal;../../../source/shared_lib/include/platform/posix;../../../source/shared_lib/include/platform/common;../../../source/windows_deps_2012/curl-7.21.3/include;../../../source/shared_lib/include/map;../../../source/shared_lib/include/platform/miniupnpc;../../../source/shared_lib/include/libircclient/include;../../../source/shared_lib/include/feathery_ftp;../../../source/windows_deps_2012/ftgl-2.1.3-rc5/src;../../../source/windows_deps_2012/freetype-2.4.4/include;../../../source/windows_deps_2012/glew-1.7.0/include;../../../source/shared_lib/include/graphics/md5;../../../source/shared_lib/include/xml/rapidxml;../../../source/shared_lib/include/platform/sdl;../../../source/shared_lib/include/platform/win32;../../../source/windows_deps_2012/vlc-2.0.1/include;../../../source/windows_deps_2012/fribidi-0.19.5/lib;../../../source/windows_deps_2012/fribidi-0.19.5/charset;../../../source/shared_lib/include/compression;../../../source/shared_lib/sources/;../../../source/shared_lib/include/streflop/</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;USE_PCH=1;USE_STREFLOP;STREFLOP_SSE;STREFLOP_RANDOM_GEN_SIZE=32;LIBM_COMPILING_FLT32;CURL_STATICLIB;UNICODE;USE_FTGL;FTGL_LIBRARY_STATIC;TA3D_PLATFORM_MSVC;TA3D_PLATFORM_WINDOWS;STATICLIB;XERCES_STATIC_LIBRARY;GLEW_STATIC;XML_LIBRARY;ZLIB_WINAPI;HAS_LIBVLC_XXX;HAVE_FRIBIDI;HAVE_GOOGLE_BREAKPAD_XXX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
|
|
|
@ -298,7 +298,7 @@ void fatal(const char *s, ...) // failure exit
|
|||
|
||||
if(errors <= 1) { // avoid recursion
|
||||
if(SDL_WasInit(SDL_INIT_VIDEO)) {
|
||||
SDL_SetRelativeMouseMode(SDL_FALSE););
|
||||
SDL_SetRelativeMouseMode(SDL_FALSE);
|
||||
}
|
||||
#ifdef WIN32
|
||||
LPWSTR wstr = Ansi2WideString(errText.c_str());
|
||||
|
@ -741,7 +741,7 @@ void stackdumper(unsigned int type, EXCEPTION_POINTERS *ep, bool fatalExit) {
|
|||
|
||||
if(GlobalStaticFlags::getIsNonGraphicalModeEnabled() == false) {
|
||||
showCursor(true);
|
||||
restoreVideoMode(true);
|
||||
restoreVideoMode(::Shared::Platform::Window::getSDLWindow(), true);
|
||||
}
|
||||
|
||||
runtimeErrorMsg = errMsg;
|
||||
|
|
|
@ -32,7 +32,11 @@ namespace ImageRegisterer {
|
|||
bool registerImageReaders();
|
||||
|
||||
//Since you can't call void methods here, I have used a method doing nothing except initializing the image Readers
|
||||
#ifdef WIN32
|
||||
static bool readersRegistered = registerImageReaders(); //should always return true, this should guarantee that the readers are registered <--> ImageReaders is included anywhere
|
||||
#else
|
||||
static bool readersRegistered __attribute__((unused)) = registerImageReaders(); //should always return true, this should guarantee that the readers are registered <--> ImageReaders is included anywhere
|
||||
#endif
|
||||
}
|
||||
|
||||
}} //end namespace
|
||||
|
|
|
@ -70,11 +70,10 @@ map<wchar_t,bool> Window::mapAllowedKeys;
|
|||
static HWND GetSDLWindow()
|
||||
{
|
||||
SDL_SysWMinfo info;
|
||||
|
||||
SDL_VERSION(&info.version);
|
||||
if (SDL_GetWMInfo(&info) == -1)
|
||||
if (SDL_GetWindowWMInfo(Window::getSDLWindow(),&info) == -1)
|
||||
return NULL;
|
||||
return info.window;
|
||||
return info.info.win.window;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -525,7 +524,7 @@ void Window::create() {
|
|||
// nothing here
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s %d]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||
#ifdef WIN32
|
||||
ontop_win32(this->w,this->h);
|
||||
ontop_win32(this->getScreenWidth(),this->getScreenHeight());
|
||||
#endif
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s %d]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||
}
|
||||
|
|
|
@ -111,13 +111,13 @@ bool WindowGl::ChangeVideoMode(bool preserveContext, int resWidth, int resHeight
|
|||
if(preserveContext == true) {
|
||||
// get window handle from SDL
|
||||
SDL_VERSION(&info.version);
|
||||
if (SDL_GetWMInfo(&info) == -1) {
|
||||
if (SDL_GetWindowWMInfo(Window::getSDLWindow(),&info) == -1) {
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugError).enabled) SystemFlags::OutputDebug(SystemFlags::debugError,"In [%s::%s %d] SDL_GetWMInfo #1 failed\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||
return false;
|
||||
}
|
||||
|
||||
// get device context handle
|
||||
tempDC = GetDC( info.window );
|
||||
tempDC = GetDC( info.info.win.window );
|
||||
|
||||
// create temporary context
|
||||
tempRC = wglCreateContext( tempDC );
|
||||
|
@ -128,10 +128,10 @@ bool WindowGl::ChangeVideoMode(bool preserveContext, int resWidth, int resHeight
|
|||
|
||||
// share resources to temporary context
|
||||
SetLastError(0);
|
||||
if (!wglShareLists(info.hglrc, tempRC)) {
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugError).enabled) SystemFlags::OutputDebug(SystemFlags::debugError,"In [%s::%s %d] wglShareLists #1 failed\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||
return false;
|
||||
}
|
||||
//if (!wglShareLists(info.info.win.hglrc, tempRC)) {
|
||||
// if(SystemFlags::getSystemSettingType(SystemFlags::debugError).enabled) SystemFlags::OutputDebug(SystemFlags::debugError,"In [%s::%s %d] wglShareLists #1 failed\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||
// return false;
|
||||
//}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -160,16 +160,16 @@ bool WindowGl::ChangeVideoMode(bool preserveContext, int resWidth, int resHeight
|
|||
if(preserveContext == true) {
|
||||
// previously used structure may possibly be invalid, to be sure we get it again
|
||||
SDL_VERSION(&info.version);
|
||||
if (SDL_GetWMInfo(&info) == -1) {
|
||||
if (SDL_GetWindowWMInfo(Window::getSDLWindow(),&info) == -1) {
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugError).enabled) SystemFlags::OutputDebug(SystemFlags::debugError,"In [%s::%s %d] SDL_GetWMInfo #2 failed\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||
return false;
|
||||
}
|
||||
|
||||
// share resources to new SDL-created context
|
||||
if (!wglShareLists(tempRC, info.hglrc)) {
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugError).enabled) SystemFlags::OutputDebug(SystemFlags::debugError,"In [%s::%s %d] wglShareLists #2 failed\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||
return false;
|
||||
}
|
||||
//if (!wglShareLists(tempRC, info.hglrc)) {
|
||||
// if(SystemFlags::getSystemSettingType(SystemFlags::debugError).enabled) SystemFlags::OutputDebug(SystemFlags::debugError,"In [%s::%s %d] wglShareLists #2 failed\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||
// return false;
|
||||
//}
|
||||
|
||||
// we no longer need our temporary context
|
||||
if (!wglDeleteContext(tempRC)) {
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
// ==============================================================
|
||||
|
||||
#include "platform_util.h"
|
||||
#include "window.h"
|
||||
|
||||
#include <io.h>
|
||||
#include <dbghelp.h>
|
||||
|
@ -392,11 +393,11 @@ void init_win32() {
|
|||
|
||||
SDL_SysWMinfo wminfo;
|
||||
SDL_VERSION(&wminfo.version)
|
||||
if (SDL_GetWMInfo(&wminfo) != 1) {
|
||||
if (SDL_GetWindowWMInfo(Window::getSDLWindow(),&wminfo) != 1) {
|
||||
// error: wrong SDL version
|
||||
}
|
||||
|
||||
HWND hwnd = wminfo.window;
|
||||
HWND hwnd = wminfo.info.win.window;
|
||||
|
||||
#ifdef __MINGW32__
|
||||
#define GCL_HICON -14
|
||||
|
@ -418,11 +419,11 @@ void init_win32() {
|
|||
void ontop_win32(int width, int height) {
|
||||
SDL_SysWMinfo wminfo;
|
||||
SDL_VERSION(&wminfo.version)
|
||||
if (SDL_GetWMInfo(&wminfo) != 1) {
|
||||
if (SDL_GetWindowWMInfo(Window::getSDLWindow(),&wminfo) != 1) {
|
||||
// error: wrong SDL version
|
||||
}
|
||||
|
||||
HWND hwnd = wminfo.window;
|
||||
HWND hwnd = wminfo.info.win.window;
|
||||
|
||||
SetWindowLong(hwnd, GWL_EXSTYLE, 0);
|
||||
SetWindowLong(hwnd, GWL_STYLE, WS_POPUP | WS_CLIPCHILDREN | WS_CLIPSIBLINGS);
|
||||
|
|
Loading…
Reference in New Issue