Cleanup
This commit is contained in:
@@ -1261,3 +1261,7 @@ bool iron_gamepad_connected(int num) {
|
||||
void iron_gamepad_rumble(int gamepad, float left, float right) {}
|
||||
|
||||
#endif
|
||||
|
||||
bool _save_and_quit_callback_internal() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -593,3 +593,7 @@ bool iron_gamepad_connected(int num) {
|
||||
void iron_gamepad_rumble(int gamepad, float left, float right) {}
|
||||
|
||||
#endif
|
||||
|
||||
bool _save_and_quit_callback_internal() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1499,8 +1499,10 @@ void iron_gamepad_rumble(int gamepad, float left, float right) {}
|
||||
#ifdef WITH_NFD // Has gtk
|
||||
#include <gtk/gtk.h>
|
||||
extern void (*iron_save_and_quit)(bool);
|
||||
#endif
|
||||
|
||||
bool _save_and_quit_callback_internal() {
|
||||
#ifdef WITH_NFD // Has gtk
|
||||
bool save = false;
|
||||
XTextProperty text_prop;
|
||||
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);
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
#include <signal.h>
|
||||
#include <sys/wait.h>
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
#if defined(IRON_WINDOWS) || (defined(IRON_LINUX) && defined(WITH_NFD))
|
||||
bool _save_and_quit_callback_internal();
|
||||
#endif
|
||||
|
||||
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();
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
void iron_set_save_and_quit_callback(void (*callback)(bool)) {
|
||||
|
||||
Reference in New Issue
Block a user