void DX5_DInputReset(_THIS, int fullscreen) { DWORD level; int i; HRESULT result; HWND topwnd; for ( i=0; i<MAX_INPUTS; ++i ) { if ( SDL_DIdev[i] != NULL ) { if ( fullscreen ) { level = inputs[i].raw_level; } else { level = inputs[i].win_level; } IDirectInputDevice2_Unacquire(SDL_DIdev[i]); topwnd = GetTopLevelParent(SDL_Window); result = IDirectInputDevice2_SetCooperativeLevel( SDL_DIdev[i], topwnd, level); IDirectInputDevice2_Acquire(SDL_DIdev[i]); if ( result != DI_OK ) { SetDIerror( "DirectInputDevice::SetCooperativeLevel", result); } } } mouse_lost = 1; DX5_CheckInput(this, 0, FALSE); }
void DX5_PumpEvents(_THIS) { while ( DX5_CheckInput(this, 0, TRUE) > 0 ) { ; } }
void DX5_PumpEvents(_THIS) { /* Wait for messages and DirectInput */ while ( DX5_CheckInput(this, 0, TRUE) > 0 ) { /* Loop and check again */; } }