mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-04-22 15:41:57 +02:00
Fix ptsave: being handled before autorun.lua
This would leave saves opened this way missing elements, but also not produce a warning in the preview, because by that time that preview is made, autorun.lua has been run.
This commit is contained in:
parent
452849df74
commit
a7d73102d6
@ -484,6 +484,7 @@ int Main(int argc, char *argv[])
|
||||
explicitSingletons->gameController = std::make_unique<GameController>();
|
||||
auto *gameController = explicitSingletons->gameController.get();
|
||||
engine.ShowWindow(gameController->GetView());
|
||||
gameController->InitCommandInterface();
|
||||
|
||||
auto openArg = arguments["open"];
|
||||
if (openArg.has_value())
|
||||
|
@ -713,12 +713,16 @@ bool GameController::KeyRelease(int key, int scan, bool repeat, bool shift, bool
|
||||
return ret;
|
||||
}
|
||||
|
||||
void GameController::InitCommandInterface()
|
||||
{
|
||||
commandInterface->Init();
|
||||
}
|
||||
|
||||
void GameController::Tick()
|
||||
{
|
||||
gameModel->Tick();
|
||||
if(firstTick)
|
||||
{
|
||||
commandInterface->Init();
|
||||
if constexpr (INSTALL_CHECK)
|
||||
{
|
||||
if (Client::Ref().IsFirstRun())
|
||||
|
@ -211,4 +211,5 @@ public:
|
||||
bool ThreadedRenderingAllowed();
|
||||
|
||||
void SetToolIndex(ByteString identifier, std::optional<int> index);
|
||||
void InitCommandInterface();
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user