]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
UNMERGE
authorhavoc havoc@d7cf8633-e32d-0410-b094-e92efae38249 <>
Thu, 19 Aug 2010 17:44:57 +0000 (17:44 +0000)
committerRudolf Polzer <divverent@alientrap.org>
Fri, 24 Sep 2010 20:00:30 +0000 (22:00 +0200)
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

vid_shared.c
vid_wgl.c

index eb665eedc6c39abf013ba86b5bcabc54260f7829..fccb1e4ab61a46b73cec3c676de238181bfcaf63 100644 (file)
@@ -6,15 +6,6 @@
 #include <Cg/cgGL.h>
 #endif
 
-#ifdef SUPPORTD3D
-#include <d3d9.h>
-#ifdef _MSC_VER
-#pragma comment(lib, "d3d9.lib")
-#endif
-
-LPDIRECT3DDEVICE9 vid_d3d9dev;
-#endif
-
 // global video state
 viddef_t vid;
 
index 832ceb05466ee099989d552b5f7c216044251257..fb98973c15116f187f61aeabb0559bf853157181 100644 (file)
--- 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 <d3d9.h>
+#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