Potentially fixed bug #774
There's a mismatch between ndev and MAX_INPUTS --HG-- branch : SDL-1.2 extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%403886
This commit is contained in:
parent
b0c831ddc0
commit
b35b7e8cf4
1 changed files with 13 additions and 9 deletions
|
@ -43,7 +43,7 @@
|
|||
#endif
|
||||
|
||||
/* The keyboard and mouse device input */
|
||||
#define MAX_INPUTS 16 /* Maximum of 16-1 input devices */
|
||||
#define MAX_INPUTS 2
|
||||
#define INPUT_QSIZE 512 /* Buffer up to 512 input messages */
|
||||
|
||||
static LPDIRECTINPUT dinput = NULL;
|
||||
|
@ -264,6 +264,8 @@ static void DX5_DInputQuit(_THIS)
|
|||
SDL_DIdev[i] = NULL;
|
||||
}
|
||||
}
|
||||
SDL_DIndev = 0;
|
||||
|
||||
/* Release DirectInput */
|
||||
IDirectInput_Release(dinput);
|
||||
dinput = NULL;
|
||||
|
@ -664,7 +666,8 @@ static int DX5_CheckInput(_THIS, int timeout, BOOL processInput)
|
|||
|
||||
/* Pump the DirectInput flow */
|
||||
if ( SDL_GetAppState() & SDL_APPINPUTFOCUS ) {
|
||||
for ( i=0; i<SDL_DIndev; ++i ) {
|
||||
for ( i=0; i<MAX_INPUTS; ++i ) {
|
||||
if ( SDL_DIdev[i] != NULL ) {
|
||||
result = IDirectInputDevice2_Poll(SDL_DIdev[i]);
|
||||
if ( (result == DIERR_INPUTLOST) ||
|
||||
(result == DIERR_NOTACQUIRED) ) {
|
||||
|
@ -676,6 +679,7 @@ static int DX5_CheckInput(_THIS, int timeout, BOOL processInput)
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Wait for messages and input events */
|
||||
event = MsgWaitForMultipleObjects(SDL_DIndev, SDL_DIevt, FALSE,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue