本文整理汇总了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();
}
示例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: 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;
}
示例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 );
}
示例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;
}
示例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." );
}
示例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
示例8: close_dx_gamepad
C_RESULT close_dx_gamepad(void)
{
if (g_pJoystick) {
g_pJoystick->Unacquire();
}
return C_OK;
}
示例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;
}
示例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();
}
示例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
示例12: DIDestroyKeyboardDevice
void WINAPI DIDestroyKeyboardDevice()
{
if(bDInputActive)
{
diKeyboard->Unacquire();
diKeyboard->Release();
}
}
示例13: DIDestroyMouseDevice
void WINAPI DIDestroyMouseDevice()
{
if(bDInputActive)
{
diMouse->Unacquire();
diMouse->Release();
}
}
示例14: ReleaseMouse
void ReleaseMouse () {
if (diMouse == NULL)
return;
diMouse->Unacquire();
diMouse->Release();
diMouse = NULL;
}
示例15: ReleaseKeyboard
void ReleaseKeyboard () {
if (diKeyboard == NULL)
return;
diKeyboard->Unacquire();
diKeyboard->Release();
diKeyboard = NULL;
}