Rein Klazes wijn@wanadoo.nl writes:
@@ -776,7 +781,7 @@ static inline BOOL get_bool_param( unsig }
/* set a uint parameter that is mirrored in two different registry locations */ -static BOOL set_uint_param_mirrored( unsigned int idx, LPCWSTR regkey, LPCWSTR regkey_mirror, +static BOOL set_uint_param_mirrored( int idx, LPCWSTR regkey, LPCWSTR regkey_mirror, LPCWSTR value, UINT *value_ptr, UINT new_val, UINT fWinIni ) { WCHAR buf[10]; @@ -785,19 +790,19 @@ static BOOL set_uint_param_mirrored( uns if (!SYSPARAMS_Save( regkey, value, buf, fWinIni )) return FALSE; if (regkey_mirror) SYSPARAMS_Save( regkey_mirror, value, buf, fWinIni ); *value_ptr = new_val;
- spi_loaded[idx] = TRUE;
- if( idx >= 0) spi_loaded[idx] = TRUE;
I think that's ugly, you shouldn't use set_uint_param if you don't want to set the index (and especially since in your case the params are ints not uints). Just call SYSPARAMS_Save directly instead.