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


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

本文整理汇总了C++中LPDIRECTINPUTDEVICE8::Unacquire方法的典型用法代码示例。如果您正苦于以下问题:C++ LPDIRECTINPUTDEVICE8::Unacquire方法的具体用法?C++ LPDIRECTINPUTDEVICE8::Unacquire怎么用?C++ LPDIRECTINPUTDEVICE8::Unacquire使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在LPDIRECTINPUTDEVICE8的用法示例。


在下文中一共展示了LPDIRECTINPUTDEVICE8::Unacquire方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: destroyDevice

void destroyDevice()
{
	// Destruction des objets Direct3D
	if(g_pD3DDevice)
		g_pD3DDevice->ClearState();
	if(g_pRenderTargetView)
		g_pRenderTargetView->Release();
	if(g_pSwapChain)
		g_pSwapChain->Release();
	if(g_pD3DDevice)
		g_pD3DDevice->Release();

	// Destruction des objets DirectInput
	if(g_pKeyboardDevice)
	{
		g_pKeyboardDevice->Unacquire();
		g_pKeyboardDevice->Release();
	}
	if(g_pMouseDevice)
	{
		g_pMouseDevice->Unacquire();
		g_pMouseDevice->Release();
	}
	if(g_pDI)
		g_pDI->Release();
}
开发者ID:SeungMinChoi,项目名称:ejcharpenay,代码行数:26,代码来源:graphics.cpp

示例2: DirectInput_Shutdown

/*Unaquire the devices then Release them and set the pointers to NULL*/
void DirectInput_Shutdown() {
	if (dimouse) {
		dimouse->Unacquire();
		dimouse->Release();
		dimouse = NULL;
	}
	if (dikeyboard) {
		dikeyboard->Unacquire();
		dikeyboard->Release();
		dikeyboard = NULL;
	}
}
开发者ID:ICEentertainment,项目名称:Project1,代码行数:13,代码来源:MyDirectX.cpp

示例3: GutInputClose

int GutInputClose(void)
{
	if ( g_pMouse )	g_pMouse->Unacquire();
	if ( g_pKeyboard ) g_pKeyboard->Unacquire();
	if ( g_pJoystick ) g_pJoystick->Unacquire();

	SAFE_RELEASE(g_pMouse);
	SAFE_RELEASE(g_pKeyboard);
	SAFE_RELEASE(g_pJoystick);

	return 1;
}
开发者ID:chenbk85,项目名称:3dlearn,代码行数:12,代码来源:GutInput.cpp

示例4: input_Dest

void input_Dest()
{
    // Unacquire the device one last time just in case
    // the app tried to exit while the device is still acquired.
    if( g_pMouse )
        g_pMouse->Unacquire();

    if ( g_pKeyboard )
        g_pKeyboard->Unacquire();

    // Release any DirectInput objects.
    SAFE_RELEASE( g_pMouse );
    SAFE_RELEASE( g_pKeyboard );
    SAFE_RELEASE( g_pDI );
}
开发者ID:rodrigobmg,项目名称:v-engine,代码行数:15,代码来源:input_win32.cpp

示例5: Done_DInput

void Done_DInput()
{
	for( int lcv = 0; lcv < di_mouse_count; lcv++ ) {
		if( di_mouse[ lcv ] ) {
			di_mouse[ lcv ]->Unacquire();
			di_mouse[ lcv ]->Release();
			di_mouse[ lcv ] = NULL;
		}
	}


	for( int lcv = 0; lcv < di_joystick_count; lcv++ ) {
		if( di_joystick[ lcv ] ) {
			di_joystick[ lcv ]->Unacquire();
			di_joystick[ lcv ]->Release();
			di_joystick[ lcv ] = NULL;
		}
	}


	if( di_keyboard ) {
		di_keyboard->Unacquire();
		di_keyboard->Release();
		di_keyboard = NULL;
	}


	if( dinput ) {
		dinput->Release();
		dinput = NULL;
	}


	di_mouse_count = 0;
}
开发者ID:dbniet,项目名称:nuvee,代码行数:35,代码来源:dinput.cpp

示例6: disposeDirectInput

void disposeDirectInput()
{
    logg( "    Disposing Keyboard...", false );
    dinKeyboard->Unacquire();    // make sure the keyboard is unacquired
    dinKeyboard = NULL;
    logg( " Successfully disposed Keyboard." );
    
    logg( "    Disposing Joysticks...", false );
    for ( int i = numJoysticks - 1; i >= 0; i-- )
    {
        try
        {
            dinJoysticks[i]->Unacquire();
            dinJoysticks[i]->Release();
        }
        catch ( ... )
        {
            loggui( " WARNING: Caught an exception while trying to dispose Joystick ", i );
        }
        
        dinJoysticks[i] = NULL;
    }
    logg( " Successfully disposed Joysticks." );
    
    logg( "    Disposing DirectInput...", false );
    din->Release();    // close DirectInput before exiting
    din = NULL;
    logg( " Successfully disposed DirectInput." );
}
开发者ID:CSharles,项目名称:rfDynHUD,代码行数:29,代码来源:direct_input.cpp

示例7: Game_Shutdown

int Game_Shutdown(void *parms,  int num_parms)
{
// this function is where you shutdown your game and
// release all resources that you allocated

// first unacquire the mouse
lpdimouse->Unacquire();

// now release the mouse
lpdimouse->Release();

// release directinput
lpdi->Release();

// unload the bitmap file
Unload_Bitmap_File(&bitmap8bit);

// delete all bobs and bitmaps
Destroy_BOB(&buttons);
Destroy_BOB(&pointer);
Destroy_Bitmap(&cpanel);
Destroy_Bitmap(&canvas);

// shutdonw directdraw
DDraw_Shutdown();

// return success
return(1);
} // end Game_Shutdown
开发者ID:calyx,项目名称:windows-game-source-code,代码行数:29,代码来源:demo9_2.cpp

示例8: close_dx_gamepad

C_RESULT close_dx_gamepad(void)
{
  if (g_pJoystick) { 
    g_pJoystick->Unacquire();
}
  return C_OK;
}
开发者ID:LYJHub,项目名称:AR.FreeFlight,代码行数:7,代码来源:gamepad.cpp

示例9: VidExt_Quit

m64p_error VidExt_Quit()
{
	if (m_pDIKeyboardDevice)m_pDIKeyboardDevice->Unacquire();
	if (m_pDIKeyboardDevice)m_pDIKeyboardDevice->Release();
	if (m_pDIKeyboardDevice)m_pDIKeyboardDevice = NULL;
	CMupen64Plus* instance = CMupen64Plus::GetSingleton( ) ;

	if (fullscreen)                      // if in fullscreen..
	{
		ChangeDisplaySettings(NULL, 0);   // switch back to desktop..
		if (windowedMenu)
			SetMenu( instance->emulator_hwnd, windowedMenu );

		SetWindowLong( instance->emulator_hwnd, GWL_STYLE, windowedStyle );
		SetWindowLong( instance->emulator_hwnd, GWL_EXSTYLE, windowedExStyle );
		SetWindowPos( instance->emulator_hwnd, NULL, windowedRect.left, windowedRect.top, 0, 0, SWP_NOZORDER | SWP_NOSIZE );
		fullscreen = false;
		ShowCursor( TRUE );
	}

	if( g_hRC != NULL )
	{
		wglMakeCurrent( NULL, NULL );
		wglDeleteContext( g_hRC );
		g_hRC = NULL;
	}

	if( g_hDC != NULL )
	{
		ReleaseDC( instance->emulator_hwnd, g_hDC );
		g_hDC = NULL;
	}
    return M64ERR_SUCCESS;
}
开发者ID:mudlord,项目名称:winmupen,代码行数:34,代码来源:mupencpp_sdl.cpp

示例10: CleanupD3D

// リソースの解放
void CleanupD3D()
{
	for (int i = 0; i < MAXMODEL; i = i + 1)
	{
		if (g_models[i].used == TRUE)
		{
			if (g_models[i].pmaterials != NULL)
			{
				delete[] g_models[i].pmaterials;
			}
			if (g_models[i].ptextures != NULL)
			{
				for (DWORD j = 0; j < g_models[i].nummaterials; j = j + 1)
				{
					g_models[i].ptextures[j]->Release();
				}
				delete[] g_models[i].ptextures;
			}
			if (g_models[i].pmesh != NULL)
			{
				g_models[i].pmesh->Release();
			}
		}
	}
	if (g_pd3dDevice != NULL) g_pd3dDevice->Release();
	if (g_pD3D != NULL) g_pD3D->Release();

	if (g_pDIDevice != NULL)
	{
		g_pDIDevice->Unacquire();
		g_pDIDevice->Release();
	}
	if (g_pDI != NULL) g_pDI->Release();
}
开发者ID:muripoLife,项目名称:catSenkan,代码行数:35,代码来源:my3dlib.cpp

示例11: Game_Shutdown

int Game_Shutdown(void *parms,  int num_parms)
{
// this function is where you shutdown your game and
// release all resources that you allocated

// kill the bug blaster
Destroy_BOB(&blaster);

// kill the mushroom maker
for (int index=0; index<4; index++)
    Destroy_Bitmap(&mushrooms[index]);

// kill the playfield bitmap
Destroy_Bitmap(&playfield);

// release joystick
lpdijoy->Unacquire();
lpdijoy->Release();
lpdi->Release();

// shutdonw directdraw
DDraw_Shutdown();

// return success
return(1);
} // end Game_Shutdown
开发者ID:calyx,项目名称:windows-game-source-code,代码行数:26,代码来源:demo9_4_16b.cpp

示例12: DIDestroyKeyboardDevice

void WINAPI DIDestroyKeyboardDevice()
{
    if(bDInputActive)
    {
        diKeyboard->Unacquire();
        diKeyboard->Release();
    }
}
开发者ID:alanzw,项目名称:JimEngine,代码行数:8,代码来源:DXInput.cpp

示例13: DIDestroyMouseDevice

void WINAPI DIDestroyMouseDevice()
{
    if(bDInputActive)
    {
        diMouse->Unacquire();
        diMouse->Release();
    }
}
开发者ID:alanzw,项目名称:JimEngine,代码行数:8,代码来源:DXInput.cpp

示例14: ReleaseMouse

void ReleaseMouse () {
    if (diMouse == NULL)
        return;

    diMouse->Unacquire();
    diMouse->Release();
    diMouse = NULL;
}
开发者ID:DrivenByHim,项目名称:BeginningGameProgramming,代码行数:8,代码来源:dxinput.cpp

示例15: ReleaseKeyboard

void ReleaseKeyboard () {
    if (diKeyboard == NULL)
        return;

    diKeyboard->Unacquire();
    diKeyboard->Release();
    diKeyboard = NULL;
}
开发者ID:DrivenByHim,项目名称:BeginningGameProgramming,代码行数:8,代码来源:dxinput.cpp


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