mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-03-22 15:05:03 +01:00
add execonexit
This commit is contained in:
@@ -886,6 +886,11 @@ global_settings::ConfigParse(cParser &Parser) {
|
||||
Parser.getTokens(1);
|
||||
Parser >> gui_screensscale;
|
||||
}
|
||||
else if (token == "execonexit") {
|
||||
Parser.getTokens(1);
|
||||
Parser >> exec_on_exit;
|
||||
std::replace(std::begin(exec_on_exit), std::end(exec_on_exit), '_', ' ');
|
||||
}
|
||||
} while ((token != "") && (token != "endconfig")); //(!Parser->EndOfFile)
|
||||
// na koniec trochę zależności
|
||||
if (!bLoadTraction) // wczytywanie drutów i słupów
|
||||
|
||||
@@ -210,6 +210,8 @@ struct global_settings {
|
||||
float map_highlight_distance = 3000.0f;
|
||||
float gui_screensscale = 0.5f;
|
||||
|
||||
std::string exec_on_exit;
|
||||
|
||||
struct extraviewport_config {
|
||||
std::string monitor;
|
||||
int width, height;
|
||||
|
||||
@@ -350,6 +350,9 @@ eu07_application::exit() {
|
||||
}
|
||||
m_taskqueue.exit();
|
||||
glfwTerminate();
|
||||
|
||||
if (!Global.exec_on_exit.empty())
|
||||
system(Global.exec_on_exit.c_str());
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user