Log

Author Commit Date CI Message
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 eb5eb046 2014-02-22T15:34:31 Fixed bug 2298 - undefined reference to `IID_IUnknown' on cygwin Brian Minton When building static or shared libraries on cygwin 1.7.25 on Windows 7 (32-bit), I get the following link errors: build/.libs/SDL_windowskeyboard.o: In function `UIElementSink_QueryInterface@12': /home/c-bminton/src/SDL/src/video/windows/SDL_windowskeyboard.c:995: undefined reference to `IID_IUnknown' build/.libs/SDL_windowskeyboard.o: In function `IPPASink_QueryInterface@12': /home/c-bminton/src/SDL/src/video/windows/SDL_windowskeyboard.c:1101: undefined reference to `IID_IUnknown' collect2: error: ld returned 1 exit status Makefile:126: recipe for target 'build/libSDL2.la' failed make: *** [build/libSDL2.la] Error 1 -- The libuuid from e2fsprogs is completely unrelated to the w32api UUID.DLL implib. FWIW, any *NIX software that I've seen obviously wants the e2fsprogs version, but if libuuid-devel is installed (in /usr/lib) then you can't link against the w32api implib with a simple -luuid.
Sam Lantinga 5512eac6 2014-02-22T15:27:11 Fixed bug 2414 - Execute event watchers in the order they were added Leonardo Event watchers are being executed on the inverse order they are added because they are added to the head of the SDL_event_watchers list. Since watchers are allowed to change events before they are reported (they shouldn't, imo), this breaks code that rely on watcher execution order (such as distributed event handling). An easy scenario to see this behaving weird to the user is if you add an event watcher to check mouse coordinates and check them again in your event loop. If you add the watcher after renderer's one (which always happens after you have initialized renderer), you get the same event but different coordinates. The proposed patch adds the event watcher in the tail of the list, not in the beginning, and correctly fixes this problem.
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.
Sam Lantinga 7c33f233 2014-02-22T10:40:12 Thou shalt not use more than 4k local variables in this code.
Ryan C. Gordon 0deb54c0 2014-02-22T00:55:28 Reworked Mac OS X joystick code to use the 10.5+ HID Manager API. Besides being a little more simple to use than the earlier IOKit HID API, and less likely to be deprecated, it also has the added benefit of working with the Sony DualShock 4 controller in Bluetooth mode out of the box, whereas the previous API has a bug that makes it report bad data for the controller. Cleaned up several other things in this code, having gone over every line of it. The remaining deprecated calls are also gone.
James Legg d3cf7360 2014-02-21T13:57:53 Fix audio conversion when channel count changes - Use the SDL_AUDIO_MASK_DATATYPE bit when selecting an implementation where it matters. Previously two existing AUDIO_F32 cases had been written, but were unreachable. - Add AUDIO_F32 case for SDL_ConvertSurround_4. - Fix incorrect pointer arithmetic causing the 2 to 6 channel conversion for 4 byte audio formats to read and write beyond the end of the buffer.
Gabriel Jacobo abe2ac2c 2014-02-21T08:37:57 Fixes #2326, clean up the X11 backend a bit
Sam Lantinga 22e3217e 2014-02-20T21:07:56 Fixed infinite recursion in D3D_Reset()
Gabriel Jacobo ea71a5e0 2014-02-20T17:03:55 Fixes #2408, VS2013: several projects of release build are not built Patch by Hiroyuki Iwatsuki
Gabriel Jacobo 01550b96 2014-02-20T16:12:11 Improve testgles2 exit behavior (useful on Android)
Gabriel Jacobo e3f0d53b 2014-02-19T11:03:03 Fixes #2403, add SDL2 dependency to testgles2 (thanks Hiroyuki Iwatsuki)
Sam Lantinga 6b33f2e8 2014-02-17T22:20:33 Fixed resetting the current render target if the D3D device is reset while using a non-default render target.
Ryan C. Gordon ccce6fb3 2014-02-17T11:47:54 s/iPhoneOS/iOS
Ryan C. Gordon 245e125e 2014-02-17T11:46:23 Corrected battery percentage on iOS (thanks, Felix!). Fixes Bugzilla #2397.
Philipp Wiesemann fbeb24e9 2014-02-16T00:04:15 Fixed documentation comments in SDL_hints.h file.
Philipp Wiesemann fc1c17cc 2014-02-15T23:57:38 Changed text in documentation.
Philipp Wiesemann 70b975d6 2014-02-15T23:52:04 Corrected name of hint in README.
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 441f7d8d 2014-02-14T11:38:59 Fixed Mac PS4 controller entry, added Linux OUYA controller entry
Sam Lantinga 268071d1 2014-02-13T11:08:12 Added the new function at the end so we don't break the ABI
Sam Lantinga baf2dd4c 2014-02-13T11:05:34 Back out changelist 1951976
Sam Lantinga f5d1559b 2014-02-13T11:05:32 Back out changelist 2026006
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 567b5ba8 2014-02-13T11:05:26 As part of Jorgen's code review of this function I added a call to LoadLibrary so the refcounts would be consistent between Windows and Posix. Then I forgot to include the check that the thing was actually loaded and caused it to be loaded all the time. Oops. CR: AaronL
Sam Lantinga 1fa4939a 2014-02-13T11:05:24 Added SDL_GetLoadedModule to do the equivalent of GetModuleHandle/dlload(NOLOAD) CR: Jorgen
Gabriel Jacobo cf119f78 2014-02-12T18:12:14 Try to work around Android's handling of static variables in terminated apps Android, we want to love you, but you don't make it easy for us...
Sam Lantinga 076a14b2 2014-02-10T13:40:02 Fixed crash if render target textures are used while the device is lost
Sam Lantinga ae05f178 2014-02-10T10:02:51 Recreate render target textures when the D3D device is being reset, and notify the application using the SDL_RENDER_TARGETS_RESET event when this happens.
Sam Lantinga 9f2509da 2014-02-10T10:02:42 Exposed the font character size and SDLTest_DrawCharacter() to make it easier to do custom debug text layout
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.
Ryan C. Gordon f38c1f05 2014-02-10T12:47:26 Fixed DualShock 4 controller config on Mac OS X.
Ryan C. Gordon 2d92a372 2014-02-10T11:29:48 Make controllermap, etc, work on platforms with hardcoded window sizes. This makes sure everything renders correctly, even if, say, an Android device gives you a certain "window" size no matter what you ask for.
Edward Rudd 7f4c6a9c 2014-02-10T10:53:02 Fix Cmake so generated SOname matches autoconf's #.
Gabriel Jacobo 9268c7a1 2014-02-10T09:26:22 Backed out 0869362ccc3c The render target usage in controllermap is required if you are forced to use the app at a different resolution than the one the art has been made for, for example on Android, where you don't control the resolution. (The coordinates for each button are hardcoded to the art size, and appear out of place otherwise)
Ryan C. Gordon f0aa97d2 2014-02-10T01:43:01 Removed unused function.
Ryan C. Gordon b17fd9a1 2014-02-10T01:41:58 Replace testgamecontroller visualization mode with something more useful.
Ryan C. Gordon 9a15da84 2014-02-09T15:20:41 No need to use a render target here.
Sam Lantinga 853334af 2014-02-09T03:09:56 Updated SDL to version 2.0.2
Sam Lantinga 8cabd44f 2014-02-09T03:09:04 Fixed the OUYA controller mapping on Windows
Sam Lantinga c8c3911e 2014-02-09T02:42:59 Added Windows entry for the bluetooth OUYA controller
Sam Lantinga c3c2964d 2014-02-09T02:04:40 Possibly fixed bug 2250 - Cmake: SDL2 Doesn't install DLLs on Windows ernest.lee [Exec] CMake Error at cmake_install.cmake:151 (FILE): [13:37:43][Exec] file INSTALL cannot find [13:37:43][Exec] "C:/TeamCity/buildAgent/work/2e3d17a492e75daf/Build/libSDL2.so". The cmake INSTALL project doesn't work because it uses Linux so shared library paths. Windows uses dlls and I think cygwin also uses dlls. I've included this patch. Can you check if it works?
Sam Lantinga 3ab3ea64 2014-02-09T01:56:41 Fixed bug 2385 - error: unknown type name 'IDirect3DDevice9' Sandu Liviu Catalin I'm unable to compile the latest SDL (directly from the repository) even though I disabled every DirectX option since I don't need DirectX. I allways het these errors: D:\DevLibs\SDL\src\render\direct3d\SDL_render_d3d.c:1897:1: error: unknown type name 'IDirect3DDevice9' D:\DevLibs\SDL\src\render\direct3d\SDL_render_d3d.c:1898:25: error: unknown type name 'SDL_Renderer'
Sam Lantinga b331ada8 2014-02-09T01:49:01 Fixed bug 2354 - [ES 2.0] SDL_RenderClear clears render target with wrong color ny00 SDL_RenderClear clears a render target with the wrong color, if the opengles2 renderer driver is used and the target texture's format is SDL_PIXELFORMAT_ARGB8888. The bug is *not* reproduced if SDL_PIXELFORMAT_ABGR8888 is used as the texture format (the first from the renderer's list). It is further not reproduced using any of the following renderer drivers: opengl, opengles (apparently powered by Gallium3D), software. Finally, the correct color can be drawn using SDL_RenderFillRect (instead of SDL_RenderClear). A few details about the current setup: - OS: Ubuntu 12.04 for x86_64 - GPU: GeForce GTX 460 - GPU driver version: 331.20-0ubuntu1~xedgers~precise1 (from the xorg-edgers PPA) --- Seth Williams Sam, It appears that the clear just needs to take the render target format into consideration. Seth.
Ryan C. Gordon fab5c759 2014-02-07T12:03:02 Updated README-macosx.txt to note new minimum requirements, end of PowerPC.
Ryan C. Gordon ba55cbef 2014-02-07T11:55:13 Make non-Clang compilers happy.
Ryan C. Gordon 129456fe 2014-02-07T11:52:35 Tell Clang's static analysis that SDL_assert() is an assertion handler. This lets it know, for example, that when you do this... SDL_assert(ptr != NULL); ...that (ptr) is definitely not NULL at this point in the program, for the sake of static analysis. While a buggy program could definitely trigger this assertion, Clang assumes your assertion check is covering it and won't report possible NULL dereferences after this point. Since SDL_assert might continue if the user clicks "ignore", without this change Clang would notice you checked for NULL (meaning that NULL is a real possibility here) and still wrote code outside of that test branch that dereferences the pointer, and thus would always trigger false positives. Static analysis is fun!
Edward Rudd d3f64213 2014-02-07T09:35:33 slight adjustment to the hot plug test to allow it to be run with hap tics disabled
Edward Rudd fff7503b 2014-02-07T09:35:13 ignore hot plugs in mac haptic layer IF hap tics hasn't been initialized.
Ryan C. Gordon c2f6ab0c 2014-02-06T21:28:11 Added DualShock 4 game controller config for Windows, Mac, and Linux.
Ryan C. Gordon 7033e597 2014-02-06T21:26:41 Fixed crash on Windows if haptic isn't initialized when controllers are added.
Ryan C. Gordon 56979749 2014-02-06T10:00:45 Fixed a typo.
Edward Rudd a09548eb 2014-02-06T09:35:44 Fix device counting in HapticMouse and JoystickOpen routines. 0 is the first item in the list not the last
Edward Rudd f3e6a0a7 2014-02-06T09:11:05 fix indentation and spaces
Ryan C. Gordon 257ab5f5 2014-02-06T07:38:41 Fixed return values on testhotplug mainline.
Ryan C. Gordon 1191a902 2014-02-06T07:38:04 Fixed copyright date.
Ryan C. Gordon e42d46b4 2014-02-06T07:37:20 Wired up haptic hotplugging for Windows DirectInput/XInput code.
Ryan C. Gordon 9cf8c49c 2014-02-05T20:07:25 Fixed memory leak.
Ryan C. Gordon ccbf6943 2014-02-05T18:36:40 Make SDL_SYS_HapticMouse() count device indexes like HapticByDevIndex().
Ryan C. Gordon 7f942688 2014-02-05T01:02:09 Cleanup some vi footer comments, rename new PRIVATE_* funcs to MacHaptic_*.
Ryan C. Gordon 7afbb8c3 2014-02-05T00:34:26 SDL_pixels.h needs SDL_stdinc.h for SDL_FOURCC #define (thanks, Dmitry!). Fixes Bugzilla #2384.
Edward Rudd d4e3221f 2014-02-04T18:21:39 add testdropfile to OS X Project
Edward Rudd b352698d 2014-02-04T18:17:16 Implement new backend methods for haptic and hot plugging on OS X
Edward Rudd c9f6e4ec 2014-02-04T18:16:52 add testhotplug to OS X test project and set target OS version to 10.5 for tests.
Edward Rudd 4da88298 2014-02-04T16:50:34 implement new backend method for Haptics in dummy driver
Edward Rudd 5fb0be30 2014-02-04T15:44:09 Rework haptic backend to properly support hotplugging of haptic devices. * currently only linux backend updated.
Edward Rudd a98c477b 2014-02-04T15:40:51 allow safely quitting the hotplug test by pressing button 0 on the joystick
Brandon Schaefer 25fcc195 2014-02-04T12:28:35 * Remove android based workaround, it is handled in SDL_EGL_GetProcAddress.
Ryan C. Gordon c2b5da97 2014-02-04T11:38:40 Added SDL_GetAssertionHandler() and SDL_GetDefaultAssertionHandler().
Edward Rudd e6dce68f 2014-02-03T23:08:53 testhotplug: Actually log the SDL_Error that occured on failures
Edward Rudd 8512f1b8 2014-02-03T23:01:19 add logging for the case when haptic is not detected on the joystick as well.
Edward Rudd e0e6b2a4 2014-02-03T22:52:18 add simple test showing off hotplugging of joysticks w/ haptic.
Ryan C. Gordon c8ad30bc 2014-02-03T14:47:48 Removed -force_cpusubtype_ALL cflag from Mac builds. This was for PowerPC G3 (!) compatibility, and Clang doesn't even recognize the flag anymore.
Ryan C. Gordon e719158c 2014-02-03T14:45:38 Fixed some compiler warnings from the latest Clang, cleaned up some things.
Ryan C. Gordon 0d9443d3 2014-02-03T11:59:17 Temporarily default Wayland and Mir to disabled, for 2.0.2 release. We'll flip the default back to enabled right after 2.0.2 is finalized, and try to declare them stable and ready by 2.0.3. Those that have an interest in supporting them in 2.0.2 can manually enable them in the configure script with --enable-video-wayland and/or --enable-video-mir.
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 8f055d19 2014-02-03T11:14:25 Add Mir to configure script's summary output.
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!).
Ryan C. Gordon dce9b7b1 2014-02-02T21:38:16 Ignore the buildbot build directories.
Philipp Wiesemann e8f5e010 2014-02-02T20:58:46 Fixed including SDL_internal.h twice for DirectFB.
Philipp Wiesemann 9ee68e8f 2014-02-02T20:55:42 Added additional platform check for __ANDROID__. The macro ANDROID was deprecated with "android-ndk-1.6_r1".
Sam Lantinga 58edac3e 2014-02-02T00:53:27 Fixed bug 2374 - Update copyright for 2014... Is it that time already??
Sam Lantinga 3bd0e900 2014-02-02T00:33:31 Fixed bug 2376 - no SDL_HasAVX Haneef Mubarak AVX is the successor to SSE* and is fairly widely available. As such, it really ought to be detectable. This functionality ought to be trivial to implement, and not having it means being forced to write an ugly workaround to check for AVX (so that normal SSE can be used if AVX is not available). Here is an example on detecting AVX from SO (it actually shows ways to cehck for all of teh fancy instructions): http://stackoverflow.com/questions/6121792/how-to-check-if-a-cpu-supports-the-sse3-instruction-set
Gabriel Jacobo 8ba565ff 2014-01-30T20:29:58 Treacherous copy/paste!
Gabriel Jacobo 6f3bf186 2014-01-30T20:27:13 Detect Xrandr >= 1.2 at build time
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.
Philipp Wiesemann 68f2fe64 2014-01-29T00:29:14 Fixed spaces in source file license comment.