Add m_crashRecoveryDisabled to new settings API
This commit is contained in:
@@ -298,12 +298,6 @@ OverlayController::OverlayController( bool desktopMode,
|
||||
m_customTickRateMs = value.toInt();
|
||||
}
|
||||
}
|
||||
value = appSettings()->value( "crashRecoveryDisabled",
|
||||
m_crashRecoveryDisabled );
|
||||
if ( value.isValid() && !value.isNull() )
|
||||
{
|
||||
m_crashRecoveryDisabled = value.toBool();
|
||||
}
|
||||
value = appSettings()->value( "enableDebug", m_enableDebug );
|
||||
if ( value.isValid() && !value.isNull() )
|
||||
{
|
||||
@@ -735,23 +729,17 @@ void OverlayController::processInputBindings()
|
||||
|
||||
bool OverlayController::crashRecoveryDisabled() const
|
||||
{
|
||||
return m_crashRecoveryDisabled;
|
||||
return settings::getSetting(
|
||||
settings::BoolSetting::APPLICATION_crashRecoveryDisabled );
|
||||
}
|
||||
|
||||
void OverlayController::setCrashRecoveryDisabled( bool value, bool notify )
|
||||
{
|
||||
if ( m_crashRecoveryDisabled == value )
|
||||
{
|
||||
return;
|
||||
}
|
||||
m_crashRecoveryDisabled = value;
|
||||
appSettings()->beginGroup( "applicationSettings" );
|
||||
appSettings()->setValue( "crashRecoveryDisabled", m_crashRecoveryDisabled );
|
||||
appSettings()->endGroup();
|
||||
appSettings()->sync();
|
||||
settings::setSetting(
|
||||
settings::BoolSetting::APPLICATION_crashRecoveryDisabled, value );
|
||||
if ( notify )
|
||||
{
|
||||
emit crashRecoveryDisabledChanged( m_crashRecoveryDisabled );
|
||||
emit crashRecoveryDisabledChanged( value );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -121,7 +121,6 @@ private:
|
||||
|
||||
bool m_desktopMode;
|
||||
bool m_noSound;
|
||||
bool m_crashRecoveryDisabled = false;
|
||||
bool m_enableDebug = false;
|
||||
bool m_disableVersionCheck = false;
|
||||
bool m_newVersionDetected = false;
|
||||
|
||||
@@ -26,6 +26,7 @@ enum class BoolSetting
|
||||
APPLICATION_disableVersionCheck,
|
||||
APPLICATION_previousShutdownSafe,
|
||||
APPLICATION_vsyncDisabled,
|
||||
APPLICATION_crashRecoveryDisabled,
|
||||
|
||||
VIDEO_brightnessEnabled,
|
||||
VIDEO_isOverlayMethodActive,
|
||||
|
||||
@@ -231,6 +231,10 @@ private:
|
||||
SettingCategory::Application,
|
||||
QtInfo{ "vsyncDisabled" },
|
||||
false },
|
||||
BoolSettingValue{ BoolSetting::APPLICATION_crashRecoveryDisabled,
|
||||
SettingCategory::Application,
|
||||
QtInfo{ "crashRecoveryDisabled" },
|
||||
false },
|
||||
|
||||
BoolSettingValue{ BoolSetting::VIDEO_brightnessEnabled,
|
||||
SettingCategory::Video,
|
||||
|
||||
Reference in New Issue
Block a user