mirror of
https://github.com/TTimo/GtkRadiant.git
synced 2024-11-10 07:11:54 +00:00
- Updated Windows build doc, very slight revision. Changed 37 targets to 38.
- Added plugins/imagehl to list of modules built (both Windows and Linux). Not really sure what this does, but it's the only module (as defined by stuff in plugins/ or contrib/) that exists and isn't currently part of the build. - The code to disable desktop composition in Windows has been moved from start of main() to an option in Preferences. The pref reads as follows: "NVIDIA/Aero bug - disable Windows composition". It is enabled by default. - Color themes controlled by "Misc" -> "Colors" -> "Themes" options are now saved as soon as you select them. The color theme is no longer clobbered when opening Preferences. - The ATI broken driver (bug #802) pref has been reworded since it applies to Intel cards as well. Before: "ATI cards with broken drivers - bug #802". After: "ATI and Intel cards w/ buggy drivers (disappearing polygons)". git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@479 8a3a26a2-13c4-0310-b231-cf6edde360e5
This commit is contained in:
parent
caadbd4cfc
commit
8d530e8707
10 changed files with 290 additions and 113 deletions
|
@ -105,6 +105,7 @@ class Config:
|
|||
'plugins/model/model.vcproj',
|
||||
'plugins/imagepng/imagepng.vcproj',
|
||||
'plugins/imagewal/imagewal.vcproj',
|
||||
'plugins/imagehl/imagehl.vcproj',
|
||||
'plugins/imagem8/imagem8.vcproj',
|
||||
'plugins/spritemodel/spritemodel.vcproj',
|
||||
'plugins/textool/textool.vcproj',
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
; hlimage.def : Declares the module parameters for the DLL.
|
||||
|
||||
LIBRARY "ImageHL"
|
||||
DESCRIPTION 'ImageHL Windows Dynamic Link Library'
|
||||
|
||||
EXPORTS
|
||||
; Explicit exports can go here
|
||||
|
|
189
plugins/imagehl/imagehl.vcproj
Normal file
189
plugins/imagehl/imagehl.vcproj
Normal file
|
@ -0,0 +1,189 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9.00"
|
||||
Name="imagehl"
|
||||
ProjectGUID="{BA1BC409-744B-4270-8E47-BA10872313AD}"
|
||||
Keyword="Win32Proj"
|
||||
TargetFrameworkVersion="0"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="$(SolutionDir)\install\modules"
|
||||
IntermediateDirectory="$(SolutionDir)\build\intermediate\$(ConfigurationName)\$(ProjectName)"
|
||||
ConfigurationType="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""$(SolutionDir)\libs";"$(SolutionDir)\include";"$(SolutionDir)\..\STLport-5.2.1\stlport";"$(SolutionDir)\..\gtk-2.16.6\include\glib-2.0";"$(SolutionDir)\..\gtk-2.16.6\lib\glib-2.0\include";"$(SolutionDir)\..\libxml2-2.7.3\include\libxml2""
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;IMAGEHL_EXPORTS;"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="4"
|
||||
DisableSpecificWarnings="4996;4101"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="glib-2.0.lib libxml2.lib synapse.lib"
|
||||
AdditionalLibraryDirectories=""$(SolutionDir)\..\gtk-2.16.6\lib";"$(SolutionDir)\..\libxml2-2.7.3\lib";"$(SolutionDir)\build\$(ConfigurationName)\libs""
|
||||
ModuleDefinitionFile="imagehl.def"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="2"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="$(SolutionDir)\install\modules"
|
||||
IntermediateDirectory="$(SolutionDir)\build\intermediate\$(ConfigurationName)\$(ProjectName)"
|
||||
ConfigurationType="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories=""$(SolutionDir)\libs";"$(SolutionDir)\include";"$(SolutionDir)\..\STLport-5.2.1\stlport";"$(SolutionDir)\..\gtk-2.16.6\include\glib-2.0";"$(SolutionDir)\..\gtk-2.16.6\lib\glib-2.0\include";"$(SolutionDir)\..\libxml2-2.7.3\include\libxml2""
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;IMAGEHL_EXPORTS;"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
DisableSpecificWarnings="4996;4101"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="glib-2.0.lib libxml2.lib synapse.lib"
|
||||
AdditionalLibraryDirectories=""$(SolutionDir)\..\gtk-2.16.6\lib";"$(SolutionDir)\..\libxml2-2.7.3\lib";"$(SolutionDir)\build\$(ConfigurationName)\libs""
|
||||
ModuleDefinitionFile="imagehl.def"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="2"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="src"
|
||||
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\imagehl.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\imagehl.def"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\lbmlib.cpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
|
@ -1,75 +0,0 @@
|
|||
<?xml version="1.0" ?><VisualStudioProject Name="imagehl" ProjectGUID="{65D02375-63EE-4A8A-9F8E-504B1D5A1D02}" ProjectType="Visual C++" RootNamespace="imagehl" Version="8.00">
|
||||
<Platforms>
|
||||
<Platform Name="Win32"/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration CharacterSet="2" ConfigurationType="1" IntermediateDirectory="$(ConfigurationName)" Name="Debug|Win32" OutputDirectory="$(SolutionDir)\install\modules">
|
||||
<Tool Name="VCPreBuildEventTool"/>
|
||||
<Tool Name="VCCustomBuildTool"/>
|
||||
<Tool Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool Name="VCMIDLTool"/>
|
||||
<Tool AdditionalIncludeDirectories=""$(SolutionDir)\include";"$(SolutionDir)\libs";"$(SolutionDir)\..\STLPort\stlport";"$(SolutionDir)\..\gtk2\include";"$(SolutionDir)\..\gtk2\include\glib-2.0";"$(SolutionDir)\..\gtk2\lib\glib-2.0\include";"$(SolutionDir)\..\libxml2\include"" BasicRuntimeChecks="3" DebugInformationFormat="4" Detect64BitPortabilityProblems="true" DisableSpecificWarnings="4996;4244;4267" MinimalRebuild="true" Name="VCCLCompilerTool" Optimization="0" PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS" RuntimeLibrary="3" WarningLevel="3"/>
|
||||
<Tool Name="VCManagedResourceCompilerTool"/>
|
||||
<Tool Name="VCResourceCompilerTool"/>
|
||||
<Tool Name="VCPreLinkEventTool"/>
|
||||
<Tool GenerateDebugInformation="true" Name="VCLinkerTool" TargetMachine="1"/>
|
||||
<Tool Name="VCALinkTool"/>
|
||||
<Tool Name="VCManifestTool"/>
|
||||
<Tool Name="VCXDCMakeTool"/>
|
||||
<Tool Name="VCBscMakeTool"/>
|
||||
<Tool Name="VCFxCopTool"/>
|
||||
<Tool Name="VCAppVerifierTool"/>
|
||||
<Tool Name="VCWebDeploymentTool"/>
|
||||
<Tool Name="VCPostBuildEventTool"/>
|
||||
</Configuration>
|
||||
<Configuration CharacterSet="2" ConfigurationType="1" IntermediateDirectory="$(ConfigurationName)" Name="Release|Win32" OutputDirectory="$(SolutionDir)\install\modules">
|
||||
<Tool Name="VCPreBuildEventTool"/>
|
||||
<Tool Name="VCCustomBuildTool"/>
|
||||
<Tool Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool Name="VCMIDLTool"/>
|
||||
<Tool AdditionalIncludeDirectories=""$(SolutionDir)\include";"$(SolutionDir)\libs";"$(SolutionDir)\..\STLPort\stlport";"$(SolutionDir)\..\gtk2\include";"$(SolutionDir)\..\gtk2\include\glib-2.0";"$(SolutionDir)\..\gtk2\lib\glib-2.0\include";"$(SolutionDir)\..\libxml2\include"" DebugInformationFormat="3" Detect64BitPortabilityProblems="true" DisableSpecificWarnings="4996;4244;4267" Name="VCCLCompilerTool" PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS" RuntimeLibrary="2" WarningLevel="3"/>
|
||||
<Tool Name="VCManagedResourceCompilerTool"/>
|
||||
<Tool Name="VCResourceCompilerTool"/>
|
||||
<Tool Name="VCPreLinkEventTool"/>
|
||||
<Tool EnableCOMDATFolding="2" GenerateDebugInformation="true" Name="VCLinkerTool" OptimizeReferences="2" TargetMachine="1"/>
|
||||
<Tool Name="VCALinkTool"/>
|
||||
<Tool Name="VCManifestTool"/>
|
||||
<Tool Name="VCXDCMakeTool"/>
|
||||
<Tool Name="VCBscMakeTool"/>
|
||||
<Tool Name="VCFxCopTool"/>
|
||||
<Tool Name="VCAppVerifierTool"/>
|
||||
<Tool Name="VCWebDeploymentTool"/>
|
||||
<Tool Name="VCPostBuildEventTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat;f90;for;f;fpp" Name="Source Files">
|
||||
<File RelativePath=".\imagehl.cpp">
|
||||
</File>
|
||||
<File RelativePath=".\imagehl.def">
|
||||
</File>
|
||||
<File RelativePath=".\lbmlib.cpp">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter Filter="h;hpp;hxx;hm;inl;fi;fd" Name="Header Files">
|
||||
<File RelativePath=".\imagehl.h">
|
||||
</File>
|
||||
<File RelativePath=".\lbmlib.h">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;txt" Name="Resource Files">
|
||||
<File RelativePath=".\imagehl.txt">
|
||||
</File>
|
||||
</Filter>
|
||||
<File RelativePath=".\Conscript">
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
|
@ -112,6 +112,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "imagewal", "plugins\imagewa
|
|||
{E13CCFB0-A366-4EF3-A66F-C374B563E4DF} = {E13CCFB0-A366-4EF3-A66F-C374B563E4DF}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "imagehl", "plugins\imagehl\imagehl.vcproj", "{BA1BC409-744B-4270-8E47-BA10872313AD}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{E13CCFB0-A366-4EF3-A66F-C374B563E4DF} = {E13CCFB0-A366-4EF3-A66F-C374B563E4DF}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "imagem8", "plugins\imagem8\imagem8.vcproj", "{C6FA63AA-5F37-4D43-BE6B-09903E70C9E1}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{E13CCFB0-A366-4EF3-A66F-C374B563E4DF} = {E13CCFB0-A366-4EF3-A66F-C374B563E4DF}
|
||||
|
@ -274,6 +279,10 @@ Global
|
|||
{8D3160AB-B386-4970-8146-826BC293CCB1}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{8D3160AB-B386-4970-8146-826BC293CCB1}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{8D3160AB-B386-4970-8146-826BC293CCB1}.Release|Win32.Build.0 = Release|Win32
|
||||
{BA1BC409-744B-4270-8E47-BA10872313AD}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{BA1BC409-744B-4270-8E47-BA10872313AD}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{BA1BC409-744B-4270-8E47-BA10872313AD}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{BA1BC409-744B-4270-8E47-BA10872313AD}.Release|Win32.Build.0 = Release|Win32
|
||||
{C6FA63AA-5F37-4D43-BE6B-09903E70C9E1}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{C6FA63AA-5F37-4D43-BE6B-09903E70C9E1}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{C6FA63AA-5F37-4D43-BE6B-09903E70C9E1}.Release|Win32.ActiveCfg = Release|Win32
|
||||
|
|
|
@ -429,32 +429,6 @@ int main( int argc, char* argv[] ) {
|
|||
char *libgl, *ptr;
|
||||
int i, j, k;
|
||||
|
||||
/*
|
||||
Rambetter on Fri Jan 21, 2011:
|
||||
|
||||
People with recent NVIDIA cards and Windows 7 (Aero) are complaining about "hall of mirrors"
|
||||
effect in the OpenGL viewports. The code below is borrowed from NetRadiant to address
|
||||
this issue. This change turns off desktop compositing (globally) while Radiant is running.
|
||||
It's a real hack but the "correct" fix is very involving, so until the underlying problem
|
||||
is addressed we need this code here. I don't know for sure what the underlying problem is,
|
||||
but I have a hunch it's the version of gtkglext.dll we're using.
|
||||
*/
|
||||
|
||||
#ifdef _WIN32
|
||||
HMODULE lib;
|
||||
lib = LoadLibrary("dwmapi.dll");
|
||||
if (lib != 0)
|
||||
{
|
||||
void (WINAPI *qDwmEnableComposition) (bool bEnable) =
|
||||
(void (WINAPI *) (bool bEnable)) GetProcAddress(lib, "DwmEnableComposition");
|
||||
if (qDwmEnableComposition)
|
||||
{
|
||||
qDwmEnableComposition(FALSE);
|
||||
}
|
||||
FreeLibrary(lib);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
Rambetter on Sat Nov 13, 2010:
|
||||
|
|
|
@ -5960,6 +5960,7 @@ void MainFrame::OnColorSetoriginal()
|
|||
g_qeglobals.d_savedinfo.colors[COLOR_SELBRUSHES3D][1] = 0.0f;
|
||||
g_qeglobals.d_savedinfo.colors[COLOR_SELBRUSHES3D][2] = 0.0f;
|
||||
|
||||
g_PrefsDlg.SavePrefs();
|
||||
Sys_UpdateWindows (W_ALL);
|
||||
}
|
||||
|
||||
|
@ -6002,6 +6003,7 @@ void MainFrame::OnColorSetqer()
|
|||
g_qeglobals.d_savedinfo.colors[COLOR_SELBRUSHES3D][1] = 0.0f;
|
||||
g_qeglobals.d_savedinfo.colors[COLOR_SELBRUSHES3D][2] = 0.0f;
|
||||
|
||||
g_PrefsDlg.SavePrefs();
|
||||
Sys_UpdateWindows (W_ALL);
|
||||
}
|
||||
|
||||
|
@ -6047,6 +6049,7 @@ void MainFrame::OnColorSetblack()
|
|||
g_qeglobals.d_savedinfo.colors[COLOR_SELBRUSHES3D][1] = 0.0f;
|
||||
g_qeglobals.d_savedinfo.colors[COLOR_SELBRUSHES3D][2] = 0.0f;
|
||||
|
||||
g_PrefsDlg.SavePrefs();
|
||||
Sys_UpdateWindows (W_ALL);
|
||||
}
|
||||
|
||||
|
@ -6090,6 +6093,7 @@ void MainFrame::OnColorSetydnar()
|
|||
g_qeglobals.d_savedinfo.colors[COLOR_SELBRUSHES3D][1] = 0.0f;
|
||||
g_qeglobals.d_savedinfo.colors[COLOR_SELBRUSHES3D][2] = 0.0f;
|
||||
|
||||
g_PrefsDlg.SavePrefs();
|
||||
Sys_UpdateWindows (W_ALL);
|
||||
}
|
||||
|
||||
|
|
|
@ -148,7 +148,14 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
#define TEXTURECOMPRESSIONFORMAT_KEY "TextureCompressionFormat"
|
||||
#define LIGHTRADIUS_KEY "LightRadiuses"
|
||||
#define Q3MAP2TEX_KEY "Q3Map2Tex"
|
||||
|
||||
#ifdef ATIHACK_812
|
||||
#define ATIHACK_KEY "ATIHack"
|
||||
#endif
|
||||
|
||||
#ifdef NVIDIA_AERO_HACK
|
||||
#define NVAEROHACK_KEY "NvidiaAeroHack"
|
||||
#endif
|
||||
|
||||
// window stuff
|
||||
#define ENTITYSPLIT1_KEY "EntitySplit1"
|
||||
|
@ -687,7 +694,11 @@ PrefsDlg::PrefsDlg ()
|
|||
m_nLightRadiuses = 1;
|
||||
m_bQ3Map2Texturing = TRUE;
|
||||
#ifdef ATIHACK_812
|
||||
m_bGlATIHack = FALSE;
|
||||
m_bGlATIHack = FALSE;
|
||||
#endif
|
||||
#ifdef NVIDIA_AERO_HACK
|
||||
m_bGlNvidiaAeroHack = TRUE;
|
||||
m_bGlNvidiaAeroHackPrevState = -1; // -1 is uninitialized, 0 is FALSE, 1 is TRUE
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -1818,11 +1829,18 @@ void PrefsDlg::BuildDialog ()
|
|||
g_list_free (combo_list);
|
||||
|
||||
#ifdef ATIHACK_812
|
||||
// ATI bugs
|
||||
check = gtk_check_button_new_with_label (_("ATI cards with broken drivers - bug #802"));
|
||||
gtk_widget_show(check);
|
||||
gtk_box_pack_start(GTK_BOX(vbox), check, FALSE, FALSE, 0);
|
||||
AddDialogData(check, &m_bGlATIHack, DLG_CHECK_BOOL);
|
||||
// ATI bugs
|
||||
check = gtk_check_button_new_with_label (_("ATI and Intel cards w/ buggy drivers (disappearing polygons)"));
|
||||
gtk_widget_show(check);
|
||||
gtk_box_pack_start(GTK_BOX(vbox), check, FALSE, FALSE, 0);
|
||||
AddDialogData(check, &m_bGlATIHack, DLG_CHECK_BOOL);
|
||||
#endif
|
||||
|
||||
#ifdef NVIDIA_AERO_HACK
|
||||
check = gtk_check_button_new_with_label (_("NVIDIA/Aero bug - disable Windows composition"));
|
||||
gtk_widget_show(check);
|
||||
gtk_box_pack_start(GTK_BOX(vbox), check, FALSE, FALSE, 0);
|
||||
AddDialogData(check, &m_bGlNvidiaAeroHack, DLG_CHECK_BOOL);
|
||||
#endif
|
||||
|
||||
// Add the page to the notebook
|
||||
|
@ -2859,6 +2877,40 @@ void PrefsDlg::UpdateATIHack() {
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef NVIDIA_AERO_HACK
|
||||
void PrefsDlg::UpdateNvidiaAeroHack() {
|
||||
if (m_bGlNvidiaAeroHack && m_bGlNvidiaAeroHackPrevState == 1) { return; }
|
||||
if ((!m_bGlNvidiaAeroHack) && m_bGlNvidiaAeroHackPrevState == 0) { return; }
|
||||
if ((!m_bGlNvidiaAeroHack) && m_bGlNvidiaAeroHackPrevState < 0) {
|
||||
// The hack state is uninitialized, meaning that this is the first call
|
||||
// to this function. I prefer not to explicitly enable composition because
|
||||
// the user may have set the application to disable it, and I don't want to
|
||||
// override that. Leave the state of composition as-is if the hack checkbox
|
||||
// isn't checked.
|
||||
m_bGlNvidiaAeroHackPrevState = 0;
|
||||
return;
|
||||
}
|
||||
HMODULE lib = LoadLibrary("dwmapi.dll");
|
||||
if (lib) {
|
||||
void (WINAPI *qDwmEnableComposition) (bool bEnable) =
|
||||
(void (WINAPI *) (bool bEnable)) GetProcAddress(lib, "DwmEnableComposition");
|
||||
if (qDwmEnableComposition) {
|
||||
if (m_bGlNvidiaAeroHack) {
|
||||
Sys_Printf("Disabling Windows composition\n");
|
||||
qDwmEnableComposition(0);
|
||||
m_bGlNvidiaAeroHackPrevState = 1;
|
||||
}
|
||||
else {
|
||||
Sys_Printf("Enabling Windows composition\n");
|
||||
qDwmEnableComposition(1);
|
||||
m_bGlNvidiaAeroHackPrevState = 0;
|
||||
}
|
||||
}
|
||||
FreeLibrary(lib);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// TTimo: m_strEnginePath has a special status, if not found in registry we need to
|
||||
// initiliaze it for sure. It is not totally failsafe but we can use the same
|
||||
// code than in q3map, expecting to find some "quake" above us. If not, we prompt
|
||||
|
@ -3139,6 +3191,10 @@ void PrefsDlg::LoadPrefs ()
|
|||
mLocalPrefs.GetPref(ATIHACK_KEY, &m_bGlATIHack, FALSE);
|
||||
#endif
|
||||
|
||||
#ifdef NVIDIA_AERO_HACK
|
||||
mLocalPrefs.GetPref(NVAEROHACK_KEY, &m_bGlNvidiaAeroHack, TRUE);
|
||||
#endif
|
||||
|
||||
Undo_SetMaxSize(m_nUndoLevels); // set it internally as well / FIXME: why not just have one global value?
|
||||
|
||||
UpdateTextureCompression();
|
||||
|
@ -3147,6 +3203,10 @@ void PrefsDlg::LoadPrefs ()
|
|||
UpdateATIHack();
|
||||
#endif
|
||||
|
||||
#ifdef NVIDIA_AERO_HACK
|
||||
UpdateNvidiaAeroHack();
|
||||
#endif
|
||||
|
||||
if (mLocalPrefs.mbEmpty)
|
||||
{
|
||||
mLocalPrefs.mbEmpty = false;
|
||||
|
@ -3191,9 +3251,12 @@ void PrefsDlg::PostModal (int code)
|
|||
SavePrefs();
|
||||
// make sure the logfile is ok
|
||||
Sys_LogFile();
|
||||
#ifdef ATIHACK_812
|
||||
UpdateATIHack();
|
||||
#endif
|
||||
#ifdef ATIHACK_812
|
||||
UpdateATIHack();
|
||||
#endif
|
||||
#ifdef NVIDIA_AERO_HACK
|
||||
UpdateNvidiaAeroHack();
|
||||
#endif
|
||||
if (g_pParentWnd)
|
||||
g_pParentWnd->SetGridStatus();
|
||||
Sys_UpdateWindows(W_ALL);
|
||||
|
|
|
@ -26,6 +26,10 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
#include "gtkr_list.h"
|
||||
//#include "profile.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#define NVIDIA_AERO_HACK
|
||||
#endif
|
||||
|
||||
#define MAX_TEXTURE_QUALITY 3
|
||||
|
||||
enum PrefTypes_t
|
||||
|
@ -485,6 +489,10 @@ public:
|
|||
void UpdateATIHack();
|
||||
#endif
|
||||
|
||||
#ifdef NVIDIA_AERO_HACK
|
||||
void UpdateNvidiaAeroHack();
|
||||
#endif
|
||||
|
||||
void LoadPrefs();
|
||||
void SavePrefs();
|
||||
void LoadTexdefPref(texdef_t* pTexdef, char* pName);
|
||||
|
@ -687,7 +695,12 @@ public:
|
|||
bool m_bQ3Map2Texturing;
|
||||
|
||||
#ifdef ATIHACK_812
|
||||
bool m_bGlATIHack;
|
||||
bool m_bGlATIHack;
|
||||
#endif
|
||||
|
||||
#ifdef NVIDIA_AERO_HACK
|
||||
bool m_bGlNvidiaAeroHack;
|
||||
int m_bGlNvidiaAeroHackPrevState;
|
||||
#endif
|
||||
|
||||
void UpdateData (bool retrieve);
|
||||
|
|
|
@ -313,7 +313,7 @@ $ <b>scons target=setup</b>
|
|||
of Visual C++:</p>
|
||||
<blockquote>
|
||||
<pre width="80" style="background: #CCCCCC; padding: 2mm; border-style: ridge">radiant - 0 error(s), 0 warning(s)
|
||||
========== Build: 37 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
|
||||
========== Build: 38 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
|
||||
</pre>
|
||||
</blockquote>
|
||||
<hr />
|
||||
|
|
Loading…
Reference in a new issue