ALT Linux Bugzilla
– Attachment 16880 Details for
Bug 51523
Подвисание на экране "pause", зацикливание обработчика потока клавиатуры
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
prevent random pauses ingame without external actions
sdl_fix_pauses.patch (text/plain), 1.10 KB, created by
Aleksandr Karpenko
on 2024-09-21 20:59:13 MSK
(
hide
)
Description:
prevent random pauses ingame without external actions
Filename:
MIME Type:
Creator:
Aleksandr Karpenko
Created:
2024-09-21 20:59:13 MSK
Size:
1.10 KB
patch
obsolete
>Author: bitfreak25 <bitfreak25@gmx.de> >Last-Update: Sun, 13 Jan 2019 01:35:08 +0100 >Bug-Debian: https://bugs.debian.org/916606 >Description: Prevent random pauses ingame without external actions > >--- a/client/game.c >+++ b/client/game.c >@@ -1150,6 +1150,17 @@ void client_game_run( void ) > /* check whether an event occured */ > button_clicked = key_pressed = 0; > if ( SDL_PollEvent( &event ) ) { >+ // 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; >+ } >+ } >+ > if ( client_state == CS_PAUSE && game->game_type == GT_NETWORK ) > gui_dispatch_event( &event, ms ); > else
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 51523
: 16880