diff --git a/libraries/ZVulkan/src/glslang/glslang/Include/Common.h b/libraries/ZVulkan/src/glslang/glslang/Include/Common.h index d1bd13b57..fc4c7b278 100644 --- a/libraries/ZVulkan/src/glslang/glslang/Include/Common.h +++ b/libraries/ZVulkan/src/glslang/glslang/Include/Common.h @@ -47,6 +47,7 @@ #include #include #include +#include #include #include #include diff --git a/libraries/ZWidget/CMakeLists.txt b/libraries/ZWidget/CMakeLists.txt index 9967b4ec6..0959cc7f9 100644 --- a/libraries/ZWidget/CMakeLists.txt +++ b/libraries/ZWidget/CMakeLists.txt @@ -130,6 +130,9 @@ include_directories(include include/zwidget src) if(WIN32) set(ZWIDGET_SOURCES ${ZWIDGET_SOURCES} ${ZWIDGET_WIN32_SOURCES}) add_definitions(-DUNICODE -D_UNICODE) + if(MINGW) + add_definitions(-DMINGW) + endif() elseif(APPLE) set(ZWIDGET_SOURCES ${ZWIDGET_SOURCES} ${ZWIDGET_COCOA_SOURCES}) set(ZWIDGET_LIBS ${CMAKE_DL_LIBS} -ldl) diff --git a/libraries/ZWidget/src/window/window.cpp b/libraries/ZWidget/src/window/window.cpp index b19945fed..207a9540a 100644 --- a/libraries/ZWidget/src/window/window.cpp +++ b/libraries/ZWidget/src/window/window.cpp @@ -2,7 +2,7 @@ #include "window/window.h" #include -#ifdef WIN32 +#ifdef _WIN32 #include "win32/win32displaywindow.h" diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 445eab1ad..7c43b850b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -69,13 +69,20 @@ if( WIN32 ) setupapi oleaut32 dbghelp - legacy_stdio_definitions ) + dxguid + dwmapi + ) + + if( NOT MINGW ) + list( APPEND PROJECT_LIBRARIES legacy_stdio_definitions ) + endif() if( DEM_CMAKE_COMPILER_IS_GNUCXX_COMPATIBLE ) if( DX_dxguid_LIBRARY ) list( APPEND PROJECT_LIBRARIES "${DX_dxguid_LIBRARY}" ) endif() endif() + else() if( APPLE ) set( NO_GTK ON ) diff --git a/src/common/filesystem/source/critsec.cpp b/src/common/filesystem/source/critsec.cpp index 874ade79f..b8b8c5522 100644 --- a/src/common/filesystem/source/critsec.cpp +++ b/src/common/filesystem/source/critsec.cpp @@ -31,8 +31,6 @@ ** */ -namespace FileSys { - #ifdef _WIN32 #ifndef _WINNT_ @@ -40,6 +38,8 @@ namespace FileSys { #include #endif +namespace FileSys { + class FInternalCriticalSection { public: @@ -82,6 +82,8 @@ void LeaveCriticalSection(FInternalCriticalSection *c) #include +namespace FileSys { + class FInternalCriticalSection { public: diff --git a/src/common/filesystem/source/fs_findfile.cpp b/src/common/filesystem/source/fs_findfile.cpp index 5ec10f5e1..3d176af55 100644 --- a/src/common/filesystem/source/fs_findfile.cpp +++ b/src/common/filesystem/source/fs_findfile.cpp @@ -35,6 +35,7 @@ #include "fs_findfile.h" #include #include +#include #ifndef _WIN32 @@ -45,8 +46,6 @@ #endif #include #include -#include - #include #else diff --git a/src/rendering/hwrenderer/scene/hw_drawinfo.cpp b/src/rendering/hwrenderer/scene/hw_drawinfo.cpp index 98f0214ca..4ddcd679d 100644 --- a/src/rendering/hwrenderer/scene/hw_drawinfo.cpp +++ b/src/rendering/hwrenderer/scene/hw_drawinfo.cpp @@ -405,9 +405,12 @@ void HWDrawInfo::CreateScene(bool drawpsprites, FRenderState& state) angle_t a1 = FrustumAngle(); mClipper->SafeAddClipRangeRealAngles(vp.Angles.Yaw.BAMs() + a1, vp.Angles.Yaw.BAMs() - a1); Viewpoint.FrustAngle = a1; - double a2 = 20.0 + 0.5*Viewpoint.FieldOfView.Degrees(); // FrustumPitch for vertical clipping - if (a2 > 179.0) a2 = 179.0; - vClipper->SafeAddClipRangeDegPitches(vp.HWAngles.Pitch.Degrees() - a2, vp.HWAngles.Pitch.Degrees() + a2); // clip the suplex range + if (Viewpoint.IsAllowedOoB()) // No need for vertical clipper if viewpoint not allowed out of bounds + { + double a2 = 20.0 + 0.5*Viewpoint.FieldOfView.Degrees(); // FrustumPitch for vertical clipping + if (a2 > 179.0) a2 = 179.0; + vClipper->SafeAddClipRangeDegPitches(vp.HWAngles.Pitch.Degrees() - a2, vp.HWAngles.Pitch.Degrees() + a2); // clip the suplex range + } // reset the portal manager drawctx->portalState.StartFrame();