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