Readded key repeat as the previous problem with it is now fixed
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@524 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
0.2:
|
0.2:
|
||||||
|
- Key repeat is now enabled when typing text, from slayne
|
||||||
- Capital letter bug in new input code fixed, from slayne
|
- Capital letter bug in new input code fixed, from slayne
|
||||||
- Oscilloscope now reacts to music when speech is disabled (OpenAL) -Mika
|
- Oscilloscope now reacts to music when speech is disabled (OpenAL) -Mika
|
||||||
- Rewritten input code (better and adds joystick/pad support), from slayne
|
- Rewritten input code (better and adds joystick/pad support), from slayne
|
||||||
|
|||||||
@@ -49,7 +49,8 @@ TFB_InitInput (int driver, int flags)
|
|||||||
atexit (TFB_UninitInput);
|
atexit (TFB_UninitInput);
|
||||||
|
|
||||||
SDL_EnableUNICODE(1);
|
SDL_EnableUNICODE(1);
|
||||||
|
SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL);
|
||||||
|
|
||||||
if ((SDL_InitSubSystem(SDL_INIT_JOYSTICK)) == -1)
|
if ((SDL_InitSubSystem(SDL_INIT_JOYSTICK)) == -1)
|
||||||
{
|
{
|
||||||
fprintf (stderr, "Couldn't initialize joystick subsystem: %s\n", SDL_GetError());
|
fprintf (stderr, "Couldn't initialize joystick subsystem: %s\n", SDL_GetError());
|
||||||
@@ -177,7 +178,13 @@ UninitInput (void) // Looks like it'll be empty
|
|||||||
void
|
void
|
||||||
FlushInput (void)
|
FlushInput (void)
|
||||||
{
|
{
|
||||||
|
int i;
|
||||||
kbdtail = kbdhead = 0;
|
kbdtail = kbdhead = 0;
|
||||||
|
for (i = 0; i < SDLK_LAST; ++i)
|
||||||
|
{
|
||||||
|
if (KeyboardDown[i] == 0x2)
|
||||||
|
KeyboardDown[i] &= ~0x2;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Translates from SDLKeys to values defined in inplib.h
|
// Translates from SDLKeys to values defined in inplib.h
|
||||||
|
|||||||
Reference in New Issue
Block a user