mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-06 01:31:39 +00:00
PS3: Stop using SDL mouse focus events to detect the XMB
Mouse focus events are also sent by SDL when the mouse is warped outside of the window area. App suspended / resumed are now used. These are only sent by SDL when opening / closing the XMB on the PS3. Fixes #10340.
This commit is contained in:
parent
6af4f3d236
commit
6437ca1ede
@ -36,8 +36,7 @@
|
|||||||
* This pauses execution and keeps redrawing the screen until the XMB is closed.
|
* This pauses execution and keeps redrawing the screen until the XMB is closed.
|
||||||
*/
|
*/
|
||||||
void PS3SdlEventSource::preprocessEvents(SDL_Event *event) {
|
void PS3SdlEventSource::preprocessEvents(SDL_Event *event) {
|
||||||
if (event->type == SDL_WINDOWEVENT) {
|
if (event->type == SDL_APP_DIDENTERBACKGROUND) {
|
||||||
if (event->window.event == SDL_WINDOWEVENT_LEAVE) {
|
|
||||||
// XMB opened
|
// XMB opened
|
||||||
if (g_engine)
|
if (g_engine)
|
||||||
g_engine->pauseEngine(true);
|
g_engine->pauseEngine(true);
|
||||||
@ -55,9 +54,7 @@ void PS3SdlEventSource::preprocessEvents(SDL_Event *event) {
|
|||||||
}
|
}
|
||||||
if (event->type == SDL_QUIT)
|
if (event->type == SDL_QUIT)
|
||||||
return;
|
return;
|
||||||
if (event->type != SDL_WINDOWEVENT)
|
if (event->type == SDL_APP_DIDENTERFOREGROUND) {
|
||||||
continue;
|
|
||||||
if (event->window.event == SDL_WINDOWEVENT_ENTER) {
|
|
||||||
// XMB closed
|
// XMB closed
|
||||||
if (g_engine)
|
if (g_engine)
|
||||||
g_engine->pauseEngine(false);
|
g_engine->pauseEngine(false);
|
||||||
@ -65,7 +62,6 @@ void PS3SdlEventSource::preprocessEvents(SDL_Event *event) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user