18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-19 22:44:59 +01:00

Merge remote-tracking branch 'origin/master' into feat/persistent-odometer-store

# Conflicts:
#	vehicle/DynObj.h
This commit is contained in:
jerrrrycho
2026-11-11 08:17:40 +01:00
70 changed files with 11421 additions and 369 deletions

View File

@@ -18,6 +18,7 @@ http://mozilla.org/MPL/2.0/.
#include "utilities/utilities.h"
#include "simulation/simulation.h"
#include "simulation/simulationsounds.h"
#include "simulation/blackboxrecorder.h"
#include "vehicle/Train.h"
#include "utilities/dictionary.h"
#include "scene/sceneeditor.h"
@@ -425,6 +426,16 @@ int eu07_application::init(int Argc, char *Argv[])
{
m_taskqueue.init();
}
crashreport_add_info("luascreens_enabled", Global.luascreens_enabled ? "yes" : "no");
crashreport_add_info("wasm_enabled", Global.wasm_enabled ? "yes" : "no");
if (Global.luascreens_enabled || Global.wasm_enabled)
{
m_screenqueue.init();
if (Global.screens_gpupost)
{
m_screenqueue.set_post_processor(GfxRenderer->Screen_post_processor());
}
}
if ((result = init_modes()) != 0)
{
ErrorLog("Failed to initialize game modes");
@@ -635,6 +646,7 @@ int eu07_application::run()
EditorTerrain.update(Global.pCamera.Pos);
m_taskqueue.update();
m_screenqueue.update();
opengl_texture::reset_unit_cache();
if (!GfxRenderer->Render())
@@ -715,11 +727,15 @@ void eu07_application::exit()
auto const step = [closing](char const *What) {
WriteLog(std::format("Closing: {} at {} ms", What, std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::steady_clock::now() - closing).count()));
};
step("the black box");
simulation::Blackbox.close();
step("the modes");
for (auto &mode : m_modes)
mode.reset();
step("the renderer");
// the screens' post-processing goes with the renderer
m_screenqueue.set_post_processor(nullptr);
GfxRenderer->Shutdown();
m_network.reset();
@@ -734,6 +750,7 @@ void eu07_application::exit()
// the python workers detach their GL context on the way out, so they have to be done before the windows they use are destroyed
m_taskqueue.exit();
m_screenqueue.exit();
step("the windows");
for (auto *window : m_windows)
{