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