summaryrefslogtreecommitdiffhomepage
path: root/FTNoIR_Protocol_MOUSE
diff options
context:
space:
mode:
authorWim Vriend <facetracknoir@gmail.com>2011-10-04 20:00:33 +0000
committerWim Vriend <facetracknoir@gmail.com>2011-10-04 20:00:33 +0000
commit5eef68f451d810572e11dce958ce52e78ed96364 (patch)
treef8de11f777801eab5e6f2f9128ccfc3d558ebe10 /FTNoIR_Protocol_MOUSE
parentc802311ccbf6b3d7c3bffd19be84711205655f17 (diff)
Fiddling with Mouse look interface.
git-svn-id: svn+ssh://svn.code.sf.net/p/facetracknoir/code@91 19e81ba0-9b1a-49c3-bd6c-561e1906d5fb
Diffstat (limited to 'FTNoIR_Protocol_MOUSE')
-rw-r--r--FTNoIR_Protocol_MOUSE/FTNoIR_Protocol_MOUSE.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/FTNoIR_Protocol_MOUSE/FTNoIR_Protocol_MOUSE.cpp b/FTNoIR_Protocol_MOUSE/FTNoIR_Protocol_MOUSE.cpp
index 2104c09f..60ad4eaa 100644
--- a/FTNoIR_Protocol_MOUSE/FTNoIR_Protocol_MOUSE.cpp
+++ b/FTNoIR_Protocol_MOUSE/FTNoIR_Protocol_MOUSE.cpp
@@ -58,6 +58,13 @@ void FTNoIR_Protocol_MOUSE::Release()
void FTNoIR_Protocol_MOUSE::Initialize()
{
+int ScreenX, ScreenY;
+
+ ScreenX = GetSystemMetrics(SM_CXSCREEN);
+ ScreenY = GetSystemMetrics(SM_CYSCREEN);
+
+ qDebug() << "Initialize(): Screen width (x) = " << ScreenX << ", height (y) = " << ScreenY;
+
return;
}
@@ -209,6 +216,7 @@ float fMouse_Wheel;
//
// Determine which style is used.
//
+ SecureZeroMemory(&MouseStruct, sizeof(MouseStruct));
MouseStruct.type = INPUT_MOUSE;
switch (Mouse_Style) {
case FTN_ABSOLUTE:
@@ -216,8 +224,8 @@ float fMouse_Wheel;
if (useVirtualDesk) {
MouseStruct.mi.dwFlags |= MOUSEEVENTF_VIRTUALDESK;
}
- MouseStruct.mi.dx = scale2AnalogLimits(-1.0f * fMouse_X * mouse_X_factor, -180, 180);
- MouseStruct.mi.dy = scale2AnalogLimits(fMouse_Y * mouse_Y_factor, -180, 180);
+ MouseStruct.mi.dx = scale2AnalogLimits(-1.0f * fMouse_X * mouse_X_factor, -150, 150);
+ MouseStruct.mi.dy = scale2AnalogLimits(fMouse_Y * mouse_Y_factor, -150, 150);
MouseStruct.mi.mouseData = mouse_Wheel_factor * (fMouse_Wheel - prev_fMouse_Wheel);
frame_delay = 9999; // Seems no problem with Absolute positioning