Skip to content

Commit

Permalink
Merge pull request colobot#1562 from olokos/dev
Browse files Browse the repository at this point in the history
Fix For MSVC2022 and Background Pause blur
  • Loading branch information
tomaszkax86 committed Mar 11, 2023
2 parents 0df78e7 + f60c62f commit 24622e6
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions cmake/FindSDL2.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ endif()
# SDL-2.0 is the name used by FreeBSD ports...
# don't confuse it for the version number.
find_library(SDL2_LIBRARY
NAMES SDL2 SDL-2.0
NAMES SDL2 SDL-2.0 SDL2-static
HINTS
ENV SDL2DIR
${SDL2_NO_DEFAULT_PATH_CMD}
Expand Down Expand Up @@ -223,7 +223,7 @@ if(NOT SDL2_BUILDING_LIBRARY)
HINTS
ENV SDL2DIR
${SDL2_NO_DEFAULT_PATH_CMD}
PATH_SUFFIXES lib ${VC_LIB_PATH_SUFFIX}
PATH_SUFFIXES lib lib/manual-link ${VC_LIB_PATH_SUFFIX}
PATHS ${SDL2MAIN_LIBRARY_PATHS}
DOC "Where the SDL2main library can be found"
)
Expand Down
2 changes: 1 addition & 1 deletion cmake/FindSDL2_image.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ endif()

# Search for the SDL2_image library
find_library(SDL2_IMAGE_LIBRARY
NAMES SDL2_image
NAMES SDL2_image SDL2_image-static
HINTS
ENV SDL2IMAGEDIR
ENV SDL2DIR
Expand Down
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Compile flags as defined in global CMakeLists
set(CMAKE_CXX_FLAGS "${COLOBOT_CXX_FLAGS}")
set(CMAKE_CXX_FLAGS ${COLOBOT_CXX_FLAGS})
set(CMAKE_CXX_FLAGS_RELEASE ${COLOBOT_CXX_FLAGS_RELEASE})
set(CMAKE_CXX_FLAGS_DEBUG ${COLOBOT_CXX_FLAGS_DEBUG})

Expand Down
3 changes: 2 additions & 1 deletion src/graphics/engine/engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3599,7 +3599,8 @@ void CEngine::Capture3DScene()

// create SDL surface and final texture
ImageData image;
image.surface = SDL_CreateRGBSurfaceFrom(blured.get(), newWidth, newHeight, 32, 0, 0, 0, 0, 0xFF000000);
image.surface = SDL_CreateRGBSurfaceFrom(blured.get(), newWidth, newHeight,
32, 4 * newWidth, 0x000000FF, 0x0000FF00, 0x00FF0000, 0xFF000000);

TextureCreateParams params;
params.filter = TEX_FILTER_BILINEAR;
Expand Down

0 comments on commit 24622e6

Please sign in to comment.