Merge pull request #1047 from RytoEX/log-win10-game-mode
Log Windows 10 Gaming Features (Game Mode)
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
#include "platform.h"
|
||||
#include "darray.h"
|
||||
#include "dstr.h"
|
||||
#include "windows/win-registry.h"
|
||||
#include "windows/win-version.h"
|
||||
|
||||
#include "../../deps/w32-pthreads/pthread.h"
|
||||
@@ -800,6 +801,28 @@ bool is_64_bit_windows(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
void get_reg_dword(HKEY hkey, LPCWSTR sub_key, LPCWSTR value_name,
|
||||
struct reg_dword *info)
|
||||
{
|
||||
struct reg_dword reg = {0};
|
||||
HKEY key;
|
||||
LSTATUS status;
|
||||
|
||||
status = RegOpenKeyEx(hkey, sub_key, 0, KEY_READ, &key);
|
||||
|
||||
if (status != ERROR_SUCCESS)
|
||||
return;
|
||||
|
||||
reg.size = sizeof(reg.return_value);
|
||||
|
||||
reg.status = RegQueryValueExW(key, value_name, NULL, NULL,
|
||||
(LPBYTE)®.return_value, ®.size);
|
||||
|
||||
RegCloseKey(key);
|
||||
|
||||
*info = reg;
|
||||
}
|
||||
|
||||
#define WINVER_REG_KEY L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion"
|
||||
|
||||
void get_win_ver(struct win_version_info *info)
|
||||
|
Reference in New Issue
Block a user