mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-08 14:59:43 +01:00
fix(app): a scenario failing as it loads goes back to the launcher too, the files of other cases looked for only off Windows
A scenario failing past its opening popped the loader mode and went on to pop it again and push the driver mode with the scenery half loaded; it goes back to the launcher as one that can't be opened. FileCased() goes through the folder only where the file system tells the case apart: on Windows a missing file was looked for in its whole folder for nothing, and a name outside the code page threw from the parser. The Discord thread sleeps a quarter of a second outside the driver mode, not to hold the closing up.
This commit is contained in:
@@ -272,7 +272,7 @@ void eu07_application::DiscordRPCService()
|
||||
if (currentMode != mode::driver)
|
||||
{
|
||||
// the editor and the other modes: nothing to tell, without spinning a core on it
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(1000));
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(250));
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -67,8 +67,13 @@ bool scenarioloader_mode::update() {
|
||||
return true;
|
||||
}
|
||||
catch (invalid_scenery_exception &e) {
|
||||
// back to the launcher as when the scenario can't be opened, not on to the driver mode with the scenery half loaded
|
||||
ErrorLog( "Bad init: scenario loading failed" );
|
||||
state.reset();
|
||||
Global.SceneryFile.clear();
|
||||
Application.pop_mode();
|
||||
Application.push_mode(eu07_application::mode::launcher);
|
||||
return true;
|
||||
}
|
||||
// the loading state holds the scenario file open, which on some systems keeps the file from being replaced
|
||||
// when the scenery is saved in the editor. it'd also get in the way of another load
|
||||
|
||||
@@ -598,7 +598,7 @@ void ui_layer::render_hierarchy(){
|
||||
|
||||
if (ImGui::IsItemHovered())
|
||||
{
|
||||
ImGui::SetTooltip(STR_C("UUID: %s\nNode type: %s"),uuid.c_str(), typeid(*node).name());
|
||||
ImGui::SetTooltip(STR_C("UUID: %s\nNode type: %s"), uuid.c_str(), typeid(*node).name());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user