From d7d28ca24ee9be7990b16e2dba2649db7e2b72c2 Mon Sep 17 00:00:00 2001 From: terminx Date: Fri, 18 Nov 2016 05:29:51 +0000 Subject: [PATCH] Fixes build error with winlayer. DONT_BUILD. git-svn-id: https://svn.eduke32.com/eduke32@5939 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/build/src/winlayer.c | 67 ++++++++++++---------------- 1 file changed, 28 insertions(+), 39 deletions(-) diff --git a/polymer/eduke32/build/src/winlayer.c b/polymer/eduke32/build/src/winlayer.c index e2d564365..165cdcb16 100644 --- a/polymer/eduke32/build/src/winlayer.c +++ b/polymer/eduke32/build/src/winlayer.c @@ -7,6 +7,25 @@ #define WIN32_LEAN_AND_MEAN #define CINTERFACE +#include +#include +#include + +#include "build.h" +#include "winlayer.h" +#include "rawinput.h" +#include "mutex.h" + +#include "winbits.h" +#include "engine_priv.h" + +#include "dx/ddraw.h" +#include "dx/dinput.h" + +#ifdef _MSC_VER +#include +#endif + // bug in the dx headers #if defined (_MSC_VER) || !defined(__cplusplus) #define bDIPROP_BUFFERSIZE MAKEDIPROP(1) @@ -28,54 +47,18 @@ # define bREFIID & #endif -#include - -#ifdef _MSC_VER -#include -#endif - -#include -#include "dx/ddraw.h" -#include "dx/dinput.h" #ifndef DIK_PAUSE # define DIK_PAUSE 0xC5 #endif -#include // pow - -#ifdef __cplusplus -#include -#endif - -#ifdef _MSC_VER -#include -#endif - #include "dxdidf.h" // comment this out if c_dfDI* is being reported as multiply defined + #define __STDC_FORMAT_MACROS #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS #endif -#include + #include -#include - -#ifdef USE_OPENGL -#include "glbuild.h" -#endif - -#include "compat.h" -#include "winlayer.h" -#include "baselayer.h" -#include "pragmas.h" -#include "build.h" -#include "a.h" -#include "osd.h" -#include "rawinput.h" -#include "mutex.h" - -#include "winbits.h" -#include "engine_priv.h" // undefine to restrict windowed resolutions to conventional sizes #define ANY_WINDOWED_SIZE @@ -1748,12 +1731,14 @@ int setvsync(int newSync) if (!glinfo.vsync) { vsync_render = 0; - return; + return 0; } vsync_render = newSync; # ifdef USE_GLEXT bwglSwapIntervalEXT(newSync); # endif + + return newSync; } static void cdsenummodes(void) @@ -2001,6 +1986,10 @@ void showframe(int32_t w) BitBlt(hDC, 0, 0, xres, yres, hDCSection, 0, 0, SRCCOPY); return; } +/* + else + IDirectDraw_WaitForVerticalBlank(lpDD, DDWAITVB_BLOCKBEGIN, NULL); +*/ if (!w && (IDirectDrawSurface_GetBltStatus(lpDDSBack, DDGBS_CANBLT) == DDERR_WASSTILLDRAWING || IDirectDrawSurface_GetFlipStatus(lpDDSPrimary, DDGFS_CANFLIP) == DDERR_WASSTILLDRAWING))