mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-23 18:55:50 +00:00
[SDL] Report mouse in client coordinates
This commit is contained in:
parent
7e86d349d2
commit
a270b9328e
|
@ -274,8 +274,10 @@ namespace OpenTK.Platform.SDL2
|
|||
|
||||
static void ProcessMouseMotionEvent(Sdl2NativeWindow window, MouseMotionEvent ev)
|
||||
{
|
||||
//float scale = window.ClientSize.Width / (float)window.Size.Width;
|
||||
window.OnMouseMove(ev.X, ev.Y);
|
||||
float scale = window.ClientSize.Width / (float)window.Size.Width;
|
||||
window.OnMouseMove(
|
||||
(int)Math.Round(ev.X * scale),
|
||||
(int)Math.Round(ev.Y * scale));
|
||||
}
|
||||
|
||||
static void ProcessMouseWheelEvent(Sdl2NativeWindow window, MouseWheelEvent ev)
|
||||
|
|
Loading…
Reference in a new issue