Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 76448 - SDL keyrepeat issue
Summary: SDL keyrepeat issue
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: High trivial (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-02 14:31 UTC by Jon Daniel
Modified: 2005-01-02 18:18 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
patch to fix keyrepeat issues for SDL-1.2.7 (1.2.7-keyrepeat.patch,403 bytes, patch)
2005-01-02 14:35 UTC, Jon Daniel
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jon Daniel 2005-01-02 14:31:22 UTC
If you switch keys very fast and hold the last one it
doesn't get repeated because the key release of the first key
occured after the key press of the second key.
Unfortunatly the key release of the first key sets
SDL_KeyRepeat.timestamp = 0; causing the the second key not to repeat.

This should be always reproducable. I've only checked this on x86-64
X11.

To fix this I just added another condition to make sure the sym of the
released key matches SDL_KeyRepeat.evt.key.keysym.sym.

Reproducible: Always
Steps to Reproduce:
1. Get and simple SDL framework or test application.
2. Call SDL_EnableKeyRepeat( SDL_DEFAULT_REPEAT_DELAY,     SDL_DEFAULT_REPEAT_INTERVAL ); after init
3. Run the SDL application press a key and hold it
4. switch to another key very fast and release the first one
5. hold the second key

Actual Results:  
The second key won't repeat!

Expected Results:  
The second key should repeat!
Comment 1 Jon Daniel 2005-01-02 14:35:24 UTC
Created attachment 47400 [details, diff]
patch to fix keyrepeat issues for SDL-1.2.7

Fix for SDL-1.2.7 keyrepeat issues
Other versions are very similar to fix
Comment 2 SpanKY gentoo-dev 2005-01-02 18:18:37 UTC
added patch from upstream cvs to 1.2.8 and 1.2.7-r3