Skip to content

Commit

Permalink
Merge pull request #473 from aginor/sdl2graphics
Browse files Browse the repository at this point in the history
Fix cmake on OSX and fix alpha blending issue with SDL2 while scrolling
  • Loading branch information
irydacea committed Aug 24, 2015
2 parents bd6f488 + 75035a0 commit d9d57cf
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cmake/FindSDL2.cmake
Expand Up @@ -214,7 +214,7 @@ if(SDL2_INCLUDE_DIR AND EXISTS "${SDL2_INCLUDE_DIR}/SDL_version.h")
unset(SDL_VERSION_PATCH)
endif()

#include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
include(FindPackageHandleStandardArgs)

FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDL2
REQUIRED_VARS SDL2_LIBRARY SDL2_INCLUDE_DIR
Expand Down
1 change: 1 addition & 0 deletions cmake/FindSDL2_image.cmake
Expand Up @@ -117,6 +117,7 @@ endif()
set(SDL2_IMAGE_LIBRARIES ${SDL2_IMAGE_LIBRARY})
set(SDL2_IMAGE_INCLUDE_DIRS ${SDL2_IMAGE_INCLUDE_DIR})

include(FindPackageHandleStandardArgs)

FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDL2_image
REQUIRED_VARS SDL2_IMAGE_LIBRARIES SDL2_IMAGE_INCLUDE_DIRS
Expand Down
2 changes: 2 additions & 0 deletions cmake/FindSDL2_mixer.cmake
Expand Up @@ -117,6 +117,8 @@ endif()
set(SDL2_MIXER_LIBRARIES ${SDL2_MIXER_LIBRARY})
set(SDL2_MIXER_INCLUDE_DIRS ${SDL2_MIXER_INCLUDE_DIR})

include(FindPackageHandleStandardArgs)

FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDL2_mixer
REQUIRED_VARS SDL2_MIXER_LIBRARIES SDL2_MIXER_INCLUDE_DIRS
VERSION_VAR SDL2_MIXER_VERSION_STRING)
Expand Down
2 changes: 2 additions & 0 deletions cmake/FindSDL2_net.cmake
Expand Up @@ -116,6 +116,8 @@ endif()
set(SDL2_NET_LIBRARIES ${SDL2_NET_LIBRARY})
set(SDL2_NET_INCLUDE_DIRS ${SDL2_NET_INCLUDE_DIR})

include(FindPackageHandleStandardArgs)

FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDL2_net
REQUIRED_VARS SDL2_NET_LIBRARIES SDL2_NET_INCLUDE_DIRS
VERSION_VAR SDL2_NET_VERSION_STRING)
Expand Down
2 changes: 2 additions & 0 deletions cmake/FindSDL2_ttf.cmake
Expand Up @@ -116,6 +116,8 @@ endif()
set(SDL2_TTF_LIBRARIES ${SDL2_TTF_LIBRARY})
set(SDL2_TTF_INCLUDE_DIRS ${SDL2_TTF_INCLUDE_DIR})

include(FindPackageHandleStandardArgs)

FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDL2_ttf
REQUIRED_VARS SDL2_TTF_LIBRARIES SDL2_TTF_INCLUDE_DIRS
VERSION_VAR SDL2_TTF_VERSION_STRING)
Expand Down
1 change: 1 addition & 0 deletions src/display.cpp
Expand Up @@ -2231,6 +2231,7 @@ bool display::scroll(int xmove, int ymove, bool force)
* the entire map. */
#if SDL_VERSION_ATLEAST(2,0,0)
surface screen_copy = make_neutral_surface(screen);
SDL_SetSurfaceBlendMode(screen_copy, SDL_BLENDMODE_NONE);
SDL_BlitSurface(screen_copy,&srcrect,screen,&dstrect);
#else
// Hack to workaround bug #17573
Expand Down

0 comments on commit d9d57cf

Please sign in to comment.