mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-24 23:34:37 +01:00
Load the save previews in the background
This commit is contained in:
@@ -160,6 +160,8 @@ namespace OpenRCT2
|
||||
std::thread::id _mainThreadId{};
|
||||
Timer _forcedUpdateTimer;
|
||||
|
||||
BackgroundWorker _backgroundWorker;
|
||||
|
||||
public:
|
||||
// Singleton of Context.
|
||||
// Remove this when GetContext() is no longer called so that
|
||||
@@ -1333,6 +1335,8 @@ namespace OpenRCT2
|
||||
_ticksAccumulator -= kGameUpdateTimeMS;
|
||||
}
|
||||
|
||||
_backgroundWorker.dispatchCompleted();
|
||||
|
||||
ContextHandleInput();
|
||||
WindowUpdateAll();
|
||||
|
||||
@@ -1366,6 +1370,8 @@ namespace OpenRCT2
|
||||
tweener.PostTick();
|
||||
}
|
||||
|
||||
_backgroundWorker.dispatchCompleted();
|
||||
|
||||
ContextHandleInput();
|
||||
WindowUpdateAll();
|
||||
|
||||
@@ -1550,6 +1556,11 @@ namespace OpenRCT2
|
||||
{
|
||||
return _timeScale;
|
||||
}
|
||||
|
||||
BackgroundWorker& GetBackgroundWorker() override
|
||||
{
|
||||
return _backgroundWorker;
|
||||
}
|
||||
};
|
||||
|
||||
Context* Context::Instance = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user