Simple Directmedia Layer
Go to file
Sam Lantinga 54685787ca Fixed bug 3847 - Hit Test x coordinate wrong on secondary monitor
Robert Turner

SDL_windowsevents.c contains code to retrieve the x and y coordinate for a requested hit test. It does this as follows:

    POINT winpoint = { (int) LOWORD(lParam), (int) HIWORD(lParam) };

LOWORD(lParam) does not correctly mask off high bits that are set if the point is on a second (or third, etc.) monitor. This effectively offsets the x-coordinate by a large value.

MSDN documentation suggests that LOWORD() and HIWORD() are the wrong macros for the task, instead suggesting we should be doing something like the following:

    POINT winpoint = { GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam) };

Testing this change on my Windows 10 machine with 2 monitors gives the correct results.
2017-09-26 15:07:35 -07:00
acinclude Fixed bug 3481 - Configure fails to detect dynamic library support on powerpc64le 2016-11-06 20:26:48 -08:00
android-project Fixed bug 3843 - Android missing some code in SDLHapticHandler 2017-09-23 12:37:09 -07:00
build-scripts Updated config.guess and config.sub, added config.sub.patch for NaCl and Emscripten build support 2017-09-09 08:03:23 -07:00
cmake vulkan: Include a copy of vulkan.h and vk_platform.h. 2017-08-27 23:25:12 -04:00
debian Make sure the libtool archives are installed 2017-09-09 08:34:46 -07:00
docs Added instructions for deploying to older iOS devices (thanks Sylvain!) 2017-09-22 11:13:34 -07:00
include Fixed bug 3842 - fix SDL_thread.h for emx 2017-09-23 12:38:47 -07:00
src Fixed bug 3847 - Hit Test x coordinate wrong on secondary monitor 2017-09-26 15:07:35 -07:00
test test: forgot to change a variable. 2017-08-29 18:25:55 -04:00
VisualC Good bye, Visual Studio 2008 2017-09-22 17:02:18 -07:00
VisualC-WinRT Moved haptic source files into the proper folder 2017-08-30 09:44:38 -07:00
visualtest Renaming of guard header names to quiet -Wreserved-id-macro 2017-08-28 00:22:23 -07:00
Xcode Fixed bug 3837 - Change project settings for Xcode 9? 2017-09-22 12:26:54 -07:00
Xcode-iOS Added stubs for simple Steam Controller support 2017-09-22 08:30:52 -07:00
.hgignore
Android.mk Removed non-existent files 2017-09-22 08:31:02 -07:00
autogen.sh Don't use pushd/popd in autogen.sh; Ubuntu's /bin/sh doesn't support it. 2016-12-26 22:58:58 -05:00
BUGS.txt BUGS.txt: Changed mailing list link to discourse.libsdl.org. 2017-04-01 00:05:25 -04:00
cmake_uninstall.cmake.in
CMakeLists.txt Added stub Steam Controller sources to Android and iOS command line builds 2017-09-22 16:33:34 -07:00
configure Added stub Steam Controller sources to Android and iOS command line builds 2017-09-22 16:33:34 -07:00
configure.in Added stub Steam Controller sources to Android and iOS command line builds 2017-09-22 16:33:34 -07:00
COPYING.txt Updated copyright for 2017 2017-01-01 18:33:28 -08:00
CREDITS.txt
INSTALL.txt More HTTPS doc tweaks. 2017-02-16 16:59:07 -05:00
Makefile.in vulkan: Initial Vulkan support! 2017-08-27 22:15:57 -04:00
Makefile.minimal
Makefile.pandora pandora: Fixed compiler warning about redefining SDL_REVISION. 2017-06-18 23:00:27 +02:00
Makefile.psp
Makefile.wiz
README-SDL.txt More HTTPS changes in the documentation. 2017-02-16 16:52:03 -05:00
README.txt readme: correct webpage URL to use HTTPS. 2017-02-16 13:30:34 -05:00
sdl2-config.cmake.in Applied Ubuntu patch bug_822210_fix_sdl2-config.cmake_whitespace.patch 2016-10-07 15:08:37 -07:00
sdl2-config.in
sdl2.m4 Fixed bug 3429 - Update AM_PATH_SDL2() to also check for SDL2.framework 2016-09-29 16:37:08 -07:00
sdl2.pc.in
SDL2.spec.in
SDL2Config.cmake Fixed bug 3651 - CMake build does not install CMake package configuration 2017-08-09 19:03:10 -07:00
TODO.txt
VisualC.html
WhatsNew.txt Added a hint SDL_HINT_AUDIO_CATEGORY to control the audio category, 2017-09-15 17:27:32 -07:00

                         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)