Fixed a problem with how we were handling mouse button states.
This commit is contained in:
parent
3d9851fbe2
commit
43534ac86d
|
@ -561,8 +561,6 @@ WinMain (
|
||||||
|
|
||||||
//
|
//
|
||||||
// Set up worker threads
|
// Set up worker threads
|
||||||
//
|
|
||||||
|
|
||||||
const s32 WorkerThreadCount = PLATFORM_THREAD_COUNT;
|
const s32 WorkerThreadCount = PLATFORM_THREAD_COUNT;
|
||||||
worker_thread_info* WorkerThreads = 0;
|
worker_thread_info* WorkerThreads = 0;
|
||||||
if (PLATFORM_THREAD_COUNT > 0)
|
if (PLATFORM_THREAD_COUNT > 0)
|
||||||
|
@ -679,34 +677,32 @@ WinMain (
|
||||||
!((Mouse.LeftButtonState & KeyState_IsDown) > 0))
|
!((Mouse.LeftButtonState & KeyState_IsDown) > 0))
|
||||||
{
|
{
|
||||||
Mouse.LeftButtonState = 0;
|
Mouse.LeftButtonState = 0;
|
||||||
} else if (Mouse.LeftButtonState & KeyState_IsDown)
|
}
|
||||||
|
else if (Mouse.LeftButtonState & KeyState_IsDown)
|
||||||
{
|
{
|
||||||
Mouse.LeftButtonState |= KeyState_WasDown;
|
Mouse.LeftButtonState |= KeyState_WasDown;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Mouse.MiddleButtonState & KeyState_WasDown &&
|
if (Mouse.MiddleButtonState & KeyState_WasDown &&
|
||||||
!((Mouse.LeftButtonState & KeyState_IsDown) > 0))
|
!((Mouse.MiddleButtonState & KeyState_IsDown) > 0))
|
||||||
{
|
{
|
||||||
Mouse.MiddleButtonState = 0;
|
Mouse.MiddleButtonState = 0;
|
||||||
} else if (Mouse.MiddleButtonState & KeyState_IsDown)
|
}
|
||||||
|
else if (Mouse.MiddleButtonState & KeyState_IsDown)
|
||||||
{
|
{
|
||||||
Mouse.MiddleButtonState |= KeyState_WasDown;
|
Mouse.MiddleButtonState |= KeyState_WasDown;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Mouse.RightButtonState & KeyState_WasDown &&
|
if (Mouse.RightButtonState & KeyState_WasDown &&
|
||||||
!((Mouse.LeftButtonState & KeyState_IsDown) > 0))
|
!((Mouse.RightButtonState & KeyState_IsDown) > 0))
|
||||||
{
|
{
|
||||||
Mouse.RightButtonState = 0;
|
Mouse.RightButtonState = 0;
|
||||||
} else if (Mouse.RightButtonState & KeyState_IsDown)
|
}
|
||||||
|
else if (Mouse.RightButtonState & KeyState_IsDown)
|
||||||
{
|
{
|
||||||
Mouse.RightButtonState |= KeyState_WasDown;
|
Mouse.RightButtonState |= KeyState_WasDown;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////
|
|
||||||
// Finish Up
|
|
||||||
//////////////////////////////////
|
|
||||||
|
|
||||||
HDC DeviceContext = GetDC(MainWindow.Handle);
|
HDC DeviceContext = GetDC(MainWindow.Handle);
|
||||||
SwapBuffers(DeviceContext);
|
SwapBuffers(DeviceContext);
|
||||||
ReleaseDC(MainWindow.Handle, DeviceContext);
|
ReleaseDC(MainWindow.Handle, DeviceContext);
|
||||||
|
|
Loading…
Reference in New Issue