medfall

A super great game engine
Log | Files | Refs

commit f9b1d0d4a1452004f9fca8e41619c504526d3aff
parent 0e4f45ed4ef71ac144631181ad1d086db5a6e30c
Author: Michael Savage <mikejsavage@gmail.com>
Date:   Sat Sep  2 21:32:36 +0300

Back to RegSetValueEx because RegSetValue doesn't seem to work

Diffstat:
launcher/main.cc | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/launcher/main.cc b/launcher/main.cc @@ -482,7 +482,7 @@ static void set_registry_key( HKEY hkey, const char * path, const char * value, } SCOPE_EXIT( RegCloseKey( key ) ); - LONG ok_set = RegSetValueA( key, value, REG_SZ, data, checked_cast< DWORD >( strlen( data ) + 1 ) ); + LONG ok_set = RegSetValueExA( key, value, 0, REG_SZ, ( const BYTE * ) data, checked_cast< DWORD >( strlen( data ) + 1 ) ); if( ok_set != ERROR_SUCCESS ) { WARN( "couldn't write registry key ({})", ok_set ); } @@ -497,7 +497,7 @@ static void set_registry_key( HKEY hkey, const char * path, const char * value, } SCOPE_EXIT( RegCloseKey( key ) ); - LONG ok_set = RegSetValueA( key, value, REG_DWORD, ( LPCSTR ) &data, sizeof( data ) ); + LONG ok_set = RegSetValueExA( key, value, 0, REG_DWORD, ( const BYTE * ) &data, sizeof( data ) ); if( ok_set != ERROR_SUCCESS ) { WARN( "couldn't write registry key ({})", ok_set ); }