• Show log

    Commit

  • Hash : 9e6249fa
    Author : Joan Bruguera
    Date : 2022-01-08T19:24:47

    wayland: Avoid spurious key repeats when not pumping events
    
    Previous to this commit, key repeats events were typically generated when
    pumping events, based on the time of when the events are pumped. However,
    if an application doesn't call `SDL_PumpEvents` for some seconds, this time
    can be multiple seconds in the future compared to the actual key up event time,
    and generates key repeats even if a key was pressed only for an instant.
    
    In practice, this can happen when the user presses a key which causes the
    application to do something without pumping events (e.g. load a level).
    In Crispy Doom & PrBoom+, when the user presses the key bound to "Restart
    level/demo", the game doesn't pump events during the "screen melt" effect,
    and the level is restarted multiple times due to spurious repeats.
    
    To fix this, if the key up event is among the events to be pumped, we generate
    the key repeats there, since in the Wayland callback we receive the time when
    the key up event happened. Otherwise, we know no key up event happened and we
    can generate as many repeats as necessary after pumping.
    
    Signed-off-by: Joan Bruguera <joanbrugueram@gmail.com>
    

  • Properties

  • Git HTTP https://git.kmx.io/kc3-lang/SDL.git
    Git SSH git@git.kmx.io:kc3-lang/SDL.git
    Public access ? public
    Description

    Fork of https://github.com/libsdl-org/SDL

    Users
    thodg_m kc3_lang_org thodg_w thodg_l www_kmx_io thodg
    Tags

  • README.md

  • Simple DirectMedia Layer (SDL) Version 2.0

    https://www.libsdl.org/

    Simple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware via OpenGL and Direct3D. It is used by video playback software, emulators, and popular games including Valve’s award winning catalog and many Humble Bundle games.

    More extensive documentation is available in the docs directory, starting with README.md

    Enjoy!

    Sam Lantinga (slouken@libsdl.org)