src/video


Log

Author Commit Date CI Message
Ryan C. Gordon 17a8d293 2014-03-26T16:19:52 Changed a C++ single-line comment to /* */ style.
Pierre-Loup A. Griffais 833cfe53 2014-03-26T12:54:51 Remove the RaiseWindow call from OnWindowRestored for now. It seems like a net improvement in all the scenarios Sam and I could think of, and looking at hg history it was added for fullscreen window management specifically. Much of that code has changed since then, but maybe it needs to stay there for that and simply be moved to a fullscreen condition check. It would solve this issue: https://bugzilla.libsdl.org/show_bug.cgi?id=2439 As well as cases where on SteamOS, we hide/show specific Steam overlay windows while expecting them to stay in the background, since changing the window stacking order really angers the NVIDIA driver. CR: Sam.
Brandon Schaefer 8938c2b5 2014-03-25T15:24:43 Ignore unused mir event functions, need headers in Ubuntu 14.04 to use them.
Brandon Schaefer 2298ed17 2014-03-25T15:18:18 Remove two unused variables, causing compiler warnings.
Gabriel Jacobo 1f92c9dc 2014-03-24T11:04:42 Emit SDL_RENDER_DEVICE_RESET on Android when the GLES context is recreated
Ryan C. Gordon dd81dad1 2014-03-24T07:12:26 Added an assert to help static analyzer.
David Ludwig 119dff55 2014-03-23T22:07:01 WinRT: Implemented SDL_ShowMessageBox for Windows 8.x/RT hosts This change does not include message box support for Windows Phone 8, which does not offer the same message box APIs that Windows 8.x/RT does.
Sam Lantinga c3d10376 2014-03-23T09:44:04 Better keyboard detection when some of the keys are remapped, thanks to Lewis Wall
David Ludwig 823bf721 2014-03-22T21:08:05 WinRT globals cleanup: Removed WINRT_GlobalSDLVideoDevice
David Ludwig b51a3206 2014-03-22T20:48:18 WinRT: Got OpenGL ES 2 working with the latest version of ANGLE/WinRT. SDL/WinRT did have support for OpenGL ES 2 via an older version of ANGLE/WinRT, however its API changed a few months ago, and SDL/WinRT would crash when trying to use it. It would also occasionally crash when using the older version. This changeset should make SDL/WinRT work with the latest version, as available via MS Open Tech's git repository of it at https://github.com/msopentech/angle Older versions of ANGLE/WinRT (from either https://github.com/stammen/angleproject or https://bitbucket.org/DavidLudwig/angleproject) will need to be updated to MS Open Tech's latest version.
Ryan C. Gordon cc529398 2014-03-21T10:40:15 Static analysis fix: more cleanups of unused variables, etc, in blitters.
Ryan C. Gordon 7bf36abf 2014-03-21T00:57:43 Static analysis fix: more dead stores.
Ryan C. Gordon e177b1cc 2014-03-20T17:55:24 Static analysis fix: clean up unused variables and dead stores in blitters.
Ryan C. Gordon 3aae0ed2 2014-03-20T16:54:20 Static analysis fix: uninitialized data. (This is Clang not knowing that SDL_SetError() always returns -1.)
Ryan C. Gordon d7a253b5 2014-03-20T16:25:30 Static analysis fix: uninitialized data. (Clang doesn't know that "_this" was already checked for NULLness elsewhere.)
Ryan C. Gordon a25bd63c 2014-03-20T16:05:57 Static analysis fix: leaking Objective-C object.
Ryan C. Gordon 84b919a2 2014-03-20T11:22:57 Static analysis fix: dereference of a NULL pointer.
Ryan C. Gordon b99a6253 2014-03-20T11:14:02 Static analysis fix: let clang know _this->displays isn't NULL.
Ryan C. Gordon 1a2a3e9c 2014-03-20T10:04:23 Static analysis fix: Fixed leaking Objective-C object.
Ryan C. Gordon bcc2ed09 2014-03-19T23:19:34 Static analysis fix: bad release. (object is already init'd at this point, so -[obj init] destroys existing reference count.)
Ryan C. Gordon faaaf6c5 2014-03-19T16:52:26 Static analysis fix: "Value stored to 'p' is never read"
Sam Lantinga 56b40ce0 2014-03-15T16:32:45 Fixed bug 2450 - Crosscompiling for Win32 with MinGW fails due to WM_UNICHAR undeclared
Sam Lantinga 9245c930 2014-03-15T16:27:06 Only show the window if it's supposed to be shown.
Ryan C. Gordon c663d731 2014-03-15T15:35:15 Mac: Make sure window is still showing when we exit a fullscreen space.
David Ludwig f25ee50b 2014-03-15T14:54:23 Fixed broken rotation detection routines on WinRT Rotation detection and handling should now work across all, publicly-released, WinRT-based platforms (Windows 8.0, Windows 8.1, and Windows Phone 8.0).
Sam Lantinga 26e8e387 2014-03-14T18:06:09 Fixed Mac OS X window level when leaving fullscreen mode
Sam Lantinga f9a58968 2014-03-13T21:21:26 Added missing copyright notices
Sam Lantinga ed02f61d 2014-03-13T00:40:08 Fixed the copyright date on files contributed by David Ludwig
Sam Lantinga 641ba099 2014-03-12T07:26:07 Fixed compiling Windows RT code on Visual Studio 2013
Sam Lantinga b677d1d8 2014-03-10T19:59:06 Fixed Mac OS X OpenGL context creation to match other backends, where we only care about the actual version we request if it's 3.0 or newer or a special profile context. Eventually we'll probably move the version checking to higher level code and report the actual version of context that got created, but to avoid breakage we'll leave it like this for now.
Sam Lantinga 28398109 2014-03-10T18:45:07 Fixed regression causing the renderer to recreate its window since it's not getting an OpenGL 2.1 context anymore.
David Ludwig e8eb1427 2014-03-10T21:21:35 build fixes for most WinRT-related files Still TODO: getting the D3D11 renderer back up and running in VC 2012.
Ryan C. Gordon 89648a9a 2014-03-10T00:01:14 Drop the default requested OpenGL version to 1.2. Fixes default context creation on Mac OS X <= 10.6.
Sam Lantinga 1367bf87 2014-03-09T11:36:47 Integrated David Ludwig's support for Windows RT
Sam Lantinga 05c23063 2014-03-09T11:06:11 Fixed line endings on WinRT source code
Ryan C. Gordon db568d69 2014-03-09T11:52:52 Patched to compile with MingW64 on case-sensitive systems (thanks, Martin!). Fixes Bugzilla #2440.
Ryan C. Gordon 5755fa4b 2014-03-08T15:34:54 Patched to compile on C89 compilers.
Ryan C. Gordon 9e67444a 2014-03-03T21:25:16 Mac: Added a hint to opt-out of new Spaces code.
Ryan C. Gordon 3889d478 2014-03-02T22:55:12 Removed unused variable.
Ryan C. Gordon 0e5cc8df 2014-03-02T22:51:31 Mac: Don't lose the menu/dock when switching back to a resizable window Space.
Ryan C. Gordon 86be8321 2014-03-02T22:16:49 Mac: only programmatically create Spaces if we're FULLSCREEN_DESKTOP. (coming back from fullscreen in any state is okay).
Ryan C. Gordon 460f97ff 2014-03-02T16:36:40 A bunch of fixes for the new Spaces code.
Sam Lantinga da324233 2014-03-02T13:06:51 Fixed dictionary initialization
Sam Lantinga 0f9bb0cd 2014-03-02T12:58:00 Updated to build on Mac OS X 10.7 with Xcode 4.6
Ryan C. Gordon 5eccbac4 2014-03-02T15:35:24 Mac: Manage menubar and dock as FULLSCREEN_DESKTOP windows become/resign key.
Bastien Nocera 4ca76b3e 2014-03-02T14:59:06 Add support for the freedesktop.org Idle Inhibition specification, as per: http://people.freedesktop.org/~hadess/idle-inhibition-spec/ This makes screensaver inhibition work with GNOME 3 and other desktop environments that implement the specification. https://bugzilla.libsdl.org/show_bug.cgi?id=2169
Sam Lantinga c2c08f68 2014-03-02T11:10:00 Backed out changeset 9357a2ca3473
Sam Lantinga 2cf453dd 2014-03-02T11:08:05 Make sure we return version 0 if XInput detection fails
Ryan C. Gordon 51faf449 2014-03-02T12:45:51 Reworked fullscreen policy on Mac OS X. - SDL_WINDOW_FULLSCREEN works as always (change resolution, lock to window). - SDL_WINDOW_FULLSCREEN_DESKTOP now puts the window in its own Space, and hides the menu bar, but you can slide between Spaces and Command-Tab between apps without the window minimizing, etc. - SDL_WINDOW_RESIZABLE windows will get the new 10.7+ "toggle fullscreen" window decoration and menubar item. As far as the app is concerned, this is no different than resizing a window, but it gives the end-user more power. - The hint for putting fullscreen windows into the Spaces system is gone, since Spaces can't enforce the requested resolution. It's a perfect match for FULLSCREEN_DESKTOP, though, so this is all automated now.
Ryan C. Gordon afc74d98 2014-03-02T02:00:40 Better attempt to detect available X11 XInput2 features. Fixes Bugzilla #2306.
Ryan C. Gordon bafa4c7a 2014-03-01T21:33:48 Dynamically load glGetString(), to avoid direct dependency on OpenGL.
Ryan C. Gordon 99583397 2014-03-01T20:46:45 Mac OS X: Make OpenGL context selection more robust, avoid software fallback. Fixes Bugzilla #2197.
David Ludwig 6687ece1 2014-03-01T16:37:30 WinRT: cleaned up some hard-to-read SDL_DisplayMode management code
David Ludwig f4a5a0fa 2014-03-01T16:08:16 WinRT: fixed a crash in SDL_Quit SDL was expected that each SDL_DisplayMode had a driverdata field that was SDL_malloc'ed, and was calling SDL_free on them. This change moves WinRT's driverdata content into a SDL_malloc'ed field.
Sam Lantinga 54ba385b 2014-03-01T11:42:12 Fixed compiler warning
Sam Lantinga 86655b64 2014-03-01T11:40:41 Fixed compiler warning
Sam Lantinga c916f388 2014-03-01T09:59:06 Fixed bug 2368 - Security Software is blocking RegisterRawInputDevices() Yamagi A customer of mine had the strange problem, that SDL_SetRelativeMouseMode() was failing for him on Windows 7. Luckily he was willing to provide some debug informations. We could track this problem down to RegisterRawInputDevices() failing due to security software running on his system (Norton Internet Security to be precise, but there are reports of similar problems with other products. For example [1]). Working around this issue with SDL_WarpMouseInWindow() is easy, and while I don't think that SDL2 can provide an internal workaround it would be really nice and helpfull if this could be documentated somewhere. 1: http://forums.codeguru.com/showthread.php?498374-How-to-run-a-very-long-SQL-statement
Sam Lantinga e663b4eb 2014-03-01T09:50:52 Fixed bug 2423 - timeBeginPeriod & timeEndPeriod mismatch Coriiander In src\timer\windows\SDL_systimer.c there is an error with regards to timeBeginPeriod and timeEndPeriod. These functions typically get called when no high resolution timer is available, and GetTickCount is not used. According to MSDN (link: http://msdn.microsoft.com/en-us/library/windows/desktop/dd757624(v=vs.85).aspx), for every call to timeBeginPeriod a subsequent call to timeEndPeriod is required. While SDL is currently doing this, it fails to call timeEndPeriod when cleaning up/shutting down SDL. Please note that these functions affect things on a system level. Failing to call timeEndPeriod, disables applications for using WINMM-timers after usage&shutdown of SDL, as effectively they the mechanism is now broken. Solution: Ensure this code gets called when shutting down the timer subsystem: #ifndef USE_GETTICKCOUNT if (!hires_timer_available) { timeSetPeriod(0); } #endif
Sam Lantinga e56bbe3f 2014-02-28T14:23:41 Added a hint to enable the screensaver by default
Ryan C. Gordon ac32352f 2014-02-27T22:06:41 Disable the screensaver by default. Fixes Bugzilla #2218.
J?rgen P. Tjern? 0d5957df 2014-02-26T16:27:03 Mac: Forgot return value in last commit.
J?rgen P. Tjern? dd94c5fa 2014-02-26T16:10:52 Mac: Don't disassociate cursor if window is moving / doesn't have focus. Bug: https://bugzilla.libsdl.org/show_bug.cgi?id=2396
J?rgen P. Tjern? 4850d259 2014-02-26T11:35:02 Mac: Redo cursor warp handling. This fixes bugs related to getting unnaturally large xrel/yrel for SDL_MOUSEMOTION after warps and enabling / disabling relative mode. Bug: https://bugzilla.libsdl.org/show_bug.cgi?id=1836
J?rgen P. Tjern? 52a63e82 2014-02-25T17:27:41 Mac: Improve moving relative mode windows. This makes it possible to move windows by their title bar, even if they're in relative mode, if you click the title bar when the window does not have focus. Bug: https://bugzilla.libsdl.org/show_bug.cgi?id=2396
J?rgen P. Tjern? 95f7e242 2014-02-25T15:28:12 Mac: Immediately update current OpenGL context's shape. Previously we were postponing our -[NSOpenGLContext update] call to the next SDL_GL_SwapWindow, even if the context was current on the current thread. This changes it so that we will do the update immediately if it's the current context. If you're rendering on another thread, you need to call SDL_GL_SwapWindow once after a resize event to ensure your drawable will produce non-garbage data. Bug: https://bugzilla.libsdl.org/show_bug.cgi?id=2339
Sam Lantinga b420ad0e 2014-02-24T23:09:35 Don't warp the mouse while we're doing a modal interaction
Sam Lantinga 2a6213ad 2014-02-24T22:49:30 Make sure we don't clip the cursor while clicking on the window title bar
Sam Lantinga 973d890b 2014-02-24T22:37:58 Fixed relative mouse mode with multiple windows. The window cursor clipping will be taken care of when SDL_UpdateWindowGrab() is called.
Sam Lantinga 54debf84 2014-02-24T22:36:24 Added a bunch of missing windows messages
J?rgen P. Tjern? d6b1218b 2014-02-24T16:42:08 Mac: Fix inconsistent repeat of SDL_TEXTINPUT events on 10.7+ Due to the new "tap and hold" IME in Mountain Lion and above, we were getting inconsistent repeat of SDL_TEXTINPUT events. Disabling that functionality (since you can't see the popover anyway) solves this. Bug: https://bugzilla.libsdl.org/show_bug.cgi?id=2387
Sam Lantinga 6bb2f2ef 2014-02-22T17:55:58 Fixed bug 2347 - On OSX, an SDL app prevents system shutdown. Tim McDaniel On OSX, an SDL app forces a system shutdown to be cancelled. This happens because [SDLAppDelegate applicationShouldTerminate] returns NSTerminateCancel. A better approach is to subclass NSApplication and override terminate to do nothing except call SDL_SendQuit. In response to a system shutdown notification, this allows the normal SDL Quit event processing to occur, and if the app then terminates, system shutdown occurs normally. Please see the attached patch, based on SDL 2.0.1.
Sam Lantinga b80f4f9e 2014-02-22T17:39:35 Don't fail initialization if the helper window class already exists.
Sam Lantinga a5f52ac5 2014-02-22T17:32:18 Fixed bug 2395 - OSX: App name in the menu bar is not localized. Tim McDaniel On OSX, the app name in the menu bar is not localized. This can be fixed using the following implementation for GetApplicationName in SDL_cocoaevents.m: static NSString * GetApplicationName(void) { NSDictionary *dict; NSString *appName = 0; appName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleDisplayName"]; if (!appName) appName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleName"]; if (![appName length]) appName = [[NSProcessInfo processInfo] processName]; return appName; }
Sam Lantinga f7de4ae1 2014-02-22T15:23:09 Fixed bug 2407 - Support for OpenGL ES 3 contexts on iOS Alex Szpakowski Currently the UIKit/EAGL backend for SDL's OpenGL context creation API doesn't support OpenGL ES 3, despite iOS 7+ being capable (on devices with the necessary hardware.) I have attached a patch to add support. It's also slightly more future-proof, so eventual OpenGL ES 4+ capability on iOS should hopefully work without requiring changes to SDL's UIKit/EAGL backend.
Sam Lantinga af0ab490 2014-02-22T14:57:12 Fixed bug 2346 - Mac: mousewheel events have flipped horizontal scroll values Alex Szpakowski On my Mac OS X system (10.9.1), the SDL_MOUSEWHEEL event reports negative X values when my trackpad scrolls to the right, and positive X values when my trackpad scrolls to the left. This is backwards from what I'd expect, and I don't think it matches the Windows wheel events. The vertical scroll values are what I'd expect though, and are consistent what gets reported on Windows (positive Y for scrolling up, negative Y for scrolling down.) This is with "scroll direction: natural" disabled in the OS X trackpad settings (i.e. my scroll direction in non-SDL OS X programs matches what happens in Windows and Linux.) I also tested with the horizontal scroll on a real mouse (Logitech G500 without custom drivers), and the horizontal scroll values in SDL are still flipped. I "solved" the issue for myself by changing this line in the Cocoa_HandleMouseWheel function: float x = [event deltaX]; to this: float x = -[event deltaX]; I believe it should work fine with that change - I found something similar in another codebase while looking online for my issue - but I haven't tested on anything below Mac OS 10.8.
Gabriel Jacobo abe2ac2c 2014-02-21T08:37:57 Fixes #2326, clean up the X11 backend a bit
Sam Lantinga 5c5770ad 2014-02-14T11:39:58 Make sure we don't stay in the windows event loop forever if there are lots of events coming in quickly.
Sam Lantinga c52c9105 2014-02-13T11:05:30 Added SDL_DXGIGetOutputInfo which returns the adapter and output indices that are used to create DX10 and DX11 devices and swap chains on a particular display. CR: SamL
Sam Lantinga e34da680 2014-02-13T11:05:28 Fixed lost mouse button when in relative mouse warp mode and you click on the title bar, entering a modal move/resize loop. Testing: * Set the SDL_HINT_MOUSE_RELATIVE_MODE_WARP hint true, run testsprite2, press Ctrl-R to enter relative mode, alt tab away from the window, then click on the title bar of the window. Didn't get the mouse button release before, and we do now. CR: Yahn + Alfred
Sam Lantinga a396841f 2014-02-10T10:02:18 Fixed bug where a window created fullscreen and hidden would get activated and "shown" but never actually be visible. This is the case with the Steam In-Home Streaming client.
Brandon Schaefer 25fcc195 2014-02-04T12:28:35 * Remove android based workaround, it is handled in SDL_EGL_GetProcAddress.
Ryan C. Gordon bd01a9c9 2014-02-03T11:53:21 Unload Wayland libs if memory allocation fails during init.
Ryan C. Gordon 89fd0faf 2014-02-03T11:52:54 Hooked up dynamic loading for Mir.
Ryan C. Gordon 69d85ff5 2014-02-03T11:01:32 Bumped copyright date on Mir code.
Ryan C. Gordon 435b80b9 2014-02-02T23:55:51 Disable some minor things that need newer Mir dev headers. These headers apparently aren't default in Ubuntu 13.10 yet.
Ryan C. Gordon 8674b7ae 2014-02-02T23:54:10 Cleaned up headers and footers on Mir code.
Ryan C. Gordon 6bc29770 2014-02-02T23:53:48 Added some SysWM bits for Mir.
Ryan C. Gordon 19f8c622 2014-02-02T23:41:46 Added Mir video target (thanks, Brandon!).
Philipp Wiesemann e8f5e010 2014-02-02T20:58:46 Fixed including SDL_internal.h twice for DirectFB.
Sam Lantinga 58edac3e 2014-02-02T00:53:27 Fixed bug 2374 - Update copyright for 2014... Is it that time already??
Sam Lantinga d76c2cc1 2014-01-30T12:30:40 Add a new hint SDL_HINT_VIDEO_WINDOW_SHARE_PIXEL_FORMAT that allows SDL_CreateWindowFrom() to set the pixel format of another SDL_Window (and also will set the SDL_WINDOW_OPENGL flag on the window created with SDL_CreateWindowFrom()). The reasoning behind this change is that source2 in -tools mode has a single OpenGL context that is used with multiple different windows. Some of those windows are created outside the engine (i.e. with Qt) and therefore we need to use SDL_CreateWindowFrom() to get an SDL_Window for those. The requirement for sharing an OpenGL context across multiple different windows is that each window has the same pixel format. To facilitate this, I now set SDL_HINT_VIDEO_WINDOW_SHARE_PIXEL_FORMAT for the main window before calling SDL_CreateWindowFrom(). When I do this, SDL_CreateWindowFrom() will: 1. Set the pixel format of the returned window to the same pixel format as this SDL_Window passed in with the hint 2. The flag SDL_WINDOW_OPENGL will be set on the new window so it can be used for OpenGL rendering. I only currently implemented this for Win32/WGL so implementing it for other platforms (i.e. X11) remains a TODO. CR: SamL Some pseudocode that shows how this is used in Source2: HWND hExternalHwnd; // HWND that was established outside of SDL // Create main window (happens inside platwindow.cpp) SDL_Window *mainWindow = SDL_CreateWindow( , SDL_WINDOW_OPENGL .. ); // Create GL context, happens inside rendersystemgl SDL_GLContext onlyContext = SDL_GL_CreateContext( mainWindow ); // Now I need to create another window from hEternalHwnd for my swap chain that will have the same pixel format as mainWindow, so set the hint SDL_SetHint( SDL_HINT_VIDEO_WINDOW_SHARE_PIXEL_FORMAT, CFmtStr( %p, mainWindow) ); // Create the secondary window. This returned window will have SDL_WINDOW_OPENGL set and share a pixel format with mainWindow from the hint SDL_Window *secondaryWindow = SDL_CreateWindowFrom( hExternalHwnd ); // To render to the main window: SDL_GL_MakeCurrent( mainWindow, onlyContext ); // Do some rendering to main window // To render to the secondary window: SDL_GLMakeCurrent( secondaryWindow, onlyContext ); // Do some rendering to secondary window
Sam Lantinga dbd4a917 2014-01-30T12:27:24 Document Michael's changes adding TranslateMessage() back to the SDL message loop.
Sam Lantinga 5c58bd68 2014-01-30T12:27:00 * Added TranslateMessage call to SDL default message pump - was causing problems in S2 tools mode apps that used Qt. Qt relies on the WM_CHAR message generated by TranslateMessage and keyboard input was showing up in the UI as mixed-case. (Depending on which message pump got a given message - both SDL and Qt pump messages for the entire process.) Sam will review and possibly tweak this change before propagating to public SDL, but I'm checking this version in so I can integrate into S2 and fix the issue there.
J?rgen P. Tjern? 338bf9cc 2014-01-29T18:38:13 Add SDL_GL_ResetAttributes.
J?rgen P. Tjern? 366b1727 2014-01-29T18:37:23 Mac: [NSApp keyWindow] is not valid in windowDidBecomeKey: This fixes weird behavior on Mac where our first responder reverts to the window itself, rather than the SDLTranslatorResponder, after the window has lost focus once. This causes Escape to call cancelOperation: on the NSWindow, which by default removes our fullscreen-ness. When someone has turned off SDL_TEXTINPUT we should probably set another initial responder that handles the Escape behavior, so that SDL_TEXTINPUT doesn't change fullscreen behavior (and possibly other behavior) like it does now.
Gabriel Jacobo f52d7f5e 2014-01-28T11:39:37 [Wayland] Fixes segfault when mouse enters window
J?rgen P. Tjern? 2efa2dc2 2014-01-27T13:43:04 X11: Don't redraw dialog box when mouse moves. This fixes bug #2343. (https://bugzilla.libsdl.org/show_bug.cgi?id=2343) Thanks to Melker Narikka for the patch.
Gabriel Jacobo cf9828a2 2014-01-20T20:25:43 Move Wayland driver above dummy, check for driver availability before creation
Ryan C. Gordon 2ddd0c58 2014-01-20T12:53:44 Patched to compile if Wayland is disabled via SDL_config.h (thanks, Martin!). Fixes Bugzilla #2351.
Gabriel Jacobo 129640af 2014-01-16T15:02:41 Fixes prototype declaration for wl_proxy_marshal_constructor [Wayland 1.4]