Android: Add system menu

The system menu opens with 3-finger touch. Currently, it can only exit
the game.
This commit is contained in:
kichikuou
2020-11-29 18:27:50 +09:00
parent 04206abb77
commit 602c309c47
12 changed files with 73 additions and 13 deletions
+1 -1
View File
@@ -43,7 +43,7 @@ public:
#ifdef _WIN32
void select_sound(BGMDevice dev);
void on_mci_notify(SDL_SysWMmsg* msg);
void on_mci_notify(const SDL_SysWMmsg* msg);
#endif
#ifdef __EMSCRIPTEN__
void select_synthesizer(bool use_fm);
+1 -1
View File
@@ -267,7 +267,7 @@ public:
private:
void pump_events();
void on_syswmevent(SDL_SysWMmsg* msg);
bool handle_platform_event(const SDL_Event& e);
};
class NACT_Sys1 final : public NACT {
+3 -4
View File
@@ -19,6 +19,9 @@ void NACT::pump_events()
{
SDL_Event e;
while (SDL_PollEvent(&e)) {
if (handle_platform_event(e))
continue;
switch (e.type) {
case SDL_QUIT:
terminate = true;
@@ -40,10 +43,6 @@ void NACT::pump_events()
case SDL_APP_DIDENTERFOREGROUND:
ags->flush_screen(false);
break;
case SDL_SYSWMEVENT:
on_syswmevent(e.syswm.msg);
break;
}
}
}