Go to file
Sam Lantinga 7c60bec493 Fixed bug 4018 - Implement SDL_GetWindowBordersSize() under Windows/Win32/WinAPI
Ismael Ferreras Morezuelas (Swyter)

As a new year gift I have implemented the Windows version of SDL_GetWindowBordersSize(). I needed it for auto-selecting a cozy window size for the game I'm currently working on and noticed that it only worked under X11, so I thought it could be a good excuse to contribute back more stuff. The Mercurial patch is attached as a .diff file. Let me know what you think.

Happy 2018 to all the SDL2 devs and users!

--

PS: Keep in mind that Windows 10 includes the 8px invisible grip borders as part of the frame. There's a way of detecting if Aero/DWM is being used and ask only for the visible rect, but I believe that GetWindowRect() is doing that for a reason and working as intended, so I haven't changed it. (See [2])


References:
[1]: http://www.firststeps.ru/mfc/winapi/r.php?72
[2]: https://stackoverflow.com/a/34143777/674685
[3]: https://stackoverflow.com/a/431548/674685
[4]: https://wiki.libsdl.org/SDL_GetWindowBordersSize
2018-01-03 10:58:58 -08:00
VisualC Removed duplicate entry for SDL_wasapi.h 2017-12-08 16:12:53 -08:00
VisualC-WinRT winrt: Add mmdevapi.lib dependency to WinRT8.1 builds, for WASAPI support. 2017-12-31 03:51:17 -05:00
Xcode Updated copyright for 2018 2018-01-03 10:03:25 -08:00
Xcode-iOS Moved deployment target values to project settings 2017-12-12 22:30:21 -08: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 4001 - Android, prevent error message box to crash 2017-12-19 11:19:10 -08:00
android-project-ant Added the old ant Android build project structure 2017-10-28 12:11:25 -07:00
build-scripts winrt: Disabled Windows Phone 8.0 builds. 2017-12-31 03:17:18 -05:00
cmake vulkan: Include a copy of vulkan.h and vk_platform.h. 2017-08-27 23:25:12 -04:00
debian Updated copyright for 2018 2018-01-03 10:03:25 -08:00
docs audio: Port WASAPI to WinRT, remove XAudio2 backend. 2017-12-06 12:24:32 -05:00
include Updated copyright for 2018 2018-01-03 10:03:25 -08:00
src Fixed bug 4018 - Implement SDL_GetWindowBordersSize() under Windows/Win32/WinAPI 2018-01-03 10:58:58 -08:00
test Updated copyright for 2018 2018-01-03 10:03:25 -08:00
visualtest Renaming of guard header names to quiet -Wreserved-id-macro 2017-08-28 00:22:23 -07:00
.hgignore Updated SDL's YUV support, many thanks to Adrien Descamps 2017-11-12 22:51:12 -08:00
Android.mk Added Android build script for SDL 2017-12-16 10:40:41 -08:00
BUGS.txt BUGS.txt: Changed mailing list link to discourse.libsdl.org. 2017-04-01 00:05:25 -04:00
CMakeLists.txt Check for immintrin.h before using it in SDL_cpuinfo.h 2017-12-11 12:00:12 -08:00
COPYING.txt Updated copyright for 2018 2018-01-03 10:03:25 -08:00
CREDITS.txt Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
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 Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
Makefile.pandora pandora: Fixed compiler warning about redefining SDL_REVISION. 2017-06-18 23:00:27 +02:00
Makefile.psp PSP: Added missing object for generic TLS to Makefile. 2016-02-13 17:34:14 +01:00
Makefile.wiz Pandora: Updated SDL version in Makefile. 2016-07-19 21:01:30 +02:00
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.spec.in Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
SDL2Config.cmake Fixed bug 3651 - CMake build does not install CMake package configuration 2017-08-09 19:03:10 -07:00
TODO.txt Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
VisualC.html Fixed two typos in documentation. 2016-01-12 22:23:53 +01:00
WhatsNew.txt Added SDL_WinRTGetDeviceFamily() to find out what type of device your application is running on (thanks Daniel Knobe!) 2017-12-10 09:10:02 -08: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
cmake_uninstall.cmake.in Fixed bug 3867 - Can't find install_manifest.txt when running 'uninstall' target 2017-10-12 08:44:45 -07:00
configure configure script: Implement testing for build-time Metal SDK support. 2018-01-02 19:06:14 -04:00
configure.in configure script: Implement testing for build-time Metal SDK support. 2018-01-02 19:06:14 -04: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 Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
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 Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00

README.txt

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.


                         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)