Android: Fix screen issues

- Create window as fullscreen
- Redraw screen after task resume
This commit is contained in:
kichikuou
2020-02-09 21:47:07 +09:00
parent f4ff96ac62
commit 55e6dde4f8
2 changed files with 15 additions and 5 deletions
+8 -4
View File
@@ -10,7 +10,7 @@
static int mousex, mousey, fingers;
static bool pump_events(int screen_height)
static bool pump_events(AGS* ags)
{
SDL_Event e;
while (SDL_PollEvent(&e)) {
@@ -27,9 +27,13 @@ static bool pump_events(int screen_height)
case SDL_FINGERUP:
case SDL_FINGERMOTION:
mousex = e.tfinger.x * 640;
mousey = e.tfinger.y * screen_height;
mousey = e.tfinger.y * ags->screen_height;
fingers = SDL_GetNumTouchFingers(e.tfinger.touchId);
break;
case SDL_APP_DIDENTERFOREGROUND:
ags->flush_screen(false);
break;
}
}
return false;
@@ -41,7 +45,7 @@ uint8 NACT::get_key()
texthook_keywait();
if (pump_events(ags->screen_height))
if (pump_events(ags))
terminate = true;
// キーボード&マウス
@@ -86,7 +90,7 @@ uint8 NACT::get_key()
void NACT::get_cursor(int* x, int* y)
{
if (pump_events(ags->screen_height))
if (pump_events(ags))
terminate = true;
*x = mousex;
*y = mousey;