mirror of
https://github.com/kichikuou/system3-sdl2.git
synced 2026-09-28 18:08:03 +03:00
Android: Fix screen issues
- Create window as fullscreen - Redraw screen after task resume
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user