Remove the excess -mstackrealign and only run the Discord timer if Discord integration is enabled.

This commit is contained in:
OBattler
2025-09-18 00:30:24 +02:00
parent caaa1aad45
commit ac1f091a62
4 changed files with 12 additions and 5 deletions

View File

@@ -14,8 +14,8 @@
# #
# Define our flags # Define our flags
string(APPEND CMAKE_C_FLAGS_INIT " -fomit-frame-pointer -mstackrealign -Wall -fno-strict-aliasing -Werror=implicit-int -Werror=implicit-function-declaration -Werror=int-conversion -Werror=strict-prototypes -Werror=old-style-definition") string(APPEND CMAKE_C_FLAGS_INIT " -fomit-frame-pointer -Wall -fno-strict-aliasing -Werror=implicit-int -Werror=implicit-function-declaration -Werror=int-conversion -Werror=strict-prototypes -Werror=old-style-definition")
string(APPEND CMAKE_CXX_FLAGS_INIT " -fomit-frame-pointer -mstackrealign -Wall -fno-strict-aliasing") string(APPEND CMAKE_CXX_FLAGS_INIT " -fomit-frame-pointer -Wall -fno-strict-aliasing")
string(APPEND CMAKE_C_FLAGS_RELEASE_INIT " -g0 -O3") string(APPEND CMAKE_C_FLAGS_RELEASE_INIT " -g0 -O3")
string(APPEND CMAKE_CXX_FLAGS_RELEASE_INIT " -g0 -O3") string(APPEND CMAKE_CXX_FLAGS_RELEASE_INIT " -g0 -O3")
string(APPEND CMAKE_C_FLAGS_DEBUG_INIT " -ggdb -Og") string(APPEND CMAKE_C_FLAGS_DEBUG_INIT " -ggdb -Og")

View File

@@ -515,6 +515,8 @@ main_thread_fn()
static std::thread *main_thread; static std::thread *main_thread;
QTimer discordupdate;
#ifdef Q_OS_WINDOWS #ifdef Q_OS_WINDOWS
WindowsDarkModeFilter* vmm_dark_mode_filter = nullptr; WindowsDarkModeFilter* vmm_dark_mode_filter = nullptr;
#endif #endif
@@ -865,7 +867,6 @@ main(int argc, char *argv[])
onesec.start(1000); onesec.start(1000);
#ifdef DISCORD #ifdef DISCORD
QTimer discordupdate;
if (discord_loaded) { if (discord_loaded) {
QTimer::singleShot(1000, &app, [] { QTimer::singleShot(1000, &app, [] {
if (enable_discord) { if (enable_discord) {
@@ -877,7 +878,8 @@ main(int argc, char *argv[])
QObject::connect(&discordupdate, &QTimer::timeout, &app, [] { QObject::connect(&discordupdate, &QTimer::timeout, &app, [] {
discord_run_callbacks(); discord_run_callbacks();
}); });
discordupdate.start(1000); if (enable_discord)
discordupdate.start(1000);
} }
#endif #endif

View File

@@ -2344,8 +2344,11 @@ MainWindow::on_actionEnable_Discord_integration_triggered(bool checked)
if (enable_discord) { if (enable_discord) {
discord_init(); discord_init();
discord_update_activity(dopause); discord_update_activity(dopause);
} else discordupdate.start(1000);
} else {
discord_close(); discord_close();
discordupdate.stop();
}
#endif #endif
} }

View File

@@ -15,6 +15,8 @@
#include "qt_vmmanager_protocol.hpp" #include "qt_vmmanager_protocol.hpp"
extern QTimer discordupdate;
class MediaMenu; class MediaMenu;
class RendererStack; class RendererStack;