Skip to content

Commit

Permalink
merged SDL 2.0.4 rc2
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric Wing committed Jun 21, 2015
2 parents 27fab8f + 4393a71 commit d77a557
Show file tree
Hide file tree
Showing 13 changed files with 222 additions and 179 deletions.
14 changes: 2 additions & 12 deletions .hgignore
Expand Up @@ -9,8 +9,6 @@ sdl-config
SDL2.spec
build
Build
*xcuserdata*
*xcworkspacedata*

# for Xcode
*.orig
Expand All @@ -20,20 +18,12 @@ Build
*~
*.o
*.mode1*
*.model*
*.perspective*
*.perspective*
*.pbxuser
(^|/)build($|/)
.DS_Store
Xcode/SDL/SDL.xcodeproj/xcuserdata
Xcode/SDL/SDL.xcodeproj/project.xcworkspace
Xcode/SDLTest/SDLTest.xcodeproj/xcuserdata
Xcode/SDLTest/SDLTest.xcodeproj/project.xcworkspace
Xcode-iOS/SDL/SDL.xcodeproj/xcuserdata
Xcode-iOS/SDL/SDL.xcodeproj/project.xcworkspace
Xcode-iOS/Demos/Demos.xcodeproj/xcuserdata
Xcode-iOS/Demos/Demos.xcodeproj/project.xcworkspace
xcuserdata
*.xcworkspace

# for Visual C++
Debug
Expand Down
21 changes: 15 additions & 6 deletions CMakeLists.txt
Expand Up @@ -900,10 +900,12 @@ elseif(WINDOWS)

# Check for DirectX
if(DIRECTX)
if("$ENV{DXSDK_DIR}" STREQUAL "")
message_error("DIRECTX requires the \$DXSDK_DIR environment variable to be set")
if(NOT CMAKE_COMPILER_IS_MINGW)
if("$ENV{DXSDK_DIR}" STREQUAL "")
message_error("DIRECTX requires the \$DXSDK_DIR environment variable to be set")
endif()
set(CMAKE_REQUIRED_FLAGS "/I\"$ENV{DXSDK_DIR}\\Include\"")
endif()
set(CMAKE_REQUIRED_FLAGS "/I\"$ENV{DXSDK_DIR}\\Include\"")
check_include_file(d3d9.h HAVE_D3D_H)
check_include_file(d3d11_1.h HAVE_D3D11_H)
check_include_file(ddraw.h HAVE_DDRAW_H)
Expand All @@ -914,9 +916,11 @@ elseif(WINDOWS)
check_include_file(dxgi.h HAVE_DXGI_H)
if(HAVE_D3D_H OR HAVE_D3D11_H OR HAVE_DDRAW_H OR HAVE_DSOUND_H OR HAVE_DINPUT_H OR HAVE_XAUDIO2_H)
set(HAVE_DIRECTX TRUE)
if(NOT CMAKE_COMPILER_IS_MINGW)
# TODO: change $ENV{DXSDL_DIR} to get the path from the include checks
link_directories($ENV{DXSDK_DIR}\\lib\\${PROCESSOR_ARCH})
include_directories($ENV{DXSDK_DIR}\\Include)
link_directories($ENV{DXSDK_DIR}\\lib\\${PROCESSOR_ARCH})
include_directories($ENV{DXSDK_DIR}\\Include)
endif()
endif()
set(CMAKE_REQUIRED_FLAGS ${ORIG_CMAKE_REQUIRED_FLAGS})
endif()
Expand Down Expand Up @@ -1020,7 +1024,12 @@ elseif(WINDOWS)
set(SOURCE_FILES ${SOURCE_FILES} ${JOYSTICK_SOURCES})
if(HAVE_DINPUT_H)
set(SDL_JOYSTICK_DINPUT 1)
list(APPEND EXTRA_LIBS dinput8 dxguid dxerr)
list(APPEND EXTRA_LIBS dinput8 dxguid)
if(CMAKE_COMPILER_IS_MINGW)
list(APPEND EXTRA_LIBS dxerr8)
else()
list(APPEND EXTRA_LIBS dxerr)
endif()
endif()
if(HAVE_XINPUT_H)
set(SDL_JOYSTICK_XINPUT 1)
Expand Down
2 changes: 1 addition & 1 deletion Makefile.in
Expand Up @@ -39,7 +39,7 @@ SDLMAIN_OBJECTS = @SDLMAIN_OBJECTS@
SDLTEST_TARGET = libSDL2_test.a
SDLTEST_OBJECTS = @SDLTEST_OBJECTS@

SRC_DIST = *.txt acinclude Android.mk autogen.sh android-project build-scripts cmake configure configure.in debian include Makefile.* sdl2-config.in sdl2.m4 sdl2.pc.in SDL2.spec.in src test VisualC.html VisualC Xcode Xcode-iOS
SRC_DIST = *.txt acinclude Android.mk autogen.sh android-project build-scripts cmake cmake_uninstall.cmake.in configure configure.in debian docs include Makefile.* sdl2-config.in sdl2.m4 sdl2.pc.in SDL2.spec.in src test VisualC.html VisualC VisualC-WinRT Xcode Xcode-iOS
GEN_DIST = SDL2.spec

ifneq ($V,1)
Expand Down
15 changes: 15 additions & 0 deletions WhatsNew.txt
Expand Up @@ -27,7 +27,10 @@ General:
* Added a Vivante video driver that is used on various SoC platforms
* Added an event SDL_RENDER_DEVICE_RESET that is sent from the D3D renderers when the D3D device is lost, and from Android's event loop when the GLES context had to be recreated
* Added a hint SDL_HINT_NO_SIGNAL_HANDLERS to disable SDL's built in signal handling
* Added a hint SDL_HINT_THREAD_STACK_SIZE to set the stack size of SDL's threads
* Added SDL_sqrtf(), SDL_tan(), and SDL_tanf() to the stdlib routines
* Improved support for WAV and BMP files with unusual chunks in them
* Renamed SDL_assert_data to SDL_AssertData and SDL_assert_state to SDL_AssertState

Windows:
* Added support for Windows Phone 8.1
Expand All @@ -39,11 +42,15 @@ Windows:
* SDL_SysWMinfo now contains the window HDC
* Added support for Unicode command line options
* Prevent beeping when Alt-key combos are pressed
* SDL_SetTextInputRect() re-positions the OS-rendered IME

Mac OS X:
* Implemented drag-and-drop support
* Improved joystick hot-plug detection
* The SDL_WINDOWEVENT_EXPOSED window event is triggered in the appropriate situations
* Fixed relative mouse mode when the application loses/regains focus
* Fixed bugs related to transitioning to and from Spaces-aware fullscreen-desktop mode
* Fixed the refresh rate of display modes
* SDL_SysWMInfo is now ARC-compatible

Linux:
Expand All @@ -55,6 +62,14 @@ Linux:

iOS:
* Added support for iOS 8
* Added support for the hint SDL_HINT_ACCELEROMETER_AS_JOYSTICK
* Added sRGB OpenGL ES context support on iOS 7+
* Added native resolution support for the iPhone 6 Plus
* The SDL_WINDOW_ALLOW_HIGHDPI window flag now enables high-dpi support, and SDL_GL_GetDrawableSize() or SDL_GetRendererOutputSize() gets the window resolution in pixels
* SDL_GetWindowSize() and display mode sizes are in the "DPI-independent points" coordinate space rather than pixels (matches OS X behavior)
* SDL_SysWMinfo now contains the OpenGL ES framebuffer and color renderbuffer objects used by the window's active GLES view
* Fixed various rotation and orientation issues
* Fixed memory leaks

Android:
* Added a hint SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH to prevent mouse events from being registered as touch events
Expand Down
38 changes: 0 additions & 38 deletions configure
Expand Up @@ -18701,43 +18701,6 @@ $as_echo "$need_gcc_Wno_multichar" >&6; }
fi
}

CheckWarnShadow()
{
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC -Wshadow option" >&5
$as_echo_n "checking for GCC -Wshadow option... " >&6; }
have_gcc_Wshadow=no

save_CFLAGS="$CFLAGS"
CFLAGS="$save_CFLAGS -Wshadow"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */

int x = 0;

int
main ()
{


;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

have_gcc_Wshadow=yes

fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_Wshadow" >&5
$as_echo "$have_gcc_Wshadow" >&6; }
CFLAGS="$save_CFLAGS"

if test x$have_gcc_Wshadow = xyes; then
EXTRA_CFLAGS="$EXTRA_CFLAGS -Wshadow"
fi
}

CheckWayland()
{
# Check whether --enable-video-wayland was given.
Expand Down Expand Up @@ -23652,7 +23615,6 @@ $as_echo "#define SDL_TIMER_UNIX 1" >>confdefs.h
esac

CheckWarnAll
CheckWarnShadow

# Verify that we have all the platform specific files we need

Expand Down
23 changes: 0 additions & 23 deletions configure.in
Expand Up @@ -1159,28 +1159,6 @@ CheckWarnAll()
fi
}

dnl See if GCC's -Wshadow is supported.
CheckWarnShadow()
{
AC_MSG_CHECKING(for GCC -Wshadow option)
have_gcc_Wshadow=no

save_CFLAGS="$CFLAGS"
CFLAGS="$save_CFLAGS -Wshadow"
AC_TRY_COMPILE([
int x = 0;
],[
],[
have_gcc_Wshadow=yes
])
AC_MSG_RESULT($have_gcc_Wshadow)
CFLAGS="$save_CFLAGS"

if test x$have_gcc_Wshadow = xyes; then
EXTRA_CFLAGS="$EXTRA_CFLAGS -Wshadow"
fi
}

dnl Check for Wayland
CheckWayland()
{
Expand Down Expand Up @@ -3415,7 +3393,6 @@ esac

dnl Do this on all platforms, after everything else.
CheckWarnAll
CheckWarnShadow

# Verify that we have all the platform specific files we need

Expand Down
3 changes: 2 additions & 1 deletion docs/README-dynapi.md
@@ -1,6 +1,7 @@
Dynamic API
================================================================================
Originally posted by Ryan at https://plus.google.com/103391075724026391227/posts/TB8UfnDYu4U
Originally posted by Ryan at:
https://plus.google.com/103391075724026391227/posts/TB8UfnDYu4U

Background:

Expand Down
1 change: 1 addition & 0 deletions include/SDL_config_android.h
Expand Up @@ -104,6 +104,7 @@
#define HAVE_SETJMP 1
#define HAVE_NANOSLEEP 1
#define HAVE_SYSCONF 1
#define HAVE_CLOCK_GETTIME 1

#define SIZEOF_VOIDP 4

Expand Down
4 changes: 4 additions & 0 deletions src/render/SDL_render.c
Expand Up @@ -1771,6 +1771,10 @@ SDL_RenderCopyEx(SDL_Renderer * renderer, SDL_Texture * texture,
SDL_FRect frect;
SDL_FPoint fcenter;

if (flip == SDL_FLIP_NONE && angle == 0) { /* fast path when we don't need rotation or flipping */
return SDL_RenderCopy(renderer, texture, srcrect, dstrect);
}

CHECK_RENDERER_MAGIC(renderer, -1);
CHECK_TEXTURE_MAGIC(texture, -1);

Expand Down

0 comments on commit d77a557

Please sign in to comment.