parent
5e35785b8d
commit
412b3db5a8
|
|
@ -582,31 +582,9 @@ void LLViewerTexture::updateClass()
|
|||
{
|
||||
if (!was_backgrounded)
|
||||
{
|
||||
std::string notification_name;
|
||||
std::string setting;
|
||||
if (is_minimized)
|
||||
{
|
||||
notification_name = "TextureDiscardMinimized";
|
||||
setting = "TextureDiscardMinimizedTime";
|
||||
}
|
||||
else
|
||||
{
|
||||
notification_name = "TextureDiscardBackgrounded";
|
||||
setting = "TextureDiscardBackgroundedTime";
|
||||
}
|
||||
|
||||
LL_INFOS() << "Viewer was " << (is_minimized ? "minimized" : "backgrounded") << " for " << discard_time
|
||||
<< "s, freeing up video memory." << LL_ENDL;
|
||||
|
||||
LLNotificationsUtil::add(notification_name, llsd::map("DELAY", discard_time), LLSD(),
|
||||
[=](const LLSD& notification, const LLSD& response)
|
||||
{
|
||||
if (response["Cancel_okcancelignore"].asBoolean())
|
||||
{
|
||||
LL_INFOS() << "User chose to disable texture discard on " << (is_minimized ? "minimizing." : "backgrounding.") << LL_ENDL;
|
||||
gSavedSettings.setF32(setting, -1.f);
|
||||
}
|
||||
});
|
||||
last_desired_discard_bias = sDesiredDiscardBias;
|
||||
was_backgrounded = true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue