src


Log

Author Commit Date CI Message
Sam Lantinga 38b49c30 2014-08-19T21:59:56 Changed the name of the IME hint to match the naming convention in SDL
Alex Baines 90bc642f 2014-08-19T23:31:50 Add a SDL_IM_INTERNAL_EDITING event to make IMs like iBus render editing text in its own UI instead of sending TEXTEDITING events. This is useful for applications that handle TEXTINPUT events but not TEXTEDITING events.
Alex Baines f4ddacf4 2014-08-19T23:17:28 Improvements to the IBus related code: + Handle HidePreeditText IBus signal. + Use SDL_GetKeyboardFocus instead of SDL_GetFocusWindow. + Move the X11 IBus SetFocus calls to the X11_DispatchFocus functions. + Simplify the IBus ifdefs when handling X11 KeyEvents. + Remove inotify watch when SDL_IBus_Quit is called.
Alex Baines 6f84f37c 2014-08-19T22:28:53 Take the window border size into account when positioning the IBus candidate list.
Sam Lantinga bbab3855 2014-08-18T18:16:45 SDL - fix fullscreen desktop windows not restoring to fullscreen state if focus changes happen due to programtic window changes (and not user alt-tabbing)
Sam Lantinga 877666e2 2014-08-18T11:28:16 Fixed UV texture coordinate scale when using GL_ARB_texture_non_power_of_two
Sam Lantinga d1cc47b3 2014-08-17T15:07:00 Fixed 2680 - OSX: Replace NSAutoreleasePool with @autoreleasepool Tim McDaniel This patch replaces all use of NSAutoreleasePool with the Apple recommended @autoreleasepool. @autoreleasepool is supposedly more efficient, and since it is scope based it can't be accidentally not released.
Sam Lantinga 5e501804 2014-08-17T14:57:52 Fixed bug 2655 - OSX: Window position and global mouse coord spaces are different Tim McDaniel On OSX, with revision 8729, the coordinate space for window position and the coordinate space for global mouse position don't match. For a non-fullscreen window, the window position is global relative to the bottom of the menubar. The global mouse position is relative to the top of the screen. This affects Cocoa_WarpMouse and potentially other things as well. Further, the coordinate system for window position is now affected by what screen it is on. For example, if I have two equal size screens oriented side by side such that the tops of the screens are equal in global space, with the menubar on one screen, and a window straddles the two screens, the window's y position makes no sense. The window's y position depends on what screen "most" of the window is on. So if I move the window horizontally just a bit, the y position of my window is now different by the size of the menubar, even though the window was not moved vertically. I'd like to reiterate that this was a fairly fundamental change (and a breaking change for us). If SDL OSX is to really support multi-display configurations, this is especially problematic. If the real concern is preventing windows from going under the menubar, then perhaps a solution involving something like overriding [NSWindow constrainFrameRect] would be less problematic than redefining the global window coord space for the main display.
Sam Lantinga de3d381c 2014-08-17T14:44:53 Fixed bug 2685 - SDL_RenderReadPixels() doesn't work with offscreen targets Andreas Falkenhahn SDL_RenderReadPixels() doesn't seem to work when trying to read pixels from a texture that has been created using SDL_TEXTUREACCESS_TARGET and has been selected as the render target using SDL_SetRenderTarget(). I am attaching a small program that demonstrates the issue. I get the following result here: READ PIXEL RETURN: 0 --- COLOR CHECK: ff000000 But it should be: READ PIXEL RETURN: 0 --- COLOR CHECK: ffff0000 Tested with SDL 2.0.3 on Windows 7.
Sam Lantinga 2e3c778e 2014-08-17T14:34:41 Fixed bug where the render target is updated instead of the default output when the window is resized.
Sam Lantinga 1ea86978 2014-08-17T13:11:55 Removed SDL_round() because the license wasn't compatible with zlib
Sam Lantinga 529ed53b 2014-08-16T23:30:44 Fixed bug 2681 - dereference a NULL pointer dst_fmt in SDL_CreateTextureFromSurface function Nitz In SDL_CreateTextureFromSurface: SDL_PixelFormat *dst_fmt; /* Set up a destination surface for the texture update */ dst_fmt = SDL_AllocFormat(format); temp = SDL_ConvertSurface(surface, dst_fmt, 0); Here is need of NULL check for dst_fmt because there are chances of NULL return from SDL_AllocFormat(format);
Sam Lantinga 8272ed18 2014-08-16T23:25:02 Fixed bug 2687 - SDL_BlitScaled does not handle clipping correctly Patch from Benoit Pierre: video: fix clipping handling in SDL_UpperBlitScaled - honor destination clipping rectangle - update both destination and source rectangles when clipping source rectangle to source surface and destination rectangle to destination clip rectangle - don't change scaling factors when clipping N.B.: - when no scaling is involved (source and destination width/height are the same), SDL_UpperBlit is used (so SDL_BlitScaled behaves like SDL_BlitSurface) - the final destination rectangle after all clipping is performed is saved back to dstrect (like for SDL_UpperBlit)
Sam Lantinga 4e7db78e 2014-08-16T23:23:15 Added SDL_round(), contributed by Benoit Pierre - thanks!
Sam Lantinga d673d8c3 2014-08-16T23:17:47 Fixed bugs 2677 and 2625, made it possible to lock render targets in D3D
Ryan C. Gordon e2bbc17d 2014-08-16T16:49:00 Haptic: Fix clamping bugs on Windows, by using the Darwin haptics code. Thanks, Elias! Partially fixes Bugzilla #2686.
Ryan C. Gordon 57db2790 2014-08-16T16:47:42 Haptic: Fix the saturation and deadband parameters' available range. There was a misconception that Linux's saturation and deadband parameters - on which the corresponding SDL parameters were based - use only half of the possible range. Thanks, Elias! Partially fixes Bugzilla #2686.
Ryan C. Gordon a2622ce6 2014-08-16T16:42:55 Haptic: Explicitly avoid floating point arithmetic if it's not needed. Thanks, Elias! Partially fixes Bugzilla #2686.
Ryan C. Gordon 1db581b4 2014-08-16T16:41:25 Haptic: DInput's POLAR direction actually matches Linux's direction. Thanks, Elias! Partially fixes Bugzilla #2686.
Ryan C. Gordon 3e27013b 2014-08-16T16:40:01 Haptic: Don't interpret a direction of polar 35999 as "unsupported type". (or linux-direction 0xFFFF) Thanks, Elias! Partially fixes Bugzilla #2686.
Sam Lantinga c6a2382c 2014-08-14T21:31:50 Take advantage of GL_ARB_texture_non_power_of_two when it's available
Philipp Wiesemann 2c1faa40 2014-08-12T23:37:12 Fixed warnings about unused local variables.
Sam Lantinga 05d87800 2014-08-11T17:25:53 Implemented SDL_GetPrefPath() on Android - it returns the path used by SDL_AndroidGetInternalStoragePath()
Sam Lantinga 4fe43f40 2014-08-11T17:24:54 Added an entry for the new Steam controller XInput emulation mode
Philipp Wiesemann a9d4a6b8 2014-08-11T23:18:35 Fixed typo in source comment.
David Ludwig ff5caa17 2014-08-10T22:21:21 WinRT build fix for ARM platforms The _xgetbv intrinsic was being used in ARM builds of SDL/WinRT, which was leading to linker errors. This commit limits _xgetbv use to the platforms on which it is available, x86 and x64.
Sam Lantinga 6fef39d6 2014-08-06T11:34:54 Added NV12 and NV21 texture support for OpenGL and OpenGL ES 2.0 renderers
Sam Lantinga 6299daec 2014-08-06T00:28:02 The OpenGL context returned by the UIKit backend is now an actual OpenGL context instead of the OpenGL view we created. This allows you to use the returned context in functions like CVOpenGLESTextureCacheCreate()
Alfred Reynolds 87b8c8d1 2014-07-31T12:46:23 SDL - when raising the window under OSX also force the app to activate. This fixes a fullscreen window on a separate space not coming front when raisewindow is called.
Alfred Reynolds 75529476 2014-07-30T17:45:52 SDL - fix re-entrancy into SDL_UpdateFullscreenMode under OSX. During HideWindow we get a RESTORED event which then turns fullscreen back on causing a hang in Cocoa_SetWindowFullscreenSpace waiting for the fullscreen transition to finish.
Ryan C. Gordon c0f9a57f 2014-07-30T14:12:54 Fixed comment typo.
Ryan C. Gordon c5b21ea6 2014-07-30T11:11:48 SDL_GetQueuedAudioSize() shouldn't grab lock when not set up for queueing.
Ryan C. Gordon e5d49c20 2014-07-30T11:08:31 Added a GetPendingBytes method to the audio backend. This will (eventually) make SDL_GetQueuedAudioSize() more accurate, and thus reduce latency. Right now this isn't implemented anywhere, so we assume data fed to the audio callback is consumed by the hardware and immediately played to completion.
Ryan C. Gordon db1dd756 2014-07-30T09:54:01 XAudio2: Use XAUDIO2_VOICE_NOSAMPLESPLAYED when possible. For versions of XAudio2 with an IXAudio2SourceVoice::GetState() that offers a flags parameter, we can use XAUDIO2_VOICE_NOSAMPLESPLAYED, since we don't need this information in our current calls. According to MSDN, this makes the the call about 3x faster.
Sam Lantinga a0b68e81 2014-07-27T17:44:10 Fixed bug 2537 - _allmul in SDL_lib.c is not working properly
Sam Lantinga 5c6c8691 2014-07-27T17:43:36 Fixed uninitialized variable in some cases
Ryan C. Gordon 2230df55 2014-07-27T19:52:52 Remove dependency on C runtime from Windows SDLmain.
Sam Lantinga dfc7535f 2014-07-26T16:52:26 Fixed bug 2657 - Memory leak in GL_CreateTexture function Nitz In GL_CreateTexture function: if (GL_CheckError("glGenTexures()", renderer) < 0) { SDL_free(data); return -1; } Here only data is getting free but data->pixels getting leak. So have to free data->pixels before free data.
Ryan C. Gordon 987c3355 2014-07-22T23:12:21 Clarifying hard-to-understand piece of code.
Ryan C. Gordon f30e120a 2014-07-22T21:41:49 Added audio device buffer queueing API.
Brandon Schaefer 75dacdb9 2014-07-18T14:10:45 Dont redeclare DBusMessage* msg;
Sam Lantinga 96b613ea 2014-07-13T09:04:55 Fixed bug 2640 - Unable to SDL_SetRenderTarget to original surface for software renderer without a window Damian Kaczmarek Basically this bug is probably not a common use case. My goal is to allow rendering totally without a window, for example to a screenshot and I need to rely on SDL_SetRenderTarget to properly work for a purely software renderer created by SDL_CreateSoftwareRenderer.
Sam Lantinga fd1da994 2014-07-12T16:21:56 Fixed bug 2639 - SDL_BLENDMODE_BLEND not working properly for software renderer, thanks to Melker Narikka
Sam Lantinga d1ca658c 2014-07-12T13:05:41 Fixed bug 2638 - (Signed) Can't create signed apps in Android Pablo Mayobre When generating a signed app with SDL 2.0.3 an issue comes up, watching at the Error Log points out that the issue lies in the src/main/android/SDL_android_main.c where the process name is defined as "SDL_app", this name turns into an erroneous name so it should be changed to "app_process"
Sam Lantinga 454c4a01 2014-07-11T22:15:34 Fixed Visual Studio 2010 build
Sam Lantinga 6a1011ae 2014-07-11T22:14:14 Fixed build for arm platforms
Sam Lantinga eb1c6044 2014-07-11T22:02:50 Fixed bug in AVX detection and added AVX2 detection
Ryan C. Gordon f7461cdc 2014-07-09T00:09:57 The Gimp puts out a different bogus color mask for 32-bit .bmp files. :)
Ryan C. Gordon a91f1a1a 2014-07-09T00:01:34 Make SDL_LoadBMP() work with 32-bit bitmaps from ImageMagick.
Sam Lantinga 19d878d7 2014-07-08T00:42:14 Skip JUNK chunks in wave files
Sam Lantinga d23d9c88 2014-07-07T23:26:34 Fixed bug 2421 - SDL_RenderCopyEx off by one when rotating by 90 and -90 chasesan When using SDL_RenderCopyEx, I get a problem on some platforms where the output is offset by +/-1 on other platforms and not on others. I tried it with a center of both 0,0 (and offsetting by width/height) and NULL (for centered). The rotation involved is 90, and/or -90 rotation. The rotation was a constant, no arithmetic was involved when inputting it into SDL_RenderCopyEx. This occurred with 32x32, 24x24, and 16x16 texture sizes. I apologize that I don't have more precise information, as I received the information as a bug report myself. But I have tracked the problem down to here. My program requires pixel perfect alignment on several different platforms, so this is something of a showstopper for me. -- Sylvain It appears the RenderCopyEx is done as expected, this is the red rectangle which is not correctly positionned ! So, here's patch with a 0.5 float increment, like for opengles2, for DrawLines, and also Draw Points.
Sam Lantinga 8077bf3d 2014-07-07T21:27:42 Fixed bug 2618 - incomplete pthread-based lock support should be removed binarycrusader Since changeset 358696c354a8, SDL 2.0 has been broken on Solaris when compiling with the Solaris Studio compiler (which uses the pthread implementation of SDL_AtomicLock). Notably, it gets stuck at the MemoryBarrierRelease in SDL_GetErrBuf: 6585 # 218 6586 if (!tls_errbuf && !tls_being_created) { 6587 SDL_AtomicLock_REAL ( & tls_lock ); 6588 if (!tls_errbuf) { 6589 SDL_TLSID slot; 6590 tls_being_created = SDL_TRUE; 6591 slot = SDL_TLSCreate_REAL ( ); 6592 tls_being_created = SDL_FALSE; 6593 { SDL_SpinLock _tmp = 0 ; SDL_AtomicLock_REAL ( & _tmp ) ; SDL_AtomicUnlock_REAL ( & _tmp ) ; }; ^^^ loops forever above 6594 tls_errbuf = slot; 6595 } 6596 SDL_AtomicUnlock_REAL ( & tls_lock ); 6597 } Running: testthread (process id 28926) ^Cdbx: warning: Interrupt ignored but forwarded to child. signal INT (Interrupt) in __nanosleep at 0xfe52a875 0xfe52a875: __nanosleep+0x0015: jae __nanosleep+0x23 [ 0xfe52a883, .+0xe ] Current function is SDL_Delay_REAL 204 was_error = nanosleep(&tv, &elapsed); (dbx) where [1] __nanosleep(0xfeffe848, 0xfeffe850, 0xfe75a5ac, 0xfe5169d8), at 0xfe52a875 [2] nanosleep(0xfeffe848, 0xfeffe850), at 0xfe516a3b =>[3] SDL_Delay_REAL(ms = 0), line 204 in "SDL_systimer.c" [4] SDL_AtomicLock_REAL(lock = 0xfeffe88c), line 104 in "SDL_spinlock.c" [5] SDL_GetErrBuf(), line 225 in "SDL_thread.c" [6] SDL_ClearError_REAL(), line 216 in "SDL_error.c" [7] SDL_InitSubSystem_REAL(flags = 0), line 116 in "SDL.c" [8] SDL_Init_REAL(flags = 0), line 244 in "SDL.c" [9] SDL_Init(a = 0), line 89 in "SDL_dynapi_procs.h" [10] main(argc = 1, argv = 0xfeffe948), line 65 in "testthread.c" As far as I can tell, this is because pthread_spin_trylock() always returns EBUSY for this particular lock; since it works in other places, I'm suspicious. Different Solaris Studio compiler versions seem to make no difference. I've verified this is broken on Linux as well if SDL_spinlock.c is modified to use the pthread implementation. This appears to be because pthread_spin_init() and pthread_spin_destroy() are not used with the locks as required.
Sam Lantinga 0c8e3376 2014-07-07T21:21:05 Fixed bug 2628 - invalidate surface->map in SDL_SurfacePalette() Wei Mingzhi surface->map should be invalidated in SDL_SetSurfacePalette(), otherwise the palette would not be effective when blitting to another non-8bit surface which we previously blitted to.
Sam Lantinga cd8f63f2 2014-07-07T13:21:54 Hopefully fixed Cygwin build
Sam Lantinga a2d5dd02 2014-07-07T13:19:53 Removed useless assert
Sam Lantinga fc4e798d 2014-07-07T12:48:25 Fixed bug 2631 - Mac: minor code cleanup Alex Szpakowski Some minor changes to the Mac-specific backend code: - Fixed up some code style issues (mostly brace style inconsistencies). - Fixed a compiler warning in SDL_cocoaevents.m. - Removed some useless code now that the 10.7 SDK is required to build SDL. - Removed Gestalt(gestaltSystemVersion, ...) call and switched to NSAppKitVersionNumber for version checking code. Using Gestalt with gestaltSystemVersion will give 0x1090 in Mac OS 10.10+, and the whole Gestalt function was deprecated in Mac OS 10.8.
Sam Lantinga febc4797 2014-07-07T11:44:14 SDL_SYS_IsXInputGamepad_DeviceIndex() is only available if SDL_JOYSTICK_XINPUT is true.
Sam Lantinga 7187b74c 2014-07-07T11:00:25 Fixed compiler warnings on iOS
Sam Lantinga 73cb234b 2014-07-07T10:38:10 Fixed compiler warning on Mac OS X
Sam Lantinga d44f3922 2014-07-07T10:33:32 Fixed bug 2629 - Mac: crash when calling SDL_DestroyWindow with an active OpenGL context Alex Szpakowski Since this commit https://hg.libsdl.org/SDL/rev/59b543340d63 , calling SDL_DestroyWindow will crash the program if the window has an active OpenGL context. This is because the Cocoa_DestroyWindow code sets the window's driverdata to NULL and then calls [context setWindow:NULL], which tries to access the window's driverdata, resulting in a null pointer dereference. I have attached a patch which fixes the issue by moving the line which sets the driverdata to NULL to after the lines which call functions that use the driverdata pointer.
Sam Lantinga 1ee96bb9 2014-07-07T10:26:28 Fixed mingw64 build and warnings
Andreas Schiffler ac112e5f 2014-07-06T20:41:39 Fix option for forced run of disabled tests in test harness
Alex Baines 1c6cd678 2014-07-06T22:15:31 Call dbus_shutdown to make valgrind happy.
Shawn Walker c5812c55 2014-07-05T16:11:23 2620 solaris port missing atomics if not using gcc
Sam Lantinga 9b1b74e6 2014-07-04T17:20:22 Fixed haptic refcount bug (thanks David Ludwig!)
David Ludwig cf4ff728 2014-07-04T18:20:23 Made the latest XInput + Haptic changes compile and run on WinRT Notes: - Support for the 'Guide' button does not seem to be possible, as XInputGetStateEx is not available on WinRT. - Haptic support appears to be working on WinRT now! - SDL/WinRT does not allow calls to LoadLibrary or LoadLibraryEx. The calls to those were removed by this change, but only when compiling for WinRT. Non-WinRT Windows will continue to detect and load XInput via LoadLibrary and GetProcAddress calls.
Sam Lantinga b79e7f32 2014-07-03T15:39:55 Split the XInput and DirectInput code so Windows RT can use the existing XInput support.
Gabriel Jacobo 5a3c553d 2014-07-03T17:36:08 Maybe fixes bug #2291 (red tinted screen on some Samsung Android devices) Then again, maybe not!
Alfred Reynolds 2748e282 2014-07-03T10:22:12 The YUV offset is 16 / 255, not 16 / 256
Sam Lantinga 610225b4 2014-06-28T19:51:26 Fixed null terminating the X11 error string
Gabriel Jacobo 765894e3 2014-06-28T13:05:16 Better fix to support EGL_KHR_create_context and not fail to build on Android ...or Raspberry Pi (EGL < 1.4 systems)
Gabriel Jacobo 9dc2614e 2014-06-28T12:50:17 Another fix to prevent dereferencing a null window pointer in SDL_mouse.c
Gabriel Jacobo a9bb8898 2014-06-28T12:48:29 Disable desktop OpenGL for EGL under Android
Gabriel Jacobo 1ed1f7f2 2014-06-28T12:36:44 Fixes #2611 #2610, Touch events cause crash on Android, thanks Alvin & Sylvain This bug was introduced on this rev: https://hg.libsdl.org/SDL/rev/42f6bd8c8575
Knut Andre Tidemann 02e9f81e 2014-06-28T12:17:29 SDL_egl: allow creation of versioned OpenGL contexts with EGL_KHR_create_context If the EGL extension EGL_KHR_create_context is available, we can use it to set the core/compatability profile and the minimum OpenGL version. Use this if it is available to get the context requested by the GL attributes.
Sam Lantinga e592b046 2014-06-26T12:42:15 Fixed compiler warning on Android
Sam Lantinga 3d5f4a69 2014-06-25T21:06:47 Fixed YUV texture update with a subrect in OpenGL ES 2.0 - thanks Sylvain!
David Ludwig 65023e07 2014-06-25T22:38:40 WinRT: Fixed game controller axis mappings SDL/WinRT currently uses a separate XInput backend from SDL/Win32, as WinRT has no support for DirectInput. This change makes SDL/WinRT's XInput code snag some recently-changed bits from the Win32-specific, DirectInput + XInput backend, in order to get the SDL_GameController API working again on WinRT, insofar that axes map to the correct parts. TODO: - test all buttons, making sure WinRT maps buttons the same way that Win32 does - consider making the Win32 and WinRT codebases share more stuff, minus the sort of duplication happening via this change. Maybe simulate, or stub-out, DirectInput calls when on WinRT?
David Ludwig a838a56d 2014-06-25T22:03:05 WinRT build fix
Ryan C. Gordon 95864f86 2014-06-25T17:24:06 Patched to compile on Windows.
Ryan C. Gordon 4318910e 2014-06-25T17:20:22 Whoops, lost this in the merge.
Ryan C. Gordon 84cb2320 2014-06-25T17:13:43 Patched to compile with -Werror=declaration-after-statement
Ryan C. Gordon b29740b8 2014-06-25T17:06:12 Merged Ryan's SDL-gui-backend branch. Adds three APIs, and implements them on X11, Cocoa, and Windows: - SDL_CaptureMouse() - SDL_GetGlobalMouseState() - SDL_SetWindowHitTest()
Ryan C. Gordon 84369567 2014-06-25T16:16:55 Changed SDL_GetAbsoluteMouseState() to SDL_GetGlobalMouseState(). This matches naming conventions in the main repository, between SDL_GetRelativeMouseState() and SDL_WarpMouseGlobal().
Sam Lantinga 704d9bd3 2014-06-25T02:08:37 Fixed bug 2525 - Keyboard focus crash Todd Seiler Call Stack: #0 0x0000000101c29291 in Cocoa_StartTextInput at /Users/Todd/Desktop/codes/sources/SDL/src/video/cocoa/SDL_cocoakeyboard.m:512 #1 0x0000000101c110c5 in SDL_SetKeyboardFocus at /Users/Todd/Desktop/codes/sources/SDL/src/events/SDL_keyboard.c:643 #2 0x0000000101c32be4 in SetupWindowData at /Users/Todd/Desktop/codes/sources/SDL/src/video/cocoa/SDL_cocoawindow.m:981 #3 0x0000000101c32d2a in Cocoa_CreateWindowFrom at /Users/Todd/Desktop/codes/sources/SDL/src/video/cocoa/SDL_cocoawindow.m:1092 #4 0x0000000101c99999 in SDL_CreateWindowFrom_REAL at /Users/Todd/Desktop/codes/sources/SDL/src/video/SDL_video.c:1338 #5 0x0000000101ce1484 in SDL_CreateWindowFrom at /Users/Todd/Desktop/codes/sources/SDL/src/dynapi/SDL_dynapi_procs.h:547 #6 0x0000000100018a5e in SceneRenderer at /Users/Todd/Desktop/codes/sources/tseiler_Todds-MacBook-Pro_3405/AppName/src/SceneRenderer.cpp:138 #7 0x0000000100017ca5 in SceneRenderer at /Users/Todd/Desktop/codes/sources/tseiler_Todds-MacBook-Pro_3405/AppName/src/SceneRenderer.cpp:145 #8 0x000000010000cd96 in App::execute(int, char**) at /Users/Todd/Desktop/codes/sources/tseiler_Todds-MacBook-Pro_3405/AppName/src/App.cpp:28 #9 0x0000000100004402 in main at /Users/Todd/Desktop/codes/sources/tseiler_Todds-MacBook-Pro_3405/AppName/src/main.cpp:8 This issue occurred when using Ogre3D Graphics engine on Mac (cocoa) to create the window. Then handing the window handle off to SDL_CreateWindowFrom(). In Ogre3D application you do the following: window_ = root_->initialise(true, "Ogre Window 2"); loadOgreResources(); Ogre::WindowEventUtilities::addWindowEventListener(window_, this); #if OGRE_PLATFORM == OGRE_PLATFORM_APPLE NSWindow* Data = 0; window_->getCustomAttribute("WINDOW", &Data); sdl_window_ = SDL_CreateWindowFrom((void*)Data); #endif It results in a crash in this function: SDL_cocoakeyboard.m void Cocoa_StartTextInput(_THIS) { SDL_VideoData *data = (SDL_VideoData *) _this->driverdata; NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; SDL_Window *window = SDL_GetKeyboardFocus(); NSWindow *nswindow = nil; if (window) nswindow = ((SDL_WindowData*)window->driverdata)->nswindow; // ... } The crash occurred because "driverdata" was nil. Before this function call, a call to SetupWindowData is called: SDL_cocoawindow.m static int SetupWindowData(_THIS, SDL_Window * window, NSWindow *nswindow, SDL_bool created) { // ... if ([nswindow isKeyWindow]) { window->flags |= SDL_WINDOW_INPUT_FOCUS; SDL_SetKeyboardFocus(data->window); } /* Prevents the window's "window device" from being destroyed when it is * hidden. See http://www.mikeash.com/pyblog/nsopenglcontext-and-one-shot.html */ [nswindow setOneShot:NO]; /* All done! */ [pool release]; window->driverdata = data; return 0; } As you can see: "window->driverdata = data" is performed after the "SDL_SetKeyboardFocus()" call, which eventually leads to "Cocoa_StartTextInput()" where the crash occurs.
Sam Lantinga 724d9380 2014-06-25T01:43:58 Fixed compiler warning - HRESULT is set to FFERR_* values, but is an int
Sam Lantinga a8955f26 2014-06-25T01:35:17 Made the RLE code (semi) readable again
Sam Lantinga b4deeeba 2014-06-25T00:58:40 Fixed bug 2595 - Padded, non-contiguous YUV does not display correctly using OpenGL ES 2.0 renderer Sylvain Ok, I found out : GLES2_UpdateTexture is just not handling the YUV, I will attach a patch.
Sam Lantinga afe14829 2014-06-25T00:43:10 Fixed bug 2556 - add compilation flag -Wshadow Sylvain here's the full patch for Blit + RLE.
Sam Lantinga 6a632eb2 2014-06-25T00:20:21 Fixed bug 2603 - iOS: update joystick accelerometer code to use CoreMotion instead of the deprecated UIAccelerometer Alex Szpakowski SDL's code for exposing the accelerometer as a joystick on iOS currently uses UIAccelerometer, which was superseded by the CoreMotion framework and deprecated since iOS 5. The UIAccelerometer code still works (for now), but it also throws deprecation warnings whenever SDL is built for iOS, since SDL's deployment target is no longer below iOS 5. I've created a patch which replaces the old UIAccelerometer code with a replacement based on the CoreMotion framework. It has identical functionality (to SDL users), however iOS apps are now required to link to the CoreMotion framework when using SDL.
Sam Lantinga 52ec151f 2014-06-24T13:31:25 Fixed bug 2553 - Add support to all XInput devices This adds support for all XInput devices, exposed through the SDL joystick API. The button and axis reporting for XInput devices has been changed to match DirectInput and other platforms. The game controller xinput mapping has been updated so this change is seamless. There is a new hint, SDL_HINT_XINPUT_USE_OLD_JOYSTICK_MAPPING, for any applications that have hardcoded the old xinput button and axis set. This hint will be removed in SDL 2.1.
Sam Lantinga cbafb158 2014-06-24T01:38:21 Fixed bug 2467 - bad memcpy in SDL_OpenAudio/open_audio_device/prepare_audiospec chain Rainer Deyke If 'SDL_OpenAudio' is called with 'obtained == NULL', 'prepare_audiospec' performs a bad 'memcpy' with the destination and source pointing to the same block of memory. The problem appears to be on in 'SDL_OpenAudio', which calls open_audio_device with 'obtained = desired' when 'obtained == NULL'. 'open_audio_device' cannot deal with 'desired' and 'obtained' pointing to the same block of memory but can deal with 'obtained == NULL'
Sam Lantinga 3344db40 2014-06-23T11:06:50 Don't redefine standard macros, use SDL specific macros instead to avoid compiler warnings
Sam Lantinga 67e55655 2014-06-23T10:09:15 Fixed grab interaction with Windows Classic theme Testing: * For each theme in Windows 7, Windows 7 Basic, and Windows 7 Classic: - Ran testsprite2 - Pressed Ctrl-G to grab the mouse - Alt-tabbed away, verified mouse is no longer grabbed - Alt-tabbed back, verified that mouse was grabbed - Alt-tabbed away - Clicked in the window, verified mouse was grabbed - Alt-tabbed away - Grabbed the title bar and dragged the window around successfully, verified that mouse was grabbed when move modal loop completed - Alt-tabbed away - Clicked the minimize button on the title bar, the window was successfully minimized - Clicked on the icon in the task bar, the window was restored and the mouse grabbed again - Alt-tabbed away - Clicked the close button on the title bar, the window was successfully closed
Sam Lantinga 9e2a2639 2014-06-23T10:09:13 Added names for some theme related windows messages
Gabriel Jacobo e63e1a5e 2014-06-23T09:25:27 Fixes OpenGL ES 2 renderer (Thanks Sylvain Becker)
Gabriel Jacobo 620510b3 2014-06-23T09:18:31 Fix compiler warning
Sam Lantinga 553028c9 2014-06-22T11:02:56 Partial fix for bug 2556 - add compilation flag -Wshadow I added -Wshadow and then turned it off again because of massive variable shadowing in the blit macros. Feel free to go through that code and fix these if you want. Just uncomment CheckWarnShadow in configure.in if you want to try this.
Sam Lantinga 9f5e3ed7 2014-06-22T10:05:59 Fixed bug 1673 - BEXT wave files only have extra metadata that you can easily skip through bill In SDL_wave.c, BEXT wave files with "bext" instead of "fmt " are choked on if (chunk.magic != FMT) { SDL_SetError("Complex WAVE files not supported"); was_error = 1; goto done; } BEXT files http://en.wikipedia.org/wiki/Broadcast_Wave_Format actually playback the same as regular waves. All they have is (A LOT OF) extra header info. To open them, just SKIP the "bext" chunk, and the "fmt " chunk will be a couple of hundred bytes later. The "fmt " chunk is also bloated, but if you skip past the extra information to the "data" chunk, there is nothing different about a BEXT wave file than a "normal" one. You can then load the data and proceed as normal.
Sam Lantinga cff9eac6 2014-06-22T09:48:46 Fixed bug 2579 - SDL fails to compile on Windows when only EGL+OpenGL ES defined callow.mark Compiling with SDL_VIDEO_RENDER_OGL=0, SDL_VIDEO_OPENGL=0, SDL_VIDEO_OPENGL_WGL=0, SDL_VIDEO_RENDER_OGL_ES2=1, SDL_VIDEO_OPENGL_ES2=1 and SDL_VIDEO_OPENGL_EGL=1 set in SDL_config_windows.h fails. A patch is attached. See bug #2570 for reasons you might want to compile this way.