[Base] Moved IsUseNexusForGameBarEnabled from emulator_window to system.h
This will remove direct usage of system specific code from emulator_window
This commit is contained in:
committed by
Radosław Gliński
parent
bcc3c3172d
commit
9dfb0d0b68
@@ -64,4 +64,17 @@ bool SetProcessPriorityClass(const uint32_t priority_class) {
|
||||
xeniaToWindowsPriorityClassMapping[priority_class]);
|
||||
}
|
||||
|
||||
bool IsUseNexusForGameBarEnabled() {
|
||||
const LPCWSTR reg_path = L"SOFTWARE\\Microsoft\\GameBar";
|
||||
const LPCWSTR key = L"UseNexusForGameBarEnabled";
|
||||
|
||||
DWORD value = 0;
|
||||
DWORD dataSize = sizeof(value);
|
||||
|
||||
RegGetValue(HKEY_CURRENT_USER, reg_path, key, RRF_RT_DWORD, nullptr, &value,
|
||||
&dataSize);
|
||||
|
||||
return static_cast<bool>(value);
|
||||
}
|
||||
|
||||
} // namespace xe
|
||||
|
||||
Reference in New Issue
Block a user