DXGL r742 - Code Review

Jump to navigation Jump to search
Repository:DXGL
Revision:r741‎ | r742 | r743 >
Date:04:13, 5 September 2017
Author:admin
Status:new
Tags:
Comment:
Fix INI option NoWriteRegistry.
Modified paths:
  • /cfgmgr/cfgmgr.c (modified) (history)

Diff [purge]

Index: cfgmgr/cfgmgr.c
@@ -990,7 +990,7 @@
991991 if ((osver.dwMajorVersion == 6) && (osver.dwMinorVersion >= 2)) cfg->Windows8Detected = TRUE;
992992 if (cfg->Windows8Detected) cfg->AddColorDepths = 1 | 4 | 16;
993993 }
994 - if (initial) RegOpenKeyEx(HKEY_CURRENT_USER, regkey, 0, KEY_READ, &hKey);
 994+ if (initial || cfg->NoWriteRegistry) RegOpenKeyEx(HKEY_CURRENT_USER, regkey, 0, KEY_READ, &hKey);
995995 else
996996 {
997997 RegCreateKeyEx(HKEY_CURRENT_USER, regkeyglobal, 0, NULL, 0, KEY_ALL_ACCESS, NULL, &hKey, NULL);