mirror of
https://github.com/kichikuou/xsystem35-sdl2.git
synced 2026-10-03 04:08:00 +03:00
Stop mainloop on exit
This commit is contained in:
@@ -144,6 +144,7 @@ typedef struct {
|
||||
|
||||
#ifdef ENABLE_SDL
|
||||
enum { InputNotChecked, InputCheckMissed, HadInput } input_state;
|
||||
#define BREAK_MAINLOOP (nact->input_state = InputCheckMissed)
|
||||
#endif
|
||||
|
||||
} NACTINFO;
|
||||
|
||||
@@ -44,6 +44,9 @@
|
||||
extern char *mkdtemp (char *template);
|
||||
#endif
|
||||
|
||||
#ifdef __EMSCRIPTEN__
|
||||
#include <emscripten.h>
|
||||
#endif
|
||||
|
||||
#include "nact.h"
|
||||
#include "portab.h"
|
||||
@@ -221,7 +224,13 @@ void sys_error(char *format, ...) {
|
||||
|
||||
void sys_exit(int code) {
|
||||
sys35_remove();
|
||||
#ifdef EMSCRIPTEN
|
||||
emscripten_cancel_main_loop();
|
||||
EM_ASM( xsystem35.shell.quit(); );
|
||||
BREAK_MAINLOOP;
|
||||
#else
|
||||
exit(code);
|
||||
#endif
|
||||
}
|
||||
|
||||
static int check_fontdev(char *devname) {
|
||||
|
||||
Reference in New Issue
Block a user