This commit is contained in:
luboslenco
2025-10-15 19:52:43 +02:00
parent 157dd4a647
commit 265950c533
4 changed files with 11 additions and 6 deletions
+4
View File
@@ -1261,3 +1261,7 @@ bool iron_gamepad_connected(int num) {
void iron_gamepad_rumble(int gamepad, float left, float right) {} void iron_gamepad_rumble(int gamepad, float left, float right) {}
#endif #endif
bool _save_and_quit_callback_internal() {
return false;
}
+4
View File
@@ -593,3 +593,7 @@ bool iron_gamepad_connected(int num) {
void iron_gamepad_rumble(int gamepad, float left, float right) {} void iron_gamepad_rumble(int gamepad, float left, float right) {}
#endif #endif
bool _save_and_quit_callback_internal() {
return false;
}
+3 -1
View File
@@ -1499,8 +1499,10 @@ void iron_gamepad_rumble(int gamepad, float left, float right) {}
#ifdef WITH_NFD // Has gtk #ifdef WITH_NFD // Has gtk
#include <gtk/gtk.h> #include <gtk/gtk.h>
extern void (*iron_save_and_quit)(bool); extern void (*iron_save_and_quit)(bool);
#endif
bool _save_and_quit_callback_internal() { bool _save_and_quit_callback_internal() {
#ifdef WITH_NFD // Has gtk
bool save = false; bool save = false;
XTextProperty text_prop; XTextProperty text_prop;
XGetTextProperty(x11_ctx.display, x11_ctx.windows[0].window, &text_prop, NET_WM_NAME); XGetTextProperty(x11_ctx.display, x11_ctx.windows[0].window, &text_prop, NET_WM_NAME);
@@ -1528,9 +1530,9 @@ bool _save_and_quit_callback_internal() {
} }
} }
iron_save_and_quit(save); iron_save_and_quit(save);
#endif
return false; return false;
} }
#endif
#include <signal.h> #include <signal.h>
#include <sys/wait.h> #include <sys/wait.h>
-5
View File
@@ -1379,15 +1379,10 @@ void iron_file_download(string_t *url, void (*callback)(char *, buffer_t *), i32
iron_https_request(url_base, url_path, NULL, 443, 0, &_https_callback, cbd); iron_https_request(url_base, url_path, NULL, 443, 0, &_https_callback, cbd);
} }
#if defined(IRON_WINDOWS) || (defined(IRON_LINUX) && defined(WITH_NFD))
bool _save_and_quit_callback_internal(); bool _save_and_quit_callback_internal();
#endif
bool _save_and_quit_callback(void *data) { bool _save_and_quit_callback(void *data) {
#if defined(IRON_WINDOWS) || (defined(IRON_LINUX) && defined(WITH_NFD)) // Has gtk
return _save_and_quit_callback_internal(); return _save_and_quit_callback_internal();
#endif
return true;
} }
void iron_set_save_and_quit_callback(void (*callback)(bool)) { void iron_set_save_and_quit_callback(void (*callback)(bool)) {