EXP-225 FIX Add debug setting to quit the viewer after N seconds of AFK behavior.

Viewer specific setting for this feature including default value in settings file
meow-7.2.2
callum 2010-10-14 15:18:00 -07:00
parent 55d7de0df2
commit eea2b8f9d3
2 changed files with 23 additions and 0 deletions

View File

@ -6403,6 +6403,17 @@
<key>Value</key>
<real>0.0</real>
</map>
<key>QuitAfterSecondsOfAFK</key>
<map>
<key>Comment</key>
<string>The duration allowed after being AFK before quitting.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>F32</string>
<key>Value</key>
<real>0.0</real>
</map>
<key>QuitOnLoginActivated</key>
<map>
<key>Comment</key>

View File

@ -3569,6 +3569,18 @@ void LLAppViewer::idle()
}
}
// debug setting to quit after N seconds of being AFK - 0 to never do this
F32 qas_afk = gSavedSettings.getF32("QuitAfterSecondsOfAFK");
if (qas_afk > 0.f)
{
// idle time is more than setting
if ( gAwayTriggerTimer.getElapsedTimeF32() > qas_afk )
{
// go ahead and just quit
LLAppViewer::instance()->forceQuit();
}
}
// Must wait until both have avatar object and mute list, so poll
// here.
request_initial_instant_messages();