16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-22 23:19:19 +02:00

Another logic fix cause im dumb

This commit is contained in:
2025-08-21 01:31:58 +02:00
parent 775b507727
commit 10b645114b

View File

@@ -304,25 +304,16 @@ eu07_application::init( int Argc, char *Argv[] ) {
WriteLog( "// startup" ); WriteLog( "// startup" );
if( ( result = init_glfw() ) != 0 ) { if( ( result = init_glfw() ) != 0 ) {
return result;
}
else
{
ErrorLog("Failed to initialize glfw!"); ErrorLog("Failed to initialize glfw!");
return result; return result;
} }
if( needs_ogl() && ( result = init_ogl() ) != 0 ) { if( needs_ogl() && ( result = init_ogl() ) != 0 ) {
return result;
}
else
{
ErrorLog("Failed to initialize ogl!"); ErrorLog("Failed to initialize ogl!");
return result; return result;
} }
if (crashreport_is_pending()) { // run crashgui as early as possible if (crashreport_is_pending()) { // run crashgui as early as possible
if ( ( result = run_crashgui() ) != 0 ) if ((result = run_crashgui()) != 0)
return result;
else
{ {
ErrorLog("Failed to run crash gui!"); ErrorLog("Failed to run crash gui!");
return result; return result;
@@ -330,42 +321,24 @@ eu07_application::init( int Argc, char *Argv[] ) {
} }
if( ( result = init_locale() ) != 0 ) { if( ( result = init_locale() ) != 0 ) {
return result;
}
else
{
ErrorLog("Failed to initialize locales! Maybe you're missing lang directory?"); ErrorLog("Failed to initialize locales! Maybe you're missing lang directory?");
return result; return result;
} }
if( ( result = init_gfx() ) != 0 ) { if( ( result = init_gfx() ) != 0 ) {
return result;
}
else
{
ErrorLog("Failed to initialize GFX!"); ErrorLog("Failed to initialize GFX!");
return result; return result;
} }
if( ( result = init_ui() ) != 0 ) { // ui now depends on activated renderer if( ( result = init_ui() ) != 0 ) { // ui now depends on activated renderer
return result;
}
else
{
ErrorLog("Failed to init UI!"); ErrorLog("Failed to init UI!");
return result; return result;
} }
if( ( result = init_audio() ) != 0 ) { if( ( result = init_audio() ) != 0 ) {
return result;
}
else
{
ErrorLog("Failed to initialize OpenAL"); ErrorLog("Failed to initialize OpenAL");
return result; return result;
} }
if( ( result = init_data() ) != 0 ) { if( ( result = init_data() ) != 0 ) {
return result;
}
else
{
ErrorLog("Failed to load data/ contents! Maybe your installation is broken?"); ErrorLog("Failed to load data/ contents! Maybe your installation is broken?");
return result; return result;
} }
@@ -374,10 +347,6 @@ eu07_application::init( int Argc, char *Argv[] ) {
m_taskqueue.init(); m_taskqueue.init();
} }
if( ( result = init_modes() ) != 0 ) { if( ( result = init_modes() ) != 0 ) {
return result;
}
else
{
ErrorLog("Failed to initialize game modes"); ErrorLog("Failed to initialize game modes");
return result; return result;
} }
@@ -585,9 +554,6 @@ eu07_application::run() {
std::this_thread::sleep_for( Global.minframetime - frametime ); std::this_thread::sleep_for( Global.minframetime - frametime );
} }
} }
Global.applicationQuitOrder = true;
Global.threads["LogService"].join(); // kill log service
Global.threads["DiscordRPC"].join(); // kill DiscordRPC service
return 0; return 0;
} }
@@ -619,6 +585,11 @@ eu07_application::release_python_lock() {
void void
eu07_application::exit() { eu07_application::exit() {
Global.applicationQuitOrder = true;
Global.threads["LogService"].join(); // kill log service
Global.threads["DiscordRPC"].join(); // kill DiscordRPC service
for (auto &mode : m_modes) for (auto &mode : m_modes)
mode.reset(); mode.reset();