xForm::~xForm() { // DeleteEntities(); ShutdownInput(); ShutdownSound(); x = NULL; }
void xForm::InitInput() { ShutdownInput(); dinput = NULL; dkeyboard = NULL; HRESULT hr; // Create a DInput object if( FAILED( hr = DirectInput8Create( GetModuleHandle(NULL), DIRECTINPUT_VERSION, IID_IDirectInput8, (VOID**)&dinput, NULL ) ) ) return; // Obtain an interface to the system keyboard device. if( FAILED( hr = dinput->CreateDevice( GUID_SysKeyboard, &dkeyboard, NULL ) ) ){ ShutdownInput(); return; } // Set the data format to "keyboard format" - a predefined data format // // A data format specifies which controls on a device we // are interested in, and how they should be reported. // // This tells DirectInput that we will be passing an array // of 256 bytes to IDirectInputDevice::GetDeviceState. if( FAILED( hr = dkeyboard->SetDataFormat(&c_dfDIKeyboard) ) ){ ShutdownInput(); return; } // Set the cooperativity level to let DirectInput know how // this device should interact with the system and with other // DirectInput applications. if( FAILED( hr = dkeyboard->SetCooperativeLevel( m_hWndFocus, DISCL_NONEXCLUSIVE | DISCL_FOREGROUND ) )){ ShutdownInput(); return; } // Acquire the newly created device dkeyboard->Acquire(); }
void CL_DLLEXPORT HUD_Shutdown( void ) { // RecClShutdown(); ShutdownInput(); #if defined( _TFC ) ClearEventList(); #endif CL_UnloadParticleMan(); }
void CL_DLLEXPORT HUD_Shutdown( void ) { // RecClShutdown(); ShutdownInput(); #if defined( _TFC ) ClearEventList(); #endif CL_UnloadParticleMan(); CL_UnloadGameUI(); discord_integration::shutdown(); }
} void DLLEXPORT HUD_Shutdown( void ) {