DXGL r820 - Code Review
For
DXGL
(
recent comments
|
status changes
|
tags
|
authors
|
states
|
release notes
|
statistics
)
Jump to navigation
Jump to search
Repository:
DXGL
Revision:
<
r819
|
r820
|
r821
>
Date:
00:17, 23 June 2018
Author:
admin
Status:
new
Tags:
Comment:
Fix detection of Windows 8 and above, and combine added color depths with the previous ones.
Modified paths:
/cfgmgr/cfgmgr.c
(modified) (
history
)
Diff
[
purge
]
Index: cfgmgr/cfgmgr.c
—
—
@@ -681,6 +681,15 @@
682
682
RegSetValueEx(hKey, _T("InstallPath"), 0, REG_SZ,
683
683
(LPBYTE)path, _tcslen(path) * sizeof(TCHAR));
684
684
}
685
+ if (global && !cfg->Windows8Detected)
686
+ {
687
+ OSVERSIONINFO osver;
688
+ osver.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
689
+ GetVersionEx(&osver);
690
+ if (osver.dwMajorVersion > 6) cfg->Windows8Detected = TRUE;
691
+ if ((osver.dwMajorVersion == 6) && (osver.dwMinorVersion >= 2)) cfg->Windows8Detected = TRUE;
692
+ if (cfg->Windows8Detected) cfg->AddColorDepths |= 1 | 4 | 16;
693
+ }
685
694
}
686
695
687
696
void WriteBool(HKEY hKey, BOOL value, BOOL mask, LPCTSTR name)
—
—
@@ -936,7 +945,7 @@
937
946
GetVersionEx(&osver);
938
947
if (osver.dwMajorVersion > 6) Windows8Detected = TRUE;
939
948
if ((osver.dwMajorVersion == 6) && (osver.dwMinorVersion >= 2)) Windows8Detected = TRUE;
940
- if (Windows8Detected) cfg->AddColorDepths = 1 | 4 | 16;
949
+ if (Windows8Detected) cfg->AddColorDepths |= (1 | 4 | 16);
941
950
}
942
951
}
943
952
—
—
@@ -1172,15 +1181,6 @@
1173
1182
GetDefaultConfig(cfg);
1174
1183
ReadINI(cfg);
1175
1184
}
1176
- if (!cfg->Windows8Detected)
1177
- {
1178
- OSVERSIONINFO osver;
1179
- osver.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
1180
- GetVersionEx(&osver);
1181
- if (osver.dwMajorVersion > 6) cfg->Windows8Detected = TRUE;
1182
- if ((osver.dwMajorVersion == 6) && (osver.dwMinorVersion >= 2)) cfg->Windows8Detected = TRUE;
1183
- if (cfg->Windows8Detected) cfg->AddColorDepths = 1 | 4 | 16;
1184
- }
1185
1185
if (initial || cfg->NoWriteRegistry) RegOpenKeyEx(HKEY_CURRENT_USER, cfg->regkey, 0, KEY_READ, &hKey);
1186
1186
else
1187
1187
{
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