diff --git a/projects/VS2017.UWP/raylib.App.UWP/BaseApp.h b/projects/VS2017.UWP/raylib.App.UWP/BaseApp.h index 813840581..f46812413 100644 --- a/projects/VS2017.UWP/raylib.App.UWP/BaseApp.h +++ b/projects/VS2017.UWP/raylib.App.UWP/BaseApp.h @@ -151,7 +151,7 @@ namespace raylibUWP window->KeyDown += ref new TypedEventHandler(this, &BaseApp::OnKeyDown); window->KeyUp += ref new TypedEventHandler(this, &BaseApp::OnKeyUp); - //Windows::Devices::Input::MouseDevice::GetForCurrentView()->MouseMoved += ref new TypedEventHandler(this, &BaseApp::MouseMoved); + Windows::Devices::Input::MouseDevice::GetForCurrentView()->MouseMoved += ref new TypedEventHandler(this, &BaseApp::MouseMoved); DisplayInformation^ currentDisplayInformation = DisplayInformation::GetForCurrentView(); currentDisplayInformation->DpiChanged += ref new TypedEventHandler(this, &BaseApp::OnDpiChanged); @@ -227,7 +227,7 @@ namespace raylibUWP UWPMousePosition(x, y); } - //mouseDelta = { 0 ,0 }; + mouseDelta = { 0 ,0 }; } // Process Gamepads @@ -345,8 +345,11 @@ namespace raylibUWP UWPScrollWheel(args->CurrentPoint->Properties->MouseWheelDelta); } - //For mouse delta? - //void MouseMoved(Windows::Devices::Input::MouseDevice^ mouseDevice, Windows::Devices::Input::MouseEventArgs^ args); + void MouseMoved(Windows::Devices::Input::MouseDevice^ mouseDevice, Windows::Devices::Input::MouseEventArgs^ args) + { + mouseDelta.x += args->MouseDelta.X; + mouseDelta.y += args->MouseDelta.Y; + } void OnKeyDown(Windows::UI::Core::CoreWindow ^ sender, Windows::UI::Core::KeyEventArgs ^ args) {