1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-17 10:52:46 +00:00

Merge pull request #221 from Hoikas/window-fixes

Window fixes
This commit is contained in:
2012-11-18 14:02:27 -08:00
5 changed files with 58 additions and 74 deletions

View File

@ -750,27 +750,3 @@ bool 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 );
::ShowCursor( FALSE );
SetCapture(hWnd);
}
else
{
ReleaseCapture();
::ShowCursor( TRUE );
}
}

View File

@ -160,7 +160,6 @@ public:
~plMouseDevice();
const char* GetInputName() { return "mouse"; }
void HandleWindowActivate(bool bActive, hsWindowHndl hWnd);
bool HasControlFlag(int f) const { return fControlFlags.IsBitSet(f); }
void SetControlFlag(int f)

View File

@ -584,8 +584,6 @@ void plDInputMgr::AddDevice(IDirectInputDevice8* device)
void plDInputMgr::ConfigureDevice()
{
::ShowCursor( TRUE );
ReleaseCapture();
DICOLORSET dics;
ZeroMemory(&dics, sizeof(DICOLORSET));
@ -607,8 +605,6 @@ void plDInputMgr::ConfigureDevice()
fDI->fSticks[i]->fDevice->SetActionMap( fDI->fActionFormat, NULL, DIDSAM_FORCESAVE );
::ShowCursor( FALSE );
SetCapture(fhWnd);
}
bool plDInputMgr::MsgReceive(plMessage* msg)

View File

@ -2247,7 +2247,6 @@ bool plDXPipeline::IResetDevice()
{
IClearShadowSlaves();
ReleaseCapture();
Sleep(100);
HRESULT coopLev = fD3DDevice->TestCooperativeLevel();
if( coopLev == D3DERR_DEVICELOST )
@ -2295,8 +2294,6 @@ bool plDXPipeline::IResetDevice()
/// all device-specific stuff needs to be recreated
plDeviceRecreateMsg* clean = new plDeviceRecreateMsg();
plgDispatch::MsgSend(clean);
SetCapture(fSettings.fHWnd);
}
fDevWasLost = true;
fDeviceLost = false;