mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-20 20:29:10 +00:00
Free the cursor Allows the cursor to leave the client window and disables mouse recentering at load time.
This commit is contained in:
@ -930,28 +930,3 @@ hsBool plMouseDevice::MsgReceive(plMessage* msg)
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void plMouseDevice::HandleWindowActivate(bool bActive, HWND hWnd)
|
||||
{
|
||||
if ( bActive )
|
||||
{
|
||||
RECT rect;
|
||||
::GetClientRect(hWnd,&rect);
|
||||
|
||||
// rect.right /= plInputManager::GetInstance()->GetMouseScale();
|
||||
// rect.bottom /= plInputManager::GetInstance()->GetMouseScale();
|
||||
|
||||
::MapWindowPoints( hWnd, NULL, (POINT *)&rect, 2 );
|
||||
::ClipCursor(&rect);
|
||||
::ShowCursor( FALSE );
|
||||
SetCapture(hWnd);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
ReleaseCapture();
|
||||
::ClipCursor(nil);
|
||||
::ShowCursor( TRUE );
|
||||
}
|
||||
}
|
||||
|
@ -172,7 +172,6 @@ public:
|
||||
~plMouseDevice();
|
||||
|
||||
const char* GetInputName() { return "mouse"; }
|
||||
void HandleWindowActivate(bool bActive, HWND hWnd);
|
||||
|
||||
hsBool HasControlFlag(int f) const { return fControlFlags.IsBitSet(f); }
|
||||
void SetControlFlag(int f)
|
||||
|
@ -563,10 +563,7 @@ void plDInputMgr::AddDevice(IDirectInputDevice8* device)
|
||||
|
||||
void plDInputMgr::ConfigureDevice()
|
||||
{
|
||||
::ClipCursor(nil);
|
||||
::ShowCursor( TRUE );
|
||||
ReleaseCapture();
|
||||
|
||||
|
||||
DICOLORSET dics;
|
||||
ZeroMemory(&dics, sizeof(DICOLORSET));
|
||||
@ -587,13 +584,7 @@ void plDInputMgr::ConfigureDevice()
|
||||
for (int i = 0; i < fDI->fSticks.Count(); i++)
|
||||
fDI->fSticks[i]->fDevice->SetActionMap( fDI->fActionFormat, NULL, DIDSAM_FORCESAVE );
|
||||
|
||||
RECT rect;
|
||||
::GetClientRect(fhWnd,&rect);
|
||||
::ClientToScreen(fhWnd,(LPPOINT)&rect);
|
||||
::ClipCursor(&rect);
|
||||
::ShowCursor( FALSE );
|
||||
SetCapture(fhWnd);
|
||||
|
||||
}
|
||||
|
||||
hsBool plDInputMgr::MsgReceive(plMessage* msg)
|
||||
|
@ -2233,7 +2233,6 @@ hsBool plDXPipeline::IResetDevice()
|
||||
{
|
||||
IClearShadowSlaves();
|
||||
|
||||
ReleaseCapture();
|
||||
Sleep(100);
|
||||
HRESULT coopLev = fD3DDevice->TestCooperativeLevel();
|
||||
if( coopLev == D3DERR_DEVICELOST )
|
||||
@ -2281,8 +2280,6 @@ hsBool plDXPipeline::IResetDevice()
|
||||
/// all device-specific stuff needs to be recreated
|
||||
plDeviceRecreateMsg* clean = TRACKED_NEW plDeviceRecreateMsg();
|
||||
plgDispatch::MsgSend(clean);
|
||||
|
||||
SetCapture(fSettings.fHWnd);
|
||||
}
|
||||
fDevWasLost = true;
|
||||
fDeviceLost = false;
|
||||
|
Reference in New Issue
Block a user