changeset 165:6a4e09bbbbc0

Joystick initialization fix submitted by Vitaliy Mikitchenko
author Sam Lantinga <slouken@libsdl.org>
date Tue, 04 Sep 2001 22:38:01 +0000
parents 7434cc45d484
children 39877400bd1e
files src/joystick/win32/SDL_mmjoystick.c
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/joystick/win32/SDL_mmjoystick.c	Tue Sep 04 22:28:58 2001 +0000
+++ b/src/joystick/win32/SDL_mmjoystick.c	Tue Sep 04 22:38:01 2001 +0000
@@ -85,14 +85,22 @@
 
 	numdevs = 0;
 	maxdevs = joyGetNumDevs();
+
 	if ( maxdevs > MAX_JOYSTICKS ) {
 		maxdevs = MAX_JOYSTICKS;
 	}
 
+
 	SYS_JoystickID[0] = JOYSTICKID1;
 	SYS_JoystickID[1] = JOYSTICKID2;
 
 	for ( i = 0; (i < maxdevs); ++i ) {
+		
+		/* added 8/31/2001 By Vitaliy Mikitchenko */
+		joyinfo.dwSize = sizeof(joyinfo);
+		joyinfo.dwFlags = JOY_RETURNALL;
+		/* end addition */
+
 		result = joyGetPosEx(SYS_JoystickID[i], &joyinfo);
 		if ( result == JOYERR_NOERROR ) {
 			result = joyGetDevCaps(SYS_JoystickID[i], &joycaps, sizeof(joycaps));