mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-10-12 10:28:08 +00:00
[idd] driver: cleanup duplicated string constant
This commit is contained in:

committed by
Geoffrey McRae

parent
13ae3441cf
commit
b6ceb72855
@@ -4,7 +4,8 @@
|
|||||||
#include <wdf.h>
|
#include <wdf.h>
|
||||||
|
|
||||||
CSettings g_settings;
|
CSettings g_settings;
|
||||||
static const std::wstring subKey = L"SOFTWARE\\LookingGlass\\IDD";
|
|
||||||
|
#define LGIDD_REGKEY L"SOFTWARE\\LookingGlass\\IDD"
|
||||||
|
|
||||||
static const DWORD DefaultDisplayModes[][3] =
|
static const DWORD DefaultDisplayModes[][3] =
|
||||||
{
|
{
|
||||||
@@ -79,7 +80,7 @@ void CSettings::SetExtraMode(const DisplayMode& mode)
|
|||||||
DWORD disp = 0;
|
DWORD disp = 0;
|
||||||
LONG ec = RegCreateKeyExW(
|
LONG ec = RegCreateKeyExW(
|
||||||
HKEY_LOCAL_MACHINE,
|
HKEY_LOCAL_MACHINE,
|
||||||
L"Software\\LookingGlass\\IDD",
|
LGIDD_REGKEY,
|
||||||
0, NULL, REG_OPTION_NON_VOLATILE,
|
0, NULL, REG_OPTION_NON_VOLATILE,
|
||||||
KEY_SET_VALUE,
|
KEY_SET_VALUE,
|
||||||
NULL, &hKey, &disp);
|
NULL, &hKey, &disp);
|
||||||
@@ -102,7 +103,7 @@ bool CSettings::GetExtraMode(DisplayMode& mode)
|
|||||||
HKEY hKey = nullptr;
|
HKEY hKey = nullptr;
|
||||||
LONG ec = RegOpenKeyExW(
|
LONG ec = RegOpenKeyExW(
|
||||||
HKEY_LOCAL_MACHINE,
|
HKEY_LOCAL_MACHINE,
|
||||||
L"Software\\LookingGlass\\IDD",
|
LGIDD_REGKEY,
|
||||||
0,
|
0,
|
||||||
KEY_QUERY_VALUE,
|
KEY_QUERY_VALUE,
|
||||||
&hKey
|
&hKey
|
||||||
@@ -137,7 +138,7 @@ bool CSettings::GetExtraMode(DisplayMode& mode)
|
|||||||
bool CSettings::ReadModesValue(std::vector<std::wstring> &out) const
|
bool CSettings::ReadModesValue(std::vector<std::wstring> &out) const
|
||||||
{
|
{
|
||||||
HKEY hKey = nullptr;
|
HKEY hKey = nullptr;
|
||||||
LONG st = RegOpenKeyExW(HKEY_LOCAL_MACHINE, subKey.c_str(), 0, KEY_QUERY_VALUE, &hKey);
|
LONG st = RegOpenKeyExW(HKEY_LOCAL_MACHINE, LGIDD_REGKEY, 0, KEY_QUERY_VALUE, &hKey);
|
||||||
if (st != ERROR_SUCCESS)
|
if (st != ERROR_SUCCESS)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user