Compile as C code, not C++ (vcproj setting)
authorechon <echon@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 6 Sep 2009 17:04:31 +0000 (17:04 +0000)
committerechon <echon@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 6 Sep 2009 17:04:31 +0000 (17:04 +0000)
Include dinput8 libs if SUPPORTDIRECTX is defined
Default to defining SUPPORTDIRECTX on windows builds, otherwise you get crackly sound

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9167 d7cf8633-e32d-0410-b094-e92efae38249

darkplaces-dedicated.vcproj
darkplaces-sdl.vcproj
darkplaces.vcproj
vid_wgl.c

index c77dcc4..6f479b6 100755 (executable)
@@ -60,6 +60,7 @@
                                PrecompiledHeaderFile=""\r
                                WarningLevel="3"\r
                                SuppressStartupBanner="true"\r
+                               CompileAs="1"\r
                        />\r
                        <Tool\r
                                Name="VCManagedResourceCompilerTool"\r
                                WarningLevel="3"\r
                                SuppressStartupBanner="true"\r
                                DebugInformationFormat="4"\r
+                               CompileAs="1"\r
                        />\r
                        <Tool\r
                                Name="VCManagedResourceCompilerTool"\r
                                PrecompiledHeaderFile=""\r
                                WarningLevel="3"\r
                                SuppressStartupBanner="true"\r
+                               CompileAs="1"\r
                        />\r
                        <Tool\r
                                Name="VCManagedResourceCompilerTool"\r
index b5fed6f..4a39a7a 100755 (executable)
@@ -60,6 +60,7 @@
                                RuntimeLibrary="2"\r
                                WarningLevel="3"\r
                                SuppressStartupBanner="true"\r
+                               CompileAs="1"\r
                        />\r
                        <Tool\r
                                Name="VCManagedResourceCompilerTool"\r
                                WarningLevel="3"\r
                                SuppressStartupBanner="true"\r
                                DebugInformationFormat="4"\r
+                               CompileAs="1"\r
                        />\r
                        <Tool\r
                                Name="VCManagedResourceCompilerTool"\r
                                RuntimeLibrary="2"\r
                                WarningLevel="3"\r
                                SuppressStartupBanner="true"\r
+                               CompileAs="1"\r
                        />\r
                        <Tool\r
                                Name="VCManagedResourceCompilerTool"\r
index a6b65e3..9d5523d 100755 (executable)
                                InlineFunctionExpansion="1"\r
                                EnableIntrinsicFunctions="true"\r
                                FavorSizeOrSpeed="1"\r
-                               PreprocessorDefinitions="WIN32;WIN32_LEAN_AND_MEAN;NDEBUG;_WINDOWS"\r
+                               PreprocessorDefinitions="WIN32;WIN32_LEAN_AND_MEAN;NDEBUG;_WINDOWS;SUPPORTDIRECTX"\r
                                RuntimeLibrary="2"\r
                                PrecompiledHeaderFile="$(PlatformName)\$(ConfigurationName)\darkplaces.pch"\r
                                WarningLevel="3"\r
                                SuppressStartupBanner="true"\r
+                               CompileAs="1"\r
                        />\r
                        <Tool\r
                                Name="VCManagedResourceCompilerTool"\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
                                Optimization="0"\r
-                               PreprocessorDefinitions="WIN32;WIN32_LEAN_AND_MEAN;_DEBUG;_WINDOWS"\r
+                               PreprocessorDefinitions="WIN32;WIN32_LEAN_AND_MEAN;_DEBUG;_WINDOWS;SUPPORTDIRECTX"\r
                                MinimalRebuild="true"\r
                                BasicRuntimeChecks="3"\r
                                RuntimeLibrary="3"\r
                                WarningLevel="3"\r
                                SuppressStartupBanner="true"\r
                                DebugInformationFormat="4"\r
+                               CompileAs="1"\r
                        />\r
                        <Tool\r
                                Name="VCManagedResourceCompilerTool"\r
                                InlineFunctionExpansion="1"\r
                                EnableIntrinsicFunctions="true"\r
                                FavorSizeOrSpeed="1"\r
-                               PreprocessorDefinitions="WIN32;WIN32_LEAN_AND_MEAN;NDEBUG;_WINDOWS"\r
+                               PreprocessorDefinitions="WIN32;WIN32_LEAN_AND_MEAN;NDEBUG;_WINDOWS;SUPPORTDIRECTX"\r
                                RuntimeLibrary="2"\r
                                PrecompiledHeaderFile="$(PlatformName)\$(ConfigurationName)\darkplaces.pch"\r
                                WarningLevel="3"\r
                                SuppressStartupBanner="true"\r
+                               CompileAs="1"\r
                        />\r
                        <Tool\r
                                Name="VCManagedResourceCompilerTool"\r
index b9b2673..ed890e7 100644 (file)
--- a/vid_wgl.c
+++ b/vid_wgl.c
@@ -17,10 +17,16 @@ along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
 */
-// gl_vidnt.c -- NT GL vid component
+// vid_wgl.c -- NT GL vid component
 
-// we don't need a very new dinput
-#define DIRECTINPUT_VERSION 0x0300
+#ifdef SUPPORTDIRECTX
+// Include DX libs
+#pragma comment(lib, "dinput8.lib")
+#pragma comment(lib, "dxguid.lib")
+#ifndef DIRECTINPUT_VERSION
+#      define DIRECTINPUT_VERSION 0x0500  /* Version 5.0 */
+#endif
+#endif
 
 #include "quakedef.h"
 #include <windows.h>