Commit 8e4c196c authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

win32u: Remove unnecessary config_key lazy initializations.

parent 7175d885
...@@ -565,8 +565,7 @@ static BOOL adapter_get_registry_settings( const struct adapter *adapter, DEVMOD ...@@ -565,8 +565,7 @@ static BOOL adapter_get_registry_settings( const struct adapter *adapter, DEVMOD
mutex = get_display_device_init_mutex(); mutex = get_display_device_init_mutex();
if (!config_key && !(config_key = reg_open_key( NULL, config_keyW, sizeof(config_keyW) ))) ret = FALSE; if (!(hkey = reg_open_key( config_key, adapter->config_key, lstrlenW( adapter->config_key ) * sizeof(WCHAR) ))) ret = FALSE;
else if (!(hkey = reg_open_key( config_key, adapter->config_key, lstrlenW( adapter->config_key ) * sizeof(WCHAR) ))) ret = FALSE;
else else
{ {
ret = read_adapter_mode( hkey, ENUM_REGISTRY_SETTINGS, mode ); ret = read_adapter_mode( hkey, ENUM_REGISTRY_SETTINGS, mode );
...@@ -585,7 +584,6 @@ static BOOL adapter_set_registry_settings( const struct adapter *adapter, const ...@@ -585,7 +584,6 @@ static BOOL adapter_set_registry_settings( const struct adapter *adapter, const
mutex = get_display_device_init_mutex(); mutex = get_display_device_init_mutex();
if (!config_key && !(config_key = reg_open_key( NULL, config_keyW, sizeof(config_keyW) ))) ret = FALSE;
if (!(hkey = reg_open_key( config_key, adapter->config_key, lstrlenW( adapter->config_key ) * sizeof(WCHAR) ))) ret = FALSE; if (!(hkey = reg_open_key( config_key, adapter->config_key, lstrlenW( adapter->config_key ) * sizeof(WCHAR) ))) ret = FALSE;
else else
{ {
...@@ -614,8 +612,7 @@ static BOOL adapter_get_current_settings( const struct adapter *adapter, DEVMODE ...@@ -614,8 +612,7 @@ static BOOL adapter_get_current_settings( const struct adapter *adapter, DEVMODE
mutex = get_display_device_init_mutex(); mutex = get_display_device_init_mutex();
if (!config_key && !(config_key = reg_open_key( NULL, config_keyW, sizeof(config_keyW) ))) ret = FALSE; if (!(hkey = reg_open_key( config_key, adapter->config_key, lstrlenW( adapter->config_key ) * sizeof(WCHAR) ))) ret = FALSE;
else if (!(hkey = reg_open_key( config_key, adapter->config_key, lstrlenW( adapter->config_key ) * sizeof(WCHAR) ))) ret = FALSE;
else else
{ {
ret = read_adapter_mode( hkey, ENUM_CURRENT_SETTINGS, mode ); ret = read_adapter_mode( hkey, ENUM_CURRENT_SETTINGS, mode );
...@@ -634,7 +631,6 @@ static BOOL adapter_set_current_settings( const struct adapter *adapter, const D ...@@ -634,7 +631,6 @@ static BOOL adapter_set_current_settings( const struct adapter *adapter, const D
mutex = get_display_device_init_mutex(); mutex = get_display_device_init_mutex();
if (!config_key && !(config_key = reg_open_key( NULL, config_keyW, sizeof(config_keyW) ))) ret = FALSE;
if (!(hkey = reg_open_key( config_key, adapter->config_key, lstrlenW( adapter->config_key ) * sizeof(WCHAR) ))) ret = FALSE; if (!(hkey = reg_open_key( config_key, adapter->config_key, lstrlenW( adapter->config_key ) * sizeof(WCHAR) ))) ret = FALSE;
else else
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment