void IniSaver::Entry( const wxString& var, Fixed100& value, const Fixed100 defvalue ) { if( !m_Config ) return; // Note: the "easy" way would be to convert to double and load/save that, but floating point // has way too much rounding error so we really need to do things out manually, using strings. m_Config->Write( var, value.ToString() ); }
void IniLoader::Entry( const wxString& var, Fixed100& value, const Fixed100 defvalue ) { // Note: the "easy" way would be to convert to double and load/save that, but floating point // has way too much rounding error so we really need to do things out manually.. >_< wxString readval( value.ToString() ); if( m_Config ) m_Config->Read( var, &readval ); value = Fixed100::FromString( readval, value ); }