include/SDL_video.h


Log

Author Commit Date CI Message
Ozkan Sezer afc1738e 2018-09-07T10:47:50 SDL_sensor.h, SDL_video.h: remove comma at end of enumerator lists. Avoids gcc -pedantic warnings, closes bug #4253.
Sam Lantinga f225af0c 2018-08-22T21:48:28 Added SDL_GetDisplayOrientation() to get the display orientation, and added a new event SDL_DISPLAYEVENT to notify the application when the orientation changes. Documented the values returned by the accelerometer and gyroscope sensors
Mark Callow 69958441 2018-02-21T09:58:21 Fix high-dpi support on macOS and simplify it and iOS variant. The detault drawableSize for a CAMetalLayer is its bounds x its scale. So it is sufficient to set the *layer's* scale to the desired value.
Sam Lantinga e3cc5b2c 2018-01-03T10:03:25 Updated copyright for 2018
Sam Lantinga 14452e95 2017-12-04T20:21:52 Fixed typos (thanks Martin!)
Sam Lantinga 569c222c 2017-09-09T11:04:35 Updated documentation so it's clear you should use SDL_SetWindowDisplayMode() to change the size of fullscreen windows.
Ryan C. Gordon a12989f9 2017-09-03T13:20:33 vulkan: Changed SDL_WINDOW_VULKAN value to match Tizen's fork.
Ryan C. Gordon 25e3a1ec 2017-08-27T22:15:57 vulkan: Initial Vulkan support! This work was done by Jacob Lifshay and Mark Callow; I'm just merging it into revision control.
Ryan C. Gordon d8fc70ea 2017-08-24T21:30:53 opengl: add support for GL_KHR_no_error. This is completely untested! Fixes Bugzilla #3721.
Ryan C. Gordon 01e0d8fc 2017-08-19T15:02:03 opengl: Add support for [GLX|WGL]_ARB_create_context_robustness. This patch was originally written by Marc Di Luzio for glX and enhanced by Maximilian Malek for WGL, etc. Thanks to both of you! Fixes Bugzilla #3643. Fixes Bugzilla #3735.
Sam Lantinga e10a98d2 2017-07-31T12:57:15 Fixed bug 3720 - SDL_GL_GetAttribute doesn't check for initialized video driver Simon Hug SDL_GL_GetAttribute doesn't check if a video driver has been initialized and will access the SDL_VideoDevice pointer, which is NULL at that point. I think all of the attributes require an initialized driver, so a simple NULL check should fix it. Patch is attached.
Philipp Wiesemann cbcc256f 2017-06-04T23:15:39 Fixed comments in headers for doxygen output.
Sam Lantinga ccf0566c 2017-05-16T06:30:39 SDL - add SDL_WINDOW_VULKAN and make Android_CreateWindow only create an EGLSurface when SDL_WINDOW_VULKAN is not present. This makes it so the ANativeWindow* can be used with vkCreateAndroidSurfaceKHR, otherwise it will fail because having both an EGLSurface and VkSurfaceKHR attached to a window is not allowed according to the Vulkan spec: "In particular, only one VkSurfaceKHR can exist at a time for a given window. Similarly, a native window cannot be used by both a VkSurfaceKHR and EGLSurface simultaneously" CR: SamL
Sam Lantinga 45b774e3 2017-01-01T18:33:28 Updated copyright for 2017
Sam Lantinga 8414c3d4 2016-12-11T12:01:44 Fixed ABI, don't change the return type of SDL_GL_SwapWindow()
Sam Lantinga 524bf3c2 2016-12-09T01:47:43 Fixed bug 3513 - SDL_GL_SwapWindow does not return error status Return an error code from SDL_GL_SwapWindow(), like the other SDL APIs.
Sam Lantinga 36156335 2016-11-20T21:34:54 Renaming of guard header names to quiet -Wreserved-id-macro Patch contributed by Sylvain
Sam Lantinga 614cb35a 2016-10-01T13:35:36 Fixed bug 3165 - define numbers don't match types in Swift C.W. Betts Swift is very strict with types, so much that those of different signedness/size must be cast. Most of the defines are imported as 32-bit signed integers, while the corresponding field in a struct is a 32-bit unsigned integer. Appending a "u" would cause the defined types to be imported as 32-bit unsigned integers.
Ryan C. Gordon 4f4c4b62 2016-09-29T22:52:41 Added SDL_SetWindowResizable(). (thanks, Ethan!)
Philipp Wiesemann f6f9350a 2016-08-17T21:05:00 Added link in header comment.
Philipp Wiesemann 24bc00a8 2016-08-03T22:39:44 Fixed two old identifiers in header comments.
Philipp Wiesemann 6255c858 2016-05-20T22:18:15 Updated documentation of SDL_IsScreenSaverEnabled(). The screensaver is deactivated by default since SDL 2.0.2.
Philipp Wiesemann cfe3f261 2016-05-11T21:09:45 Updated documentation of SDL_CreateWindow() and SDL_CreateWindowFrom().
Philipp Wiesemann 1a26c0c8 2016-01-06T22:38:35 Fixed doxygen warnings.
Ryan C. Gordon 3bdaf4c6 2016-01-05T02:46:10 Added SDL_SetWindowOpacity() and SDL_GetWindowOpacity(). This is currently implemented for X11, Cocoa, Windows, and DirectFB. This patch is based on work in Unreal Engine 4's fork of SDL, compliments of Epic Games.
Ryan C. Gordon 5696e88e 2016-01-05T02:29:06 Added SDL_GetWindowBordersSize(). This is currently only implemented for X11. This patch is based on work in Unreal Engine 4's fork of SDL, compliments of Epic Games.
Ryan C. Gordon e497e465 2016-01-05T02:28:56 Added SDL_SetWindowInputFocus(). This is currently only implemented for X11. This patch is based on work in Unreal Engine 4's fork of SDL, compliments of Epic Games.
Ryan C. Gordon dc532c70 2016-01-05T02:27:50 Added SDL_WINDOWEVENT_TAKE_FOCUS. This is for corner cases where a multi-window app is activated and wants to make a decision about where focus should go. This patch came from Unreal Engine 4's fork of SDL, compliments of Epic Games.
Ryan C. Gordon f2defe5e 2016-01-05T01:30:40 Added special window type flags. Specifically: always on top, skip taskbar, tooltip, utility, and popup menu. This is currently only implemented for X11. This patch is based on work in Unreal Engine 4's fork of SDL, compliments of Epic Games.
Ryan C. Gordon c3114975 2016-01-04T23:52:40 Added SDL_GetDisplayUsableBounds().
Sam Lantinga 42065e78 2016-01-02T10:10:34 Updated copyright to 2016
Philipp Wiesemann 4a93dae4 2016-01-01T17:39:55 Added brackets to function names in header comments so doxygen links them.
Alex Szpakowski 4aae0290 2015-12-31T21:16:43 Updated some header comments and iOS documentation to better clarify high-dpi / retina support and screen-coordinate sizes versus pixel sizes.
Alfred Reynolds 61c74150 2015-07-29T17:18:56 Add SDL_GetDisplayDPI routine and implement for Windows.
Philipp Wiesemann 0e45984f 2015-06-21T17:33:46 Fixed crash if initialization of EGL failed but was tried again later. The internal function SDL_EGL_LoadLibrary() did not delete and remove a mostly uninitialized data structure if loading the library first failed. A later try to use EGL then skipped initialization and assumed it was previously successful because the data structure now already existed. This led to at least one crash in the internal function SDL_EGL_ChooseConfig() because a NULL pointer was dereferenced to make a call to eglBindAPI().
Sam Lantinga 2c4a6ea0 2015-05-26T06:27:46 Updated the copyright year to 2015
Ryan C. Gordon aa4952fd 2015-04-21T10:10:59 Added SDL_WINDOWEVENT_HIT_TEST. This lets windows know when they are dropping a mouse event because their hit test reported something other than SDL_HITTEST_NORMAL. It lets them know exactly where in the event queue this happened. This patch is based on work in Unreal Engine 4's fork of SDL, compliments of Epic Games.
Ryan C. Gordon e0e04542 2015-04-21T09:46:48 Added a few FIXMEs.
Ryan C. Gordon d4aedf99 2015-04-21T09:45:58 Added SDL_SetWindowModalFor(). This is currently only implemented for X11. This patch is based on work in Unreal Engine 4's fork of SDL, compliments of Epic Games.
Ryan C. Gordon b72938c8 2015-04-20T12:22:44 Windows: Always set the system timer resolution to 1ms by default. An existing hint lets apps that don't need the timer resolution changed avoid this, to save battery, etc, but this fixes several problems in timing, audio callbacks not firing fast enough, etc. Fixes Bugzilla #2944.
Alex Szpakowski fe6c797c 2015-04-10T23:30:31 Fixed an iOS view orientation issue when SDL_GL_CreateContext or SDL_CreateRenderer is called.
Ryan C. Gordon a0e878aa 2015-03-28T00:48:03 Minor input grab clarifications. Clarify that grabbing the mouse only works with one window at a time; this was always true at the system level, though SDL could previously get confused by multiple simultaneous grabs, so now we explicitly break any existing grab before starting a new one and document it as such. Also track the window that is currently grabbed, and provide an API to query for that window. This makes it easy to automate mouse ungrabbing at breakpoints with gdb7's scripting, since the scripts can now know which window to ungrab. In 2.1, we should probably change this API to SDL_GrabInput(win) and SDL_UngrabInput(void), or something.
Marc Di Luzio f5d96416 2015-03-06T16:03:40 Allow setting of GL_CONTEXT_RELEASE_BEHAVIOR when creating the GL context when GLX_ARB_context_flush_control is available. This extension allows the user to specify whether a full flush is performed when making a context not current. The only way to set this currently is at context creation, so this patch provides that functionality. Defualt behaviour is set at FLUSH, as per the spec. This patch does not contain the changes to WGL, appleGL or other platforms as I do not have access to GL 4.5 hardware on those platforms. Full details on the use of KHR_context_flush_control can be found here: https://www.opengl.org/registry/specs/KHR/context_flush_control.txt
Edward Rudd b88ca1b4 2015-02-10T16:28:56 the last parameter of XChangeProperty is the number of elements.. and when the element format is 32.. the element is "long" so we have 5 long elements here. Yes this seems confusing as on mac+linux Long is either 32 or 64bits depending on the architecture, but this is how the X11 protocol is defined. Thus 5 is the correct value for the nelts here. Not 5 or 10 depending on the architecture. More info on the confusion https://bugs.freedesktop.org/show_bug.cgi?id=16802
Philipp Wiesemann b48e54aa 2015-01-26T22:00:29 Fixed bug 2802 - [patch] Fix android build compiling in wrong filesystem implementation Jonas Kulla The configure script didn't differentiate between Linux and Android, unconditionally compiling in the unix implementation of SDL_sysfilesystem.c. I'm probably one of the very few people building SDL for android using classic configure + standalone toolchain, so this has gone undetected all along.
David Ludwig 70438be2 2014-12-03T10:55:23 WinRT: fixed bug whereby SDL would override an app's default orientation WinRT apps can set a default, preferred orientation via a .appxmanifest file. SDL was overriding this on app startup, and making the app use all possible orientations (landscape and portrait). Thanks to Eric Wing for the heads up on this!
Philipp Wiesemann 9c398852 2014-11-22T22:20:40 Corrected header file documentation comment.
Pierre-Loup A. Griffais 24c86b55 2014-09-11T19:24:42 [X11] Reconcile logical keyboard state with physical state on FocusIn since the window system doesn't do it for us like other platforms. This prevents sticky keys and missed keys when going in and out of focus, for example Alt would appear to stick if switching away from an SDL app with Alt-Tab and had to be pressed again. CR: Sam
Ionut Leonte 2d38a71a 2014-06-05T00:45:16 Added SDL_HITTEST_RESIZE_*, and implemented for X11.
Ryan C. Gordon 661548c8 2014-05-29T13:38:39 Tweaked hit-testing documentation.
Ryan C. Gordon 98c03f39 2014-05-28T01:22:47 Changed drag area API to a hit-testing API. There were several good arguments for this: it's how Windows works with WM_NCHITTEST, SDL doesn't need to manage a list of rects, it allows more control over the regions (how do you use rects to cleanly surround a circular button?), the callback can be more optimized than a iterating a list of rects, and you don't have to send an updated list of rects whenever the window resizes or layout changes.
Ryan C. Gordon 3cbc83ef 2014-05-27T01:27:42 First shot at SDL_SetWindowDragAreas(). Only Cocoa implemented right now.
Ryan C. Gordon b7d2c0e9 2014-05-24T01:30:37 Implemented SDL_CaptureMouse().
Philipp Wiesemann f5c77149 2014-05-18T21:05:39 Fixed typo in header comment.
David Ludwig 3dcb451f 2014-04-09T21:29:19 Added a README file regarding WinRT support To note, this file is currently formatted with CRLF line endings, rather than LF, to allow the file to be viewed with Notepad.
Sam Lantinga 58edac3e 2014-02-02T00:53:27 Fixed bug 2374 - Update copyright for 2014... Is it that time already??
J?rgen P. Tjern? 338bf9cc 2014-01-29T18:38:13 Add SDL_GL_ResetAttributes.
Gabriel Jacobo f848adff 2013-11-29T10:06:08 Improve Android pause/resume behavior.
Ryan C. Gordon 0e699eb5 2013-10-20T21:18:05 Added SDL_GL_FRAMEBUFFER_SRGB_CAPABLE (thanks, David!). Fixes Bugzilla #1985.
Sam Lantinga 058aba08 2013-09-30T21:57:03 Fixed bug 2119 - compiler warnings (-pedantic) SDL_video.h:111:42
Philipp Wiesemann b9a22308 2013-09-28T12:55:32 Fixed doxygen warning.
Edward Rudd 869a7076 2013-09-20T13:43:00 add in High DPI support (aka Retina) - based on J?rgen's patch with a few bug fixes
Gabriel Jacobo 1e49b1ed 2013-08-21T09:47:10 OCD fixes: Adds a space after /* (glory to regular expressions!)
Gabriel Jacobo 695344d1 2013-08-21T09:43:09 OCD fixes: Adds a space before */
Gabriel Jacobo 0eeb76d8 2013-08-19T16:29:46 Fixes bug #2037, common EGL code for Android and X11
Gabriel Jacobo dad42067 2013-08-12T11:13:50 Fixes #2022, do not resume on Android when surfaceChanged If the app is in landscape mode and the user presses the power button, a pause is followed immediately by a surfaceChanged event because the lock screen is shown in portrait mode. This triggers a "false" resume. So, we just pause and resume following the onWindowFocusChanged events. Also, wait for SDL_APP_WILLENTERBACKGROUND and SDL_APP_DIDENTERBACKGROUND before blocking the event pump.
Sam Lantinga 1ad936eb 2013-08-11T19:56:43 Fixed bug 2027 - Full-screen appears to be broken - hang in SDL_DestroyWindow() Rainer Deyke I'm running Linux Mint 15 with the Cinnamon window manager. SDL_DestroyWindow consistently locks up for me when the window if fullscreen.