Tue, 27 May 2014 00:26:47 -0400Added SDL_PointInRect().
Ryan C. Gordon <icculus@icculus.org> [Tue, 27 May 2014 00:26:47 -0400] rev 8930
Added SDL_PointInRect().

Sat, 24 May 2014 18:23:56 -0400Flip this around to do the simpler condition first.
Ryan C. Gordon <icculus@icculus.org> [Sat, 24 May 2014 18:23:56 -0400] rev 8929
Flip this around to do the simpler condition first.

Sat, 24 May 2014 18:23:39 -0400Implement SDL_CaptureMouse() for Mac OS X.
Ryan C. Gordon <icculus@icculus.org> [Sat, 24 May 2014 18:23:39 -0400] rev 8928
Implement SDL_CaptureMouse() for Mac OS X.

Sat, 24 May 2014 01:30:37 -0400Implemented SDL_CaptureMouse().
Ryan C. Gordon <icculus@icculus.org> [Sat, 24 May 2014 01:30:37 -0400] rev 8927
Implemented SDL_CaptureMouse().

Wed, 25 Jun 2014 02:08:37 -0700Fixed bug 2525 - Keyboard focus crash
Sam Lantinga <slouken@libsdl.org> [Wed, 25 Jun 2014 02:08:37 -0700] rev 8926
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.

Wed, 25 Jun 2014 01:43:58 -0700Fixed compiler warning - HRESULT is set to FFERR_* values, but is an int
Sam Lantinga <slouken@libsdl.org> [Wed, 25 Jun 2014 01:43:58 -0700] rev 8925
Fixed compiler warning - HRESULT is set to FFERR_* values, but is an int

Wed, 25 Jun 2014 01:35:17 -0700Made the RLE code (semi) readable again
Sam Lantinga <slouken@libsdl.org> [Wed, 25 Jun 2014 01:35:17 -0700] rev 8924
Made the RLE code (semi) readable again

Wed, 25 Jun 2014 00:58:40 -0700Fixed bug 2595 - Padded, non-contiguous YUV does not display correctly using OpenGL ES 2.0 renderer
Sam Lantinga <slouken@libsdl.org> [Wed, 25 Jun 2014 00:58:40 -0700] rev 8923
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.

Wed, 25 Jun 2014 00:43:10 -0700Fixed bug 2556 - add compilation flag -Wshadow
Sam Lantinga <slouken@libsdl.org> [Wed, 25 Jun 2014 00:43:10 -0700] rev 8922
Fixed bug 2556 - add compilation flag -Wshadow

Sylvain

here's the full patch for Blit + RLE.

Wed, 25 Jun 2014 00:20:21 -0700Fixed bug 2603 - iOS: update joystick accelerometer code to use CoreMotion instead of the deprecated UIAccelerometer
Sam Lantinga <slouken@libsdl.org> [Wed, 25 Jun 2014 00:20:21 -0700] rev 8921
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.