mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-05-13 14:06:42 +03:00
Notify about saved screenshot
Show message about saved screenshot via schedule message box. Since screenshot saving happens not in the main thread calling messageBox directly is unsafe. WindowManager::scheduleMessageBox delays message box showing until next update in the main thread.
This commit is contained in:
parent
f7a6be053d
commit
5103120eef
6 changed files with 71 additions and 12 deletions
|
@ -218,6 +218,14 @@ namespace
|
|||
if (Settings::Manager::getInt("async num threads", "Physics") == 0)
|
||||
profiler.removeUserStatsLine(" -Async");
|
||||
}
|
||||
|
||||
struct ScheduleNonDialogMessageBox
|
||||
{
|
||||
void operator()(std::string message) const
|
||||
{
|
||||
MWBase::Environment::get().getWindowManager()->scheduleMessageBox(std::move(message), MWGui::ShowInDialogueMode_Never);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
void OMW::Engine::executeLocalScripts()
|
||||
|
@ -676,7 +684,8 @@ void OMW::Engine::prepareEngine (Settings::Manager & settings)
|
|||
mWorkQueue,
|
||||
new SceneUtil::WriteScreenshotToFileOperation(
|
||||
mCfgMgr.getScreenshotPath().string(),
|
||||
Settings::Manager::getString("screenshot format", "General")
|
||||
Settings::Manager::getString("screenshot format", "General"),
|
||||
ScheduleNonDialogMessageBox {}
|
||||
)
|
||||
);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue