Announcing SDL 2.0.2

Thanks to everyone who contributed, SDL 2.0.2 is now available!
http://www.libsdl.org/download-2.0.php

In addition to numerous bug fixes, here are the major changes since 2.0.1:
General:

  • Added SDL_GL_ResetAttributes() to reset OpenGL attributes to default
    values
  • Added an API to load a database of game controller mappings from a file:
    SDL_GameControllerAddMappingsFromFile(),
    SDL_GameControllerAddMappingsFromRW()
  • Added game controller mappings for the PS4 and OUYA controllers
  • Added SDL_GetDefaultAssertionHandler() and SDL_GetAssertionHandler()
  • Added SDL_DetachThread()
  • Added SDL_HasAVX() to determine if the CPU has AVX features
  • Added SDL_vsscanf(), SDL_acos(), and SDL_asin() to the stdlib routines
  • EGL can now create/manage OpenGL and OpenGL ES 1.x/2.x contexts, and share
    them using SDL_GL_SHARE_WITH_CURRENT_CONTEXT
  • Added a field “clicks” to the mouse button event which records whether
    the event is a single click, double click, etc.
  • The screensaver is now disabled by default, and there is a hint
    SDL_HINT_VIDEO_ALLOW_SCREENSAVER that can change that behavior.
  • Added a hint SDL_HINT_MOUSE_RELATIVE_MODE_WARP to specify whether mouse
    relative mode should be emulated using mouse warping.
  • testgl2 does not need to link with libGL anymore
  • Added testgles2 test program to demonstrate working with OpenGL ES 2.0
  • Added controllermap test program to visually map a game controller

Windows:

  • Support for OpenGL ES 2.x contexts using either WGL or EGL (natively via
    the driver or emulated through ANGLE)
  • Added a hint SDL_HINT_VIDEO_WIN_D3DCOMPILER to specify which D3D shader
    compiler to use for OpenGL ES 2 support through ANGLE
  • Added a hint SDL_HINT_VIDEO_WINDOW_SHARE_PIXEL_FORMAT that is useful when
    creating multiple windows that should share the same OpenGL context.
  • Added an event SDL_RENDER_TARGETS_RESET that is sent when D3D9 render
    targets are reset after the device has been restored.

Mac OS X:

  • Fullscreen desktop mode now uses spaces for a more fluid Mac experience.
  • Added a hint SDL_HINT_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK to control
    whether Ctrl+click should be treated as a right click on Mac OS X. This is
    off by default.

Linux:

  • Fixed fullscreen and focused behavior when receiving NotifyGrab events
  • Added experimental Wayland and Mir support, disabled by default

Android:

  • Joystick support (minimum SDK version required to build SDL is now 12,
    the required runtime version remains at 10, but on such devices joystick
    support won’t be available).
  • Hotplugging support for joysticks
  • Added a hint SDL_HINT_ACCELEROMETER_AS_JOYSTICK to control whether the
    accelerometer should be listed as a 3 axis joystick, which it will by
    default.

Enjoy!

This is driving me crazy!

Behavior in SDL 2.0.1 and SDL 2.0.0:

  • I initialize SDL, create a window, call SDL_GetWindowSurface.
  • The newly created window has the input focus, but no
    SDL_WINDOW_INPUT_FOCUS flag.
  • I start receiving input events for the window, but never receive a
    SDL_WINDOWEVENT_FOCUS_GAINED event and the SDL_WINDOW_INPUT_FOCUS flag
    on the window remains cleared.
  • When I click on the title bar of the window, I finally receive my
    SDL_WINDOWEVENT_FOCUS_GAINED event and the SDL_WINDOW_INPUT_FOCUS flag.

Behavior in SDL 2.0.2:

  • I initialize SDL, create a window, call SDL_GetWindowSurface.
  • The newly created window has the input focus, but no
    SDL_WINDOW_INPUT_FOCUS flag.
  • I start receiving input events for the window, but never receive a
    SDL_WINDOWEVENT_FOCUS_GAINED event and the SDL_WINDOW_INPUT_FOCUS flag
    on the window remains cleared.
  • When I click on the title bar of the window, I still don’t
    receive a SDL_WINDOWEVENT_FOCUS_GAINED event.
  • Only by clicking on the title bar of another window and then back
    on the title bar of my window do I finally receive my
    SDL_WINDOWEVENT_FOCUS_GAINED event and the SDL_WINDOW_INPUT_FOCUS flag.

The behavior in SDL 2.0.1 was annoying enough, but the behavior in SDL
2.0.2 is just intolerable.–
Rainer Deyke (rainerd at eldwood.com)

The behavior in SDL 2.0.1 was annoying enough, but the behavior in SDL
2.0.2 is just intolerable.

What platform (and if X11, what window manager)?

–ryan.

Linux Mint (64 bit), Cinnamon.On 08.03.2014 21:26, Ryan C. Gordon wrote:

The behavior in SDL 2.0.1 was annoying enough, but the behavior in SDL
2.0.2 is just intolerable.

What platform (and if X11, what window manager)?


Rainer Deyke (rainerd at eldwood.com)

I can’t cross-compile SDL 2.0.2 for Windows because SDL_windowsvideo.c
unconditionally includes DXGI.h, which I don’t have.

Operating system: Linux Mint 16.
Compiler: i686-w64-mingw32-gcc (GCC) 4.6.3
Exact error message:
/home/rainer/projects/starfire/intermediate/libs/SDL2/SDL2-2.0.2/src/video/windows/SDL_windowsvideo.c:250:18:
fatal error: DXGI.h: No such file or directory
compilation terminated.–
Rainer Deyke (rainerd at eldwood.com)

Do you have dxgi.h? We just changed the case of the include.On Sun, Mar 9, 2014 at 9:01 AM, Rainer Deyke wrote:

I can’t cross-compile SDL 2.0.2 for Windows because SDL_windowsvideo.c
unconditionally includes DXGI.h, which I don’t have.

Operating system: Linux Mint 16.
Compiler: i686-w64-mingw32-gcc (GCC) 4.6.3
Exact error message: /home/rainer/projects/starfire/intermediate/libs/
SDL2/SDL2-2.0.2/src/video/windows/SDL_windowsvideo.c:250:18: fatal error:
DXGI.h: No such file or directory
compilation terminated.


Rainer Deyke (rainerd at eldwood.com)


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Yeah, the latest hg compiles without errors.On 09.03.2014 18:32, Sam Lantinga wrote:

Do you have dxgi.h? We just changed the case of the include.


Rainer Deyke (rainerd at eldwood.com)

Great. :)On Sun, Mar 9, 2014 at 12:09 PM, Rainer Deyke wrote:

On 09.03.2014 18:32, Sam Lantinga wrote:

Do you have dxgi.h? We just changed the case of the include.

Yeah, the latest hg compiles without errors.


Rainer Deyke (rainerd at eldwood.com)


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org