diff options
author | Azamat H. Hackimov <azamat.hackimov@gmail.com> | 2019-01-05 21:11:13 +0300 |
---|---|---|
committer | James Le Cuirot <chewi@gentoo.org> | 2019-01-05 19:43:35 +0000 |
commit | e17dcd37000234ba0ae79246a09d5c09ff33a16e (patch) | |
tree | 0d413370002544dbfb3b8df7556c4f18ddc44baf /games-emulation/dosbox/files | |
parent | net-misc/mosh: Add libressl USE flag to 9999 ebuild (diff) | |
download | gentoo-e17dcd37000234ba0ae79246a09d5c09ff33a16e.tar.gz gentoo-e17dcd37000234ba0ae79246a09d5c09ff33a16e.tar.bz2 gentoo-e17dcd37000234ba0ae79246a09d5c09ff33a16e.zip |
games-emulation/dosbox: fix for xorg 1.20 issue
* Added patch for xorg 1.20 issue
(https://sourceforge.net/p/dosbox/code-0/4177/).
* Changed HOMEPAGE
Signed-off-by: Azamat H. Hackimov <azamat.hackimov@gmail.com>
Package-Manager: Portage-2.3.51, Repoman-2.3.11
Closes: https://github.com/gentoo/gentoo/pull/10747
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
Diffstat (limited to 'games-emulation/dosbox/files')
-rw-r--r-- | games-emulation/dosbox/files/dosbox-0.74.2_events.patch | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/games-emulation/dosbox/files/dosbox-0.74.2_events.patch b/games-emulation/dosbox/files/dosbox-0.74.2_events.patch new file mode 100644 index 000000000000..fee09a65a4ce --- /dev/null +++ b/games-emulation/dosbox/files/dosbox-0.74.2_events.patch @@ -0,0 +1,37 @@ +Index: src/gui/sdlmain.cpp +=================================================================== +--- a/src/gui/sdlmain.cpp (revision 4177) ++++ b/src/gui/sdlmain.cpp (working copy) +@@ -1426,6 +1426,12 @@ + #define DB_POLLSKIP 1 + #endif + ++#if defined(LINUX) ++#define SDL_XORG_FIX 1 ++#else ++#define SDL_XORG_FIX 0 ++#endif ++ + void GFX_Events() { + //Don't poll too often. This can be heavy on the OS, especially Macs. + //In idle mode 3000-4000 polls are done per second without this check. +@@ -1449,6 +1455,19 @@ + } + #endif + while (SDL_PollEvent(&event)) { ++#if SDL_XORG_FIX ++ // Special code for broken SDL with Xorg 1.20.1, where pairs of inputfocus gain and loss events are generated ++ // when locking the mouse in windowed mode. ++ if (event.type == SDL_ACTIVEEVENT && event.active.state == SDL_APPINPUTFOCUS && event.active.gain == 0) { ++ SDL_Event test; //Check if the next event would undo this one. ++ if (SDL_PeepEvents(&test,1,SDL_PEEKEVENT,SDL_ACTIVEEVENTMASK) == 1 && test.active.state == SDL_APPINPUTFOCUS && test.active.gain == 1) { ++ // Skip both events. ++ SDL_PeepEvents(&test,1,SDL_GETEVENT,SDL_ACTIVEEVENTMASK); ++ continue; ++ } ++ } ++#endif ++ + switch (event.type) { + case SDL_ACTIVEEVENT: + if (event.active.state & SDL_APPINPUTFOCUS) { |