From: havoc havoc@d7cf8633-e32d-0410-b094-e92efae38249 <> Date: Thu, 19 Aug 2010 17:44:57 +0000 (+0000) Subject: UNMERGE X-Git-Tag: xonotic-v0.1.0preview~196 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=e9c44b7909a9a2ec3dd3419673338a090f18e044;p=xonotic%2Fdarkplaces.git UNMERGE fix compilation of sdl and server builds when SUPPORTD3D is defined git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10407 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::unmerge=a03b36647e6f8648eb9cec6170b226a707452012 --- diff --git a/vid_shared.c b/vid_shared.c index eb665eed..fccb1e4a 100644 --- a/vid_shared.c +++ b/vid_shared.c @@ -6,15 +6,6 @@ #include #endif -#ifdef SUPPORTD3D -#include -#ifdef _MSC_VER -#pragma comment(lib, "d3d9.lib") -#endif - -LPDIRECT3DDEVICE9 vid_d3d9dev; -#endif - // global video state viddef_t vid; diff --git a/vid_wgl.c b/vid_wgl.c index 832ceb05..fb98973c 100644 --- a/vid_wgl.c +++ b/vid_wgl.c @@ -48,6 +48,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #ifdef SUPPORTD3D #include +#ifdef _MSC_VER +#pragma comment(lib, "d3d9.lib") +#endif cvar_t vid_dx9 = {CVAR_SAVE, "vid_dx9", "0", "use Microsoft Direct3D9(r) for rendering"}; cvar_t vid_dx9_hal = {CVAR_SAVE, "vid_dx9_hal", "1", "enables hardware rendering (1), otherwise software reference rasterizer (0 - very slow), note that 0 is necessary when using NVPerfHUD (which renders in hardware but requires this option to enable it)"}; @@ -57,19 +60,19 @@ cvar_t vid_dx9_triplebuffer = {CVAR_SAVE, "vid_dx9_triplebuffer", "0", "enables //cvar_t vid_dx11 = {CVAR_SAVE, "vid_dx11", "1", "use Microsoft Direct3D11(r) for rendering"}; D3DPRESENT_PARAMETERS vid_d3dpresentparameters; +#endif -// we declare this in vid_shared.c because it is required by dedicated server and all clients when SUPPORTD3D is defined -extern LPDIRECT3DDEVICE9 vid_d3d9dev; +extern HINSTANCE global_hInstance; + +static HINSTANCE gldll; +#ifdef SUPPORTD3D LPDIRECT3D9 vid_d3d9; +LPDIRECT3DDEVICE9 vid_d3d9dev; D3DCAPS9 vid_d3d9caps; qboolean vid_d3ddevicelost; #endif -extern HINSTANCE global_hInstance; - -static HINSTANCE gldll; - #ifndef WM_MOUSEWHEEL #define WM_MOUSEWHEEL 0x020A #endif