This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed bug 4018 - Implement SDL_GetWindowBordersSize() under Windows/W…
…in32/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 ) References: : http://www.firststeps.ru/mfc/winapi/r.php?72 : https://stackoverflow.com/a/34143777/674685 : https://stackoverflow.com/a/431548/674685 : https://wiki.libsdl.org/SDL_GetWindowBordersSize
- Loading branch information
Showing 3 changed files with 45 additions and 0 deletions.