src/video/windx5/SDL_dx5events.c
changeset 1115 040aa1bea9fc
parent 1114 242a35a85852
child 1253 7c7ddaf195bf
equal deleted inserted replaced
1114:242a35a85852 1115:040aa1bea9fc
   179 		IDirectInputDevice_Release(device);
   179 		IDirectInputDevice_Release(device);
   180 		if ( result != DI_OK ) {
   180 		if ( result != DI_OK ) {
   181 			SetDIerror("DirectInputDevice::QueryInterface", result);
   181 			SetDIerror("DirectInputDevice::QueryInterface", result);
   182 			return(-1);
   182 			return(-1);
   183 		}
   183 		}
   184 		topwnd =  GetTopLevelParent(SDL_Window, GA_ROOT);
   184 		topwnd =  GetTopLevelParent(SDL_Window);
   185 		result = IDirectInputDevice2_SetCooperativeLevel(SDL_DIdev[i],
   185 		result = IDirectInputDevice2_SetCooperativeLevel(SDL_DIdev[i],
   186 					topwnd, inputs[i].win_level);
   186 					topwnd, inputs[i].win_level);
   187 		if ( result != DI_OK ) {
   187 		if ( result != DI_OK ) {
   188 			SetDIerror("DirectInputDevice::SetCooperativeLevel",
   188 			SetDIerror("DirectInputDevice::SetCooperativeLevel",
   189 									result);
   189 									result);
   663 				level = inputs[i].raw_level;
   663 				level = inputs[i].raw_level;
   664 			} else {
   664 			} else {
   665 				level = inputs[i].win_level;
   665 				level = inputs[i].win_level;
   666 			}
   666 			}
   667 			IDirectInputDevice2_Unacquire(SDL_DIdev[i]);
   667 			IDirectInputDevice2_Unacquire(SDL_DIdev[i]);
   668 			topwnd = GetTopLevelParent(SDL_Window, GA_ROOT);
   668 			topwnd = GetTopLevelParent(SDL_Window);
   669 			result = IDirectInputDevice2_SetCooperativeLevel(
   669 			result = IDirectInputDevice2_SetCooperativeLevel(
   670 					SDL_DIdev[i], topwnd, level);
   670 					SDL_DIdev[i], topwnd, level);
   671 			IDirectInputDevice2_Acquire(SDL_DIdev[i]);
   671 			IDirectInputDevice2_Acquire(SDL_DIdev[i]);
   672 			if ( result != DI_OK ) {
   672 			if ( result != DI_OK ) {
   673 				SetDIerror(
   673 				SetDIerror(