本文整理汇总了C++中LPDIRECTINPUTDEVICE::Unacquire方法的典型用法代码示例。如果您正苦于以下问题:C++ LPDIRECTINPUTDEVICE::Unacquire方法的具体用法?C++ LPDIRECTINPUTDEVICE::Unacquire怎么用?C++ LPDIRECTINPUTDEVICE::Unacquire使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LPDIRECTINPUTDEVICE
的用法示例。
在下文中一共展示了LPDIRECTINPUTDEVICE::Unacquire方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: di_cleanup
void di_cleanup()
{
/*
* Destroy any lingering IDirectInputDevice object.
*/
if (Di_keyboard) {
/*
* Cleanliness is next to godliness. Unacquire the device
* one last time just in case we got really confused and tried
* to exit while the device is still acquired.
*/
Di_keyboard->Unacquire();
Di_keyboard->Release();
Di_keyboard = NULL;
}
/*
* Destroy any lingering IDirectInput object.
*/
if (Di_object) {
Di_object->Release();
Di_object = NULL;
}
if ( Di_event ) {
CloseHandle(Di_event);
Di_event = NULL;
}
}
示例2: Exit
void Input::Exit (bool fReInit_/*=false*/)
{
TRACE("Input::Exit(%d)\n", fReInit_);
if (pdiKeyboard) { pdiKeyboard->Unacquire(); pdiKeyboard->Release(); pdiKeyboard = NULL; }
if (pdidJoystick1) { pdidJoystick1->Unacquire(); pdidJoystick1->Release(); pdidJoystick1 = NULL; }
if (pdidJoystick2) { pdidJoystick2->Unacquire(); pdidJoystick2->Release(); pdidJoystick2 = NULL; }
if (pdi) { pdi->Release(); pdi = NULL; }
Keyboard::Exit(fReInit_);
}
示例3: ReleaseDirectKeyboard
void ReleaseDirectKeyboard(void)
{
if (DIKeyboardOkay)
{
lpdiKeyboard->Unacquire();
DIKeyboardOkay = FALSE;
}
if (lpdiKeyboard != NULL)
{
lpdiKeyboard->Release();
lpdiKeyboard = NULL;
}
}
示例4: release
void DXGame::release(){
if(lpDirectDrawObject != NULL){ //if DD object exists
if(lpPrimary != NULL) //if primary surface exists
lpPrimary->Release(); //release primary surface
lpDirectDrawObject->Release(); //release DD object
}
if(lpDirectInput != NULL){
if(lpKeyboard){
lpKeyboard->Unacquire();
lpKeyboard->Release();
}
lpDirectInput->Release();
}
}
示例5: PisteInput_Lopeta
int PisteInput_Lopeta()
{
if (!PI_unload) {
for (int i=0;i<PI_MAX_PELIOHJAIMIA;i++)
if (PI_joysticks[i].lpdijoy)
{
PI_joysticks[i].lpdijoy->Unacquire();
PI_joysticks[i].lpdijoy->Release();
PI_joysticks[i].lpdijoy = NULL;
}
if (PI_lpdimouse)
{
PI_lpdimouse->Unacquire();
PI_lpdimouse->Release();
PI_lpdimouse = NULL;
}
if (PI_lpdikey)
{
PI_lpdikey->Unacquire();
PI_lpdikey->Release();
PI_lpdikey = NULL;
}
if (PI_lpdi)
{
PI_lpdi->Release();
PI_lpdi = NULL;
}
PI_unload = true;
}
return 0;
}
示例6: di_cleanup
void di_cleanup()
{
// Destroy any lingering IDirectInputDevice object.
if (Di_mouse) {
// Unacquire the device one last time just in case we got really confused
// and tried to exit while the device is still acquired.
Di_mouse->Unacquire();
Di_mouse->Release();
Di_mouse = NULL;
}
// Destroy any lingering IDirectInput object.
if (Di_mouse_obj) {
Di_mouse_obj->Release();
Di_mouse_obj = NULL;
}
Di_mouse_inited = 0;
}