当前位置: 首页>>代码示例>>C++>>正文


C++ LPDIRECTINPUTDEVICE::Unacquire方法代码示例

本文整理汇总了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;
	}

}
开发者ID:Admiral-MS,项目名称:fs2open.github.com,代码行数:32,代码来源:key.cpp

示例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_);
}
开发者ID:DavidKnight247,项目名称:simcoupe,代码行数:11,代码来源:Input.cpp

示例3: ReleaseDirectKeyboard

void ReleaseDirectKeyboard(void)
{
	if (DIKeyboardOkay)
      {
       lpdiKeyboard->Unacquire();
       DIKeyboardOkay = FALSE;
      }

    if (lpdiKeyboard != NULL)
	  {
       lpdiKeyboard->Release();
	   lpdiKeyboard = NULL;
	  }
}
开发者ID:OpenSourcedGames,项目名称:Aliens-vs-Predator,代码行数:14,代码来源:Di_func.cpp

示例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();
	}
}
开发者ID:brettatoms,项目名称:robopanic,代码行数:14,代码来源:DXGame.cpp

示例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;
}
开发者ID:stt,项目名称:pk2,代码行数:36,代码来源:PisteInput.cpp

示例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;
}
开发者ID:Admiral-MS,项目名称:fs2open.github.com,代码行数:20,代码来源:mouse.cpp


注:本文中的LPDIRECTINPUTDEVICE::Unacquire方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。