SDL2 for the Nintendo Wii U (build with "cmake [SDL source path] -DCMAKE_TOOLCHAIN_FILE=$WUT_ROOT/share/wut.toolchain.cmake -DCMAKE_INSTALL_PREFIX=$DEVKITPRO/portlibs/wiiu")
Go to file
Sam Lantinga 8044cbb297 Fixed bug 1842 - [patch] SDL_SetWindowPosition sets bad position values when given SDL_WINDOWPOS_CENTERED args
Alex Szpakowski

When calling SDL_SetWindowPosition(window, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED), the window moves to the correct position but it seems to internally set its x/y position values to the literal value of the SDL_WINDOWPOS_CENTERED define.
This causes all sorts of problems when SDL functions which use the window position (e.g. SDL_SetWindowGrab) are called after the aforementioned SDL_SetWindowPosition call.

Looking at the SDL_SetWindowPosition code, it seems that SDL_SendWindowEvent with the SDL_WINDOWEVENT_MOVED event is called at the end of the function using the literal value of the SDL_WINDOWPOS_CENTERED define, instead of the newly set window->x and window->y values.
SDL_SendWindowEvent then sets the values of window->windowed.x and window->windowed.y to that value (0x2FFF0000, aka 805240832.)

I have attached a patch which changes SDL_SetWindowPosition to make sure SDL_SendWindowEvent is called with the correct coordinate values, if SDL_WINDOWPOS_CENTERED is used (fixes the issue for me.)

Tested with Mac OS 10.8.3.
2013-05-19 22:36:54 -07:00
acinclude We have to fix the DLL name convention on Windows every time... 2012-10-19 21:43:41 -07:00
android-project Added mobile application events, with implementations for iOS and Android 2013-05-18 12:48:50 -07:00
build-scripts Fix bug 1574 - updaterev.sh fails when path contains spaces 2013-03-10 16:28:20 -07:00
cmake Fixed bug 1839 - SDL2 Cmake: VIDEO_COCOA check fails on OS X; VIDEO_COCOA sources aren't compiled. 2013-05-16 00:52:33 -07:00
debian Deprecate test/automated and test/test-automation (replaced by test/testautomation*.*) 2013-05-18 23:32:53 -07:00
include Fixed bug 1837 - Use error extension instead of glGetError() 2013-05-19 22:28:10 -07:00
src Fixed bug 1842 - [patch] SDL_SetWindowPosition sets bad position values when given SDL_WINDOWPOS_CENTERED args 2013-05-19 22:36:54 -07:00
test Fixed bug 1837 - Use error extension instead of glGetError() 2013-05-19 22:28:10 -07:00
VisualC Deprecate test/automated and test/test-automation (replaced by test/testautomation*.*) 2013-05-18 23:32:53 -07:00
Xcode Deprecate test/automated and test/test-automation (replaced by test/testautomation*.*) 2013-05-18 23:32:53 -07:00
Xcode-iOS Deprecate test/automated and test/test-automation (replaced by test/testautomation*.*) 2013-05-18 23:32:53 -07:00
.DISABLED-hgeol Disable .hgeol for now...it doesn't work well at the moment. 2011-01-20 11:51:23 -05:00
.hgignore Added new tests to the .hgignore file 2013-03-03 22:06:27 -08:00
.hgtags Tagging version before everything gets ripped out. 2010-05-09 17:00:56 -07:00
.indent.pro SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head. 2006-07-10 21:04:37 +00:00
aclocal.m4 We have to fix the DLL name convention on Windows every time... 2012-10-19 21:43:41 -07:00
Android.mk Fixed bug 1606 - SDL does not implement SDL_GetPowerInfo() for Android. 2012-09-23 01:37:44 -07:00
autogen.sh SDL_revision.h is always updated as part of the build process now. 2011-02-28 09:06:15 -08:00
BUGS Merged r2977:2978 from branches/SDL-1.2: BUGS file cutdown. 2007-02-14 10:41:55 +00:00
CMakeLists.txt Replaced Gnome screensaver hack with D-Bus messages to org.gnome.ScreenSaver. 2012-12-28 03:46:55 -05:00
configure Fixed bug 1829 - sdl2-config is not executable 2013-05-16 01:03:28 -07:00
configure.in Fixed bug 1829 - sdl2-config is not executable 2013-05-16 01:03:28 -07:00
COPYING Happy New Year! 2013-02-15 08:47:44 -08:00
CREDITS Removed Nintendo DS support since nobody has volunteered to maintain it for over a year. 2013-03-17 09:44:58 -07:00
INSTALL Updated documentation with info about the wiki 2013-02-14 15:56:33 -08:00
Makefile.in The input API was never implemented, so removing it before release. 2013-02-19 05:39:19 -08:00
Makefile.minimal Made it possible to build SDL from a fresh checkout without any additional steps. 2011-02-16 02:37:09 -08:00
Makefile.pandora Removed /dev/dsp DMA audio target. 2011-07-24 03:37:13 -07:00
Makefile.psp Add PSP support 2013-03-17 20:07:02 +08:00
Makefile.wiz Removed /dev/dsp DMA audio target. 2011-07-24 03:37:13 -07:00
README Fixed bug 1748 - Patch for errors and mistakes in SDL 2 README files. 2013-03-10 09:03:38 -07:00
README-SDL.txt Fixed bug 1748 - Patch for errors and mistakes in SDL 2 README files. 2013-03-10 09:03:38 -07:00
README.android Updated README.android. 2013-05-12 12:59:17 +02:00
README.cmake Adds CMake build system by Marcus Von Appen (bug #1597) 2012-11-16 09:23:18 -03:00
README.DirectFB Fixed bug 1748 - Patch for errors and mistakes in SDL 2 README files. 2013-03-10 09:03:38 -07:00
README.gesture Fixed bug 1748 - Patch for errors and mistakes in SDL 2 README files. 2013-03-10 09:03:38 -07:00
README.HG Whitespace change in a README. 2011-01-22 03:57:27 -05:00
README.iOS Added mobile application events, with implementations for iOS and Android 2013-05-18 12:48:50 -07:00
README.MacOSX Fixed bug 1748 - Patch for errors and mistakes in SDL 2 README files. 2013-03-10 09:03:38 -07:00
README.pandora Fixed bug 1748 - Patch for errors and mistakes in SDL 2 README files. 2013-03-10 09:03:38 -07:00
README.Platforms The Haiku port is being actively maintained by Axel Dörfler 2013-03-26 22:26:07 -07:00
README.Porting Fixed bug 1748 - Patch for errors and mistakes in SDL 2 README files. 2013-03-10 09:03:38 -07:00
README.psp Add PSP support 2013-03-17 20:07:02 +08:00
README.touch Corrected names in README file. 2013-04-29 23:41:49 +02:00
README.WinCE Removed Windows CE support from SDL 2.0. 2012-09-15 10:59:39 -04:00
sdl2-config.in Updated to SDL 2.0, and SDL 2.0 can now be installed coexisting with SDL 1.2 2012-01-22 17:21:00 -05:00
sdl2.m4 Updated macro comment 2013-02-15 15:22:12 -08:00
sdl2.pc.in Updated to SDL 2.0, and SDL 2.0 can now be installed coexisting with SDL 1.2 2012-01-22 17:21:00 -05:00
SDL2.spec.in Successfully built an SDL 2.0 RPM 2012-01-22 23:36:59 -05:00
TODO Test commit. Adding space to TODO.. 2012-10-11 09:44:59 -07:00
VisualC.html Removed newline, to make sure revision control post-commit hook is working. 2008-12-01 09:45:01 +00:00
WhatsNew Clearing the API changes for the 1.3.0 release 2011-01-19 22:20:44 -08:00

                         Simple DirectMedia Layer

                                  (SDL)

                                Version 2.0

---
http://www.libsdl.org/

This is the Simple DirectMedia Layer, a general API that provides low
level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL,
and 2D framebuffer across multiple platforms.

The current version supports Windows, Mac OS X, Linux, FreeBSD,
NetBSD, OpenBSD, BSD/OS, Solaris, iOS, and Android. The code contains
support for other operating systems but those are not officially supported.

SDL is written in C, but works with C++ natively, and has bindings to
several other languages, including Ada, C#, Eiffel, Erlang, Euphoria,
Go, Guile, Haskell, Java, Lisp, Lua, ML, Objective C, Pascal, Perl, PHP,
Pike, Pliant, Python, Ruby, and Smalltalk.

This library is distributed under the zlib license, which can be found
in the file "COPYING".

The best way to learn how to use SDL is to check out the header files in
the "include" subdirectory and the programs in the "test" subdirectory.
The header files and test programs are well commented and always up to date.
More documentation and FAQs are available online at:
	http://wiki.libsdl.org/

If you need help with the library, or just want to discuss SDL related
issues, you can join the developers mailing list:
	http://www.libsdl.org/mailing-list.php

Enjoy!
	Sam Lantinga				(slouken@libsdl.org)