DXGL r340 - Code Review
For
DXGL
(
recent comments
|
status changes
|
tags
|
authors
|
states
|
release notes
|
statistics
)
Jump to navigation
Jump to search
Repository:
DXGL
Revision:
<
r339
|
r340
|
r341
>
Date:
01:30, 27 February 2013
Author:
admin
Status:
new
Tags:
Comment:
Enable all color depths by default on Windows 8 (and above).
Modified paths:
/cfgmgr/cfgmgr.cpp
(modified) (
history
)
/cfgmgr/cfgmgr.h
(modified) (
history
)
Diff
[
purge
]
Index: cfgmgr/cfgmgr.cpp
—
—
@@ -141,6 +141,7 @@
142
142
cfg->vsync = ReadDWORD(hKey,cfg->vsync,cfgmask->vsync,_T("VSync"));
143
143
cfg->TextureFormat = ReadDWORD(hKey,cfg->TextureFormat,cfgmask->TextureFormat,_T("TextureFormat"));
144
144
cfg->TexUpload = ReadDWORD(hKey,cfg->TexUpload,cfgmask->TexUpload,_T("TexUpload"));
145
+ cfg->Windows8Detected = ReadBool(hKey,cfg->Windows8Detected,cfgmask->Windows8Detected,_T("Windows8Detected"));
145
146
if(!global && dll)
146
147
{
147
148
LPTSTR paths;
—
—
@@ -220,6 +221,7 @@
221
222
WriteDWORD(hKey,cfg->vsync,cfgmask->vsync,_T("VSync"));
222
223
WriteDWORD(hKey,cfg->TextureFormat,cfgmask->TextureFormat,_T("TextureFormat"));
223
224
WriteDWORD(hKey,cfg->TexUpload,cfgmask->TexUpload,_T("TexUpload"));
225
+ WriteBool(hKey,cfg->Windows8Detected,cfgmask->Windows8Detected,_T("Windows8Detected"));
224
226
}
225
227
226
228
tstring newregname;
—
—
@@ -412,6 +414,15 @@
413
415
ZeroMemory(cfg,sizeof(DXGLCFG));
414
416
RegCreateKeyEx(HKEY_CURRENT_USER,regkeyglobal,0,NULL,0,KEY_ALL_ACCESS,NULL,&hKey,NULL);
415
417
ReadSettings(hKey,cfg,NULL,true,false,NULL);
418
+ if(!cfg->Windows8Detected)
419
+ {
420
+ OSVERSIONINFO osver;
421
+ osver.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
422
+ GetVersionEx(&osver);
423
+ if(osver.dwMajorVersion > 6) cfg->Windows8Detected = true;
424
+ if((osver.dwMajorVersion == 6) && (osver.dwMinorVersion >= 2)) cfg->Windows8Detected = true;
425
+ if(cfg->Windows8Detected) cfg->AllColorDepths = true;
426
+ }
416
427
RegCloseKey(hKey);
417
428
}
418
429
Index: cfgmgr/cfgmgr.h
—
—
@@ -37,6 +37,7 @@
38
38
bool ExtraModes;
39
39
DWORD TextureFormat;
40
40
DWORD TexUpload;
41
+ bool Windows8Detected;
41
42
} DXGLCFG;
42
43
43
44
void ReadSettings(HKEY hKey, DXGLCFG *cfg, DXGLCFG *mask, bool global, bool dll, LPTSTR dir);
Navigation menu
Personal tools
Log in
Namespaces
Special page
English
expanded
collapsed
Views
More
expanded
collapsed
Search
Navigation
Home
Main page
Recent changes
Random page
MediaWiki help
Introduction
Progress
Downloads
Source code
Build from source
AppDB
Bug reports
Forums
Tools
Special pages
Printable version