mirror of
https://github.com/Ryujinx/SDL.git
synced 2025-11-07 17:35:05 +00:00
Julian Raschke I use an open Mac laptop with an additional external monitor. The coordinate spaces from SDL_GetGlobalMouseState() and SDL_GetWindowPosition() match on the primary display, but not on the secondary display. Cocoa window coordinates are vertically flipped in relation to the primary display: https://github.com/spurious/SDL-mirror/blob/release-2.0.8/src/video/cocoa/SDL_cocoawindow.m#L219-L222 However, Cocoa_GetGlobalMouseState inverts the cursor Y coordinate per-display: https://github.com/spurious/SDL-mirror/blob/release-2.0.8/src/video/cocoa/SDL_cocoamouse.m#L320-L323 Suggested fix: Replace the for-loop with this simpler calculation: *x = (int) cocoaLocation.x; *y = (int) (CGDisplayPixelsHigh(kCGDirectMainDisplay) - cocoaLocation.y); |
||
|---|---|---|
| acinclude | ||
| android-project | ||
| android-project-ant | ||
| build-scripts | ||
| cmake | ||
| debian | ||
| docs | ||
| include | ||
| src | ||
| test | ||
| VisualC | ||
| VisualC-WinRT | ||
| visualtest | ||
| wayland-protocols | ||
| Xcode | ||
| Xcode-iOS | ||
| .hgignore | ||
| Android.mk | ||
| autogen.sh | ||
| BUGS.txt | ||
| cmake_uninstall.cmake.in | ||
| CMakeLists.txt | ||
| configure | ||
| configure.in | ||
| COPYING.txt | ||
| CREDITS.txt | ||
| INSTALL.txt | ||
| Makefile.in | ||
| Makefile.minimal | ||
| Makefile.os2 | ||
| Makefile.pandora | ||
| Makefile.psp | ||
| Makefile.wiz | ||
| README-SDL.txt | ||
| README.txt | ||
| sdl2-config.cmake.in | ||
| sdl2-config.in | ||
| sdl2.m4 | ||
| sdl2.pc.in | ||
| SDL2.spec.in | ||
| SDL2Config.cmake | ||
| TODO.txt | ||
| VisualC.html | ||
| WhatsNew.txt | ||
Simple DirectMedia Layer
(SDL)
Version 2.0
---
https://www.libsdl.org/
Simple DirectMedia Layer is a cross-platform development library designed
to provide low level access to audio, keyboard, mouse, joystick, and graphics
hardware via OpenGL and Direct3D. It is used by video playback software,
emulators, and popular games including Valve's award winning catalog
and many Humble Bundle games.
More extensive documentation is available in the docs directory, starting
with README.md
Enjoy!
Sam Lantinga (slouken@libsdl.org)