Fix for wrong trackpad scroll deltas on the retina.
Currently the deltas are half as large as they should be. Cursor coordinates
are multiplied by NativePixelSize, deltas must have the same conversion.
There may be something I don't quite understand, but do we really need these calculations?
void GHOST_WindowCocoa::setNativePixelSize(void) { NSView *view = (m_openGLView) ? m_openGLView : m_metalView; NSRect backingBounds = [view convertRectToBacking:[view bounds]]; GHOST_Rect rect; getClientBounds(rect); m_nativePixelSize = (float)backingBounds.size.width / (float)rect.getWidth(); }
Can't it just be this way?
void GHOST_WindowCocoa::setNativePixelSize(void) { m_nativePixelSize = [m_window backingScaleFactor]; }