- merged menu branch back into trunk.
SVN r2768 (trunk)
This commit is contained in:
parent
ec0b07b5e2
commit
579502ab74
86 changed files with 13610 additions and 9229 deletions
|
|
@ -1,8 +1,3 @@
|
|||
#ifdef _MSC_VER
|
||||
// Turn off "conversion from 'LONG_PTR' to 'LONG', possible loss of data"
|
||||
// generated by SetClassLongPtr().
|
||||
#pragma warning(disable:4244)
|
||||
#endif
|
||||
|
||||
// HEADER FILES ------------------------------------------------------------
|
||||
|
||||
|
|
@ -22,6 +17,7 @@
|
|||
#include "doomstat.h"
|
||||
#include "win32iface.h"
|
||||
#include "rawinput.h"
|
||||
#include "menu/menu.h"
|
||||
|
||||
// MACROS ------------------------------------------------------------------
|
||||
|
||||
|
|
@ -265,18 +261,17 @@ void I_CheckNativeMouse(bool preferNative)
|
|||
|
||||
if (!windowed)
|
||||
{
|
||||
want_native = false;
|
||||
// ungrab mouse when in the menu with mouse control on.
|
||||
want_native = m_use_mouse && (menuactive == MENU_On || menuactive == MENU_OnNoPause);
|
||||
}
|
||||
else
|
||||
{
|
||||
want_native =
|
||||
(GetForegroundWindow() != Window) ||
|
||||
!CaptureMode_InGame() ||
|
||||
GUICapture ||
|
||||
paused ||
|
||||
preferNative ||
|
||||
!use_mouse ||
|
||||
demoplayback;
|
||||
((!m_use_mouse || menuactive != MENU_WaitKey) &&
|
||||
(!CaptureMode_InGame() || GUICapture || paused || demoplayback));
|
||||
}
|
||||
|
||||
//Printf ("%d %d %d\n", wantNative, preferNative, NativeMouse);
|
||||
|
|
@ -592,7 +587,7 @@ void FRawMouse::Ungrab()
|
|||
|
||||
bool FRawMouse::ProcessRawInput(RAWINPUT *raw, int code)
|
||||
{
|
||||
if (!Grabbed || raw->header.dwType != RIM_TYPEMOUSE)
|
||||
if (!Grabbed || raw->header.dwType != RIM_TYPEMOUSE || !use_mouse)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
@ -806,7 +801,7 @@ void FDInputMouse::ProcessInput()
|
|||
dx = 0;
|
||||
dy = 0;
|
||||
|
||||
if (!Grabbed)
|
||||
if (!Grabbed || !use_mouse)
|
||||
return;
|
||||
|
||||
event_t ev = { 0 };
|
||||
|
|
@ -948,7 +943,7 @@ void FWin32Mouse::ProcessInput()
|
|||
POINT pt;
|
||||
int x, y;
|
||||
|
||||
if (!Grabbed || !GetCursorPos(&pt))
|
||||
if (!Grabbed || !use_mouse || !GetCursorPos(&pt))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
@ -1006,6 +1001,11 @@ bool FWin32Mouse::WndProcHook(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPa
|
|||
return true;
|
||||
}
|
||||
}
|
||||
else if (!use_mouse)
|
||||
{
|
||||
// all following messages should only be processed if the mouse is in use
|
||||
return false;
|
||||
}
|
||||
else if (message == WM_MOUSEWHEEL)
|
||||
{
|
||||
WheelMoved(0, (SHORT)HIWORD(wParam));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue