winefile: Change the settings functions to use the W registry functions.
This commit is contained in:
parent
f987ca01d0
commit
837bd5356d
|
@ -1593,24 +1593,24 @@ static windowOptions load_registry_settings(void)
|
|||
HKEY hKey;
|
||||
windowOptions opts;
|
||||
|
||||
RegOpenKeyEx( HKEY_CURRENT_USER, registry_key,
|
||||
RegOpenKeyExW( HKEY_CURRENT_USER, registry_key,
|
||||
0, KEY_QUERY_VALUE, &hKey );
|
||||
|
||||
size = sizeof(DWORD);
|
||||
|
||||
if( RegQueryValueEx( hKey, reg_start_x, NULL, &type,
|
||||
if( RegQueryValueExW( hKey, reg_start_x, NULL, &type,
|
||||
(LPBYTE) &opts.start_x, &size ) != ERROR_SUCCESS )
|
||||
opts.start_x = CW_USEDEFAULT;
|
||||
|
||||
if( RegQueryValueEx( hKey, reg_start_y, NULL, &type,
|
||||
if( RegQueryValueExW( hKey, reg_start_y, NULL, &type,
|
||||
(LPBYTE) &opts.start_y, &size ) != ERROR_SUCCESS )
|
||||
opts.start_y = CW_USEDEFAULT;
|
||||
|
||||
if( RegQueryValueEx( hKey, reg_width, NULL, &type,
|
||||
if( RegQueryValueExW( hKey, reg_width, NULL, &type,
|
||||
(LPBYTE) &opts.width, &size ) != ERROR_SUCCESS )
|
||||
opts.width = CW_USEDEFAULT;
|
||||
|
||||
if( RegQueryValueEx( hKey, reg_height, NULL, &type,
|
||||
if( RegQueryValueExW( hKey, reg_height, NULL, &type,
|
||||
(LPBYTE) &opts.height, &size ) != ERROR_SUCCESS )
|
||||
opts.height = CW_USEDEFAULT;
|
||||
|
||||
|
@ -1630,11 +1630,11 @@ static void save_registry_settings(void)
|
|||
width = wi.rcWindow.right - wi.rcWindow.left;
|
||||
height = wi.rcWindow.bottom - wi.rcWindow.top;
|
||||
|
||||
if ( RegOpenKeyEx( HKEY_CURRENT_USER, registry_key,
|
||||
if ( RegOpenKeyExW( HKEY_CURRENT_USER, registry_key,
|
||||
0, KEY_SET_VALUE, &hKey ) != ERROR_SUCCESS )
|
||||
{
|
||||
/* Unable to save registry settings - try to create key */
|
||||
if ( RegCreateKeyEx( HKEY_CURRENT_USER, registry_key,
|
||||
if ( RegCreateKeyExW( HKEY_CURRENT_USER, registry_key,
|
||||
0, NULL, REG_OPTION_NON_VOLATILE,
|
||||
KEY_SET_VALUE, NULL, &hKey, NULL ) != ERROR_SUCCESS )
|
||||
{
|
||||
|
@ -1643,13 +1643,13 @@ static void save_registry_settings(void)
|
|||
}
|
||||
}
|
||||
/* Save all of the settings */
|
||||
RegSetValueEx( hKey, reg_start_x, 0, REG_DWORD,
|
||||
RegSetValueExW( hKey, reg_start_x, 0, REG_DWORD,
|
||||
(LPBYTE) &wi.rcWindow.left, sizeof(DWORD) );
|
||||
RegSetValueEx( hKey, reg_start_y, 0, REG_DWORD,
|
||||
RegSetValueExW( hKey, reg_start_y, 0, REG_DWORD,
|
||||
(LPBYTE) &wi.rcWindow.top, sizeof(DWORD) );
|
||||
RegSetValueEx( hKey, reg_width, 0, REG_DWORD,
|
||||
RegSetValueExW( hKey, reg_width, 0, REG_DWORD,
|
||||
(LPBYTE) &width, sizeof(DWORD) );
|
||||
RegSetValueEx( hKey, reg_height, 0, REG_DWORD,
|
||||
RegSetValueExW( hKey, reg_height, 0, REG_DWORD,
|
||||
(LPBYTE) &height, sizeof(DWORD) );
|
||||
|
||||
/* TODO: Save more settings here (List vs. Detailed View, etc.) */
|
||||
|
|
Loading…
Reference in New Issue