本文整理汇总了C++中LPDIRECTINPUTDEVICE8::Release方法的典型用法代码示例。如果您正苦于以下问题:C++ LPDIRECTINPUTDEVICE8::Release方法的具体用法?C++ LPDIRECTINPUTDEVICE8::Release怎么用?C++ LPDIRECTINPUTDEVICE8::Release使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LPDIRECTINPUTDEVICE8
的用法示例。
在下文中一共展示了LPDIRECTINPUTDEVICE8::Release方法的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();
}
示例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;
}
}
示例3: 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;
}
示例4: 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
示例5: 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;
}
示例6: 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();
}
示例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
// 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
示例8: UninitKeyboard
//=============================================================================
// キーボードの終了処理
//=============================================================================
void UninitKeyboard(void)
{
if(g_pDIDevKeyboard)
{
g_pDIDevKeyboard->Release();
g_pDIDevKeyboard = NULL;
}
}
示例9: ReleaseMouse
void ReleaseMouse () {
if (diMouse == NULL)
return;
diMouse->Unacquire();
diMouse->Release();
diMouse = NULL;
}
示例10: DIDestroyKeyboardDevice
void WINAPI DIDestroyKeyboardDevice()
{
if(bDInputActive)
{
diKeyboard->Unacquire();
diKeyboard->Release();
}
}
示例11: DIDestroyMouseDevice
void WINAPI DIDestroyMouseDevice()
{
if(bDInputActive)
{
diMouse->Unacquire();
diMouse->Release();
}
}
示例12: releaseDevice
void DirectInputRegistry::releaseDevice( LPDIRECTINPUTDEVICE8 device )
{
if ( device )
{
device->Unacquire();
device->Release();
}
}
示例13: ReleaseKeyboard
void ReleaseKeyboard () {
if (diKeyboard == NULL)
return;
diKeyboard->Unacquire();
diKeyboard->Release();
diKeyboard = NULL;
}
示例14: Kill_Keyboard
void Kill_Keyboard()
{
if (dikeyboard != NULL)
{
dikeyboard->Unacquire();
dikeyboard->Release();
dikeyboard = NULL;
}
}
示例15: INPMouseDestroy
/////////////////////////////////////
// Name:
// Purpose:
// Output:
// Return:
/////////////////////////////////////
void F_API INPMouseDestroy()
{
if(g_pDMouse)
{
g_pDMouse->Unacquire();
g_pDMouse->Release();
g_pDMouse=0;
}
}