mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-18 02:26:00 +01:00
fix(simulation): the test mode gives nothing to the outside and leaves the player's files alone
The test mode turned off what comes in from outside, but a few settings of the user's eu07.ini still reached out of a test run: - feedbackmode: 1 and 2 toggle Caps Lock / Scroll Lock by injecting key events into the whole system, 3 and 4 drive an LPT port or a PoKeys desk (and 4 reads the desk's switches); - multiplayer: events are reported to a multiplayer server, and some events are held back for it; - execonexit: a program is run with system() at the end of each run, which also waits for it; - showsystemconsole: a console of the run's own pops up and stdout is reopened on it, so whoever started the test with a redirected output doesn't get the `test:` line (and a console the run was started from would be hidden without it); - imgui.ini in the game folder was written by every run, and by several at once with run.py -j. All of these are off in test mode. Nothing changes outside it.
This commit is contained in:
@@ -288,6 +288,11 @@ bool ui_layer::init(GLFWwindow *Window)
|
||||
IMGUI_CHECKVERSION();
|
||||
ImGui::CreateContext();
|
||||
m_imguiio = &ImGui::GetIO();
|
||||
if (Global.test.enabled)
|
||||
{
|
||||
// a test leaves the player's window layout alone (imgui.ini in the game folder), runs in parallel included
|
||||
m_imguiio->IniFilename = nullptr;
|
||||
}
|
||||
ImGui::GetCurrentContext()->ConfigNavWindowingKeyNext = ImGuiKey_None;
|
||||
ImGui::GetCurrentContext()->ConfigNavWindowingKeyPrev = ImGuiKey_None;
|
||||
// imgui.ini is read with the first frame, which may be of another mode than the editor
|
||||
|
||||
Reference in New Issue
Block a user