File: ignore-appinputfocus.patch

package info (click to toggle)
kobodeluxe 0.5.1-10
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster, sid, trixie
  • size: 4,408 kB
  • sloc: ansic: 18,747; cpp: 18,203; sh: 3,192; makefile: 162
file content (17 lines) | stat: -rw-r--r-- 555 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Description: ignore SDL_ACTIVEEVENT with SDL_APPINPUTFOCUS flag
 These events seem to come all the time, causing a pause which can't be
 unpaused
Bug-Debian: https://bugs.debian.org/909244
Author: Reiner Herrmann <reiner@reiner-h.de>

--- a/kobo.cpp
+++ b/kobo.cpp
@@ -1691,7 +1691,7 @@ void kobo_gfxengine_t::frame()
 			break;
 		  case SDL_ACTIVEEVENT:
 			// Any type of focus loss should activate pause mode!
-			if(!ev.active.gain)
+			if(!ev.active.gain && ev.active.state != SDL_APPINPUTFOCUS)
 				km.pause_game();
 			break;
 		  case SDL_QUIT: