Commit ba0e28ab authored by James's avatar James
Browse files

Comment mouse tracker actions

parent e32cd50c
......@@ -74,12 +74,14 @@ void MouseTracker::Update(int bufferWidth, int bufferHeight,
auto widthSpeed = (bottomScreen.GetWidth() / 20.0);
auto heightSpeed = (bottomScreen.GetHeight() / 20.0);
// Read in and convert pointer values to absolute values on the canvas
auto pointerX = LibRetro::CheckInput(0, RETRO_DEVICE_POINTER, 0, RETRO_DEVICE_ID_POINTER_X);
auto pointerY = LibRetro::CheckInput(0, RETRO_DEVICE_POINTER, 0, RETRO_DEVICE_ID_POINTER_Y);
auto newX = static_cast<int>((pointerX + 0x7fff) / (float)(0x7fff * 2) * bufferWidth);
auto newY = static_cast<int>((pointerY + 0x7fff) / (float)(0x7fff * 2) * bufferHeight);
if ((pointerX != 0 || pointerY != 0) && (newX != lastMouseX || newY != lastMouseY)) {
// Use mouse pointer movement
lastMouseX = newX;
lastMouseY = newY;
......@@ -88,6 +90,7 @@ void MouseTracker::Update(int bufferWidth, int bufferHeight,
y = std::max(static_cast<int>(bottomScreen.top), std::min(newY, static_cast<int>(bottomScreen.bottom))) -
bottomScreen.top;
} else if (LibRetro::settings.analog_function != LibRetro::CStickFunction::CStick) {
// Use controller movement
float controllerX =
((float) LibRetro::CheckInput(0, RETRO_DEVICE_ANALOG, RETRO_DEVICE_INDEX_ANALOG_RIGHT,
RETRO_DEVICE_ID_ANALOG_X) /
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment