From 5eef68f451d810572e11dce958ce52e78ed96364 Mon Sep 17 00:00:00 2001 From: Wim Vriend Date: Tue, 4 Oct 2011 20:00:33 +0000 Subject: Fiddling with Mouse look interface. git-svn-id: svn+ssh://svn.code.sf.net/p/facetracknoir/code@91 19e81ba0-9b1a-49c3-bd6c-561e1906d5fb --- FTNoIR_Protocol_MOUSE/FTNoIR_Protocol_MOUSE.cpp | 12 ++++++++++-- 1 file 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 -- cgit v1.2.3