raze-gles/polymer/eduke32/build/include/winlayer.h
hendricks266 fcf9beae6a Work-in-progress adjustment to the C code to compile under C++. It builds for me without errors using Win32 MinGW-GCC, but it still generates warning soup. No guarantees about MSVC or anything using SDL. Enable C++ by building with CPLUSPLUS=1. C remains the default and should compile with no change in setup.
Credit to Plagman for the idea and doing the work on the game side, which is included in this commit.

(Building as C++ will give us features with which we can make improvements and optimizations on the multiplayer code and Polymer.)

git-svn-id: https://svn.eduke32.com/eduke32@3116 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-05 02:49:08 +00:00

40 lines
881 B
C

// Windows DIB/DirectDraw interface layer
// for the Build Engine
// by Jonathon Fowler (jf@jonof.id.au)
#ifndef __build_interface_layer__
#define __build_interface_layer__ WIN
extern int32_t backgroundidle; // set to 1 to tell winlayer to go to idle priority when inactive
extern uint32_t maxrefreshfreq;
extern int32_t glusecds;
extern char di_disabled;
int32_t win_gethwnd(void);
int32_t win_gethinstance(void);
void win_allowtaskswitching(int32_t onf);
int32_t win_checkinstance(void);
extern void idle_waitevent_timeout(uint32_t timeout);
static inline void idle_waitevent(void)
{
idle_waitevent_timeout(100);
}
static inline void idle(void)
{
idle_waitevent();
}
#include "baselayer.h"
#else
#if (__build_interface_layer__ != WIN)
#error "Already using the " __build_interface_layer__ ". Can't now use Windows."
#endif
#endif // __build_interface_layer__