diff --git a/src/gl/system/gl_system.h b/src/gl/system/gl_system.h index e5abe2ec5..db7f1f890 100644 --- a/src/gl/system/gl_system.h +++ b/src/gl/system/gl_system.h @@ -1,40 +1,6 @@ #ifndef __GL_PCH_H #define __GL_PCH_H -#ifdef _WIN32 -//#define __RPCNDR_H__ // this header causes problems! -//#define __wtypes_h__ -#define WIN32_LEAN_AND_MEAN -#define _WIN32_WINDOWS 0x410 -#ifndef _WIN32_WINNT -#define _WIN32_WINNT 0x0501 // Support the mouse wheel and session notification. -#define _WIN32_IE 0x0500 -#endif -#define DIRECTINPUT_VERSION 0x800 -#define DIRECTDRAW_VERSION 0x0300 -#define DWORD WINDOWS_DWORD // I don't want to depend on this throughout the GL code! - -#ifdef _MSC_VER -#pragma warning(disable : 4995) // MIPS -#endif - -#include -#include -#include -#ifndef __WINE__ -#include -#endif -#include -//#include -//#include -//#include -//#include -#endif - -#undef DWORD -#ifndef CALLBACK -#define CALLBACK -#endif #include #include #include @@ -73,33 +39,6 @@ #include #endif -#ifdef _WIN32 -#define DWORD WINDOWS_DWORD // I don't want to depend on this throughout the GL code! -//#include "gl/api/wglext.h" -#ifndef __WINE__ -#undef DWORD -#endif -#else -typedef unsigned char byte; -typedef float FLOAT; -template -inline T max( T a, T b) { return (((a)>(b)) ? (a) : (b)); } -#define _access(a,b) access(a,b) -#endif - - -#ifdef LoadMenu -#undef LoadMenu -#endif -#ifdef DrawText -#undef DrawText -#endif -#ifdef GetCharWidth -#undef GetCharWidth -#endif - -#undef S_NORMAL -#undef OPAQUE #ifdef _MSC_VER @@ -111,7 +50,4 @@ inline T max( T a, T b) { return (((a)>(b)) ? (a) : (b)); } #pragma warning(disable : 4305) // truncate from double to float #endif -#ifdef WIN32 -#undef WIN32 -#endif #endif //__GL_PCH_H diff --git a/src/win32/win32gliface.h b/src/win32/win32gliface.h index 463220a99..cd7e508d3 100644 --- a/src/win32/win32gliface.h +++ b/src/win32/win32gliface.h @@ -9,7 +9,6 @@ extern IVideo *Video; -extern BOOL AppActive; EXTERN_CVAR (Float, dimamount) EXTERN_CVAR (Color, dimcolor) @@ -19,8 +18,6 @@ EXTERN_CVAR(Int, vid_defheight); EXTERN_CVAR(Int, vid_renderer); EXTERN_CVAR(Int, vid_adapter); -extern HINSTANCE g_hInst; -extern HWND Window; extern IVideo *Video; struct FRenderer; @@ -43,7 +40,7 @@ public: // unused but must be defined virtual void Blank (); virtual bool PaintToWindow (); - virtual HRESULT GetHR(); + virtual long/*HRESULT*/ GetHR(); // windows.h pollution prevention. virtual bool CreateResources (); virtual void ReleaseResources (); @@ -76,12 +73,12 @@ protected: void SetGammaTable(uint16_t * tbl); float m_Gamma, m_Brightness, m_Contrast; - WORD m_origGamma[768]; - BOOL m_supportsGamma; + uint16_t m_origGamma[768]; + bool m_supportsGamma; bool m_Fullscreen; int m_Width, m_Height, m_Bits, m_RefreshHz; int m_Lock; - char m_displayDeviceNameBuffer[CCHDEVICENAME]; + char m_displayDeviceNameBuffer[32/*CCHDEVICENAME*/]; // do not use windows.h constants here! char *m_displayDeviceName; int SwapInterval; diff --git a/src/win32/win32iface.h b/src/win32/win32iface.h index 8db27304d..03ae6ffde 100644 --- a/src/win32/win32iface.h +++ b/src/win32/win32iface.h @@ -34,21 +34,8 @@ #ifndef __WIN32IFACE_H #define __WIN32IFACE_H -#ifndef DIRECTDRAW_VERSION -#define DIRECTDRAW_VERSION 0x0300 -#endif -#ifndef DIRECT3D_VERSION -#define DIRECT3D_VERSION 0x0900 -#endif - -#define WIN32_LEAN_AND_MEAN -#include -#include -#include - #include "hardware.h" -#define SAFE_RELEASE(x) { if (x != NULL) { x->Release(); x = NULL; } } EXTERN_CVAR (Bool, vid_vsync)