From f9bd26214b85f409f6edb6d378d720656ff07553 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Fri, 12 Apr 2024 14:22:00 +0200 Subject: [PATCH] Use libraries v35 (#21771) --- CMakeLists.txt | 6 ++++-- openrct2.common.props | 4 ++-- openrct2.proj | 12 ++++++------ .../drawing/engines/SoftwareDrawingEngine.cpp | 5 +++++ 4 files changed, 17 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b309dc5a99..217ba76c56 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -125,12 +125,13 @@ if (APPIMAGE) endif () if (MACOS_USE_DEPENDENCIES) + message("Using OpenRCT2 dependencies instead of system libraries") # if we're building on macOS, then we need the dependencies include(cmake/download.cmake) - set(MACOS_DYLIBS_VERSION "33") + set(MACOS_DYLIBS_VERSION "35") set(MACOS_DYLIBS_ZIPFILE "openrct2-libs-v${MACOS_DYLIBS_VERSION}-universal-macos-dylibs.zip") - set(MACOS_DYLIBS_SHA1 "8b47f3a3603f3ad3a1ee292033d0daffe9a3e43c") + set(MACOS_DYLIBS_SHA1 "bed4340c32b6dbee9634ceaf19cb6b49a837aead") set(MACOS_DYLIBS_DIR "${ROOT_DIR}/lib/macos") set(MACOS_DYLIBS_URL "https://github.com/OpenRCT2/Dependencies/releases/download/v${MACOS_DYLIBS_VERSION}/${MACOS_DYLIBS_ZIPFILE}") @@ -147,6 +148,7 @@ if (MACOS_USE_DEPENDENCIES) # if we're making the OpenRCT2.app bundle, rpath will be handled by fixup_bundle # if we're building the CLI executable, we need to do it ourselves if (NOT MACOS_BUNDLE) + message("Setting rpath for macOS dylibs") # the RPATH to be used when installing, but only if it's not a system directory list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib" isSystemDir) if("${isSystemDir}" STREQUAL "-1") diff --git a/openrct2.common.props b/openrct2.common.props index a884253606..5091ca81a7 100644 --- a/openrct2.common.props +++ b/openrct2.common.props @@ -86,7 +86,7 @@ DebugFull - brotlicommon-static.lib;brotlidec-static.lib;brotlienc-static.lib;%(AdditionalDependencies) + brotlicommon.lib;brotlidec.lib;brotlienc.lib;%(AdditionalDependencies) libbreakpadd.lib;libbreakpad_clientd.lib;%(AdditionalDependencies) bz2d.lib;discord-rpc.lib;flac.lib;freetyped.lib;libpng16d.lib;ogg.lib;speexdsp.lib;SDL2-staticd.lib;vorbis.lib;vorbisfile.lib;zip.lib;zlibd.lib;%(AdditionalDependencies) @@ -107,7 +107,7 @@ DebugFull true true - brotlicommon-static.lib;brotlidec-static.lib;brotlienc-static.lib;%(AdditionalDependencies) + brotlicommon.lib;brotlidec.lib;brotlienc.lib;%(AdditionalDependencies) libbreakpad.lib;libbreakpad_client.lib;%(AdditionalDependencies) bz2.lib;discord-rpc.lib;flac.lib;freetype.lib;libpng16.lib;ogg.lib;speexdsp.lib;SDL2-static.lib;vorbis.lib;vorbisfile.lib;zip.lib;zlib.lib;%(AdditionalDependencies) diff --git a/openrct2.proj b/openrct2.proj index 7cd2c43a3a..98821665c7 100644 --- a/openrct2.proj +++ b/openrct2.proj @@ -37,12 +37,12 @@ $(RootDir).dependencies - https://github.com/OpenRCT2/Dependencies/releases/download/v34/openrct2-libs-v34-x86-windows-static.zip - 5173c04611c94da44af0db9e099edca2d6a7b829 - https://github.com/OpenRCT2/Dependencies/releases/download/v34/openrct2-libs-v34-x64-windows-static.zip - 930df83ef49d91b1ef886f5dbf0a9cb61d704a50 - https://github.com/OpenRCT2/Dependencies/releases/download/v34/openrct2-libs-v34-arm64-windows-static.zip - bd338aa3da9a357fb996dcaa6cea02c4f906718c + https://github.com/OpenRCT2/Dependencies/releases/download/v35/openrct2-libs-v35-arm64-windows-static.zip + 89f119395c4347f25427990eb47ea8f57bba95d8 + https://github.com/OpenRCT2/Dependencies/releases/download/v35/openrct2-libs-v35-x64-windows-static.zip + 1303b2423be26f40bdb75fa2c91f1bc7ef1de1ed + https://github.com/OpenRCT2/Dependencies/releases/download/v35/openrct2-libs-v35-x86-windows-static.zip + f3636b530110c7592deab23ca0d0c1916fc7e44c https://github.com/OpenRCT2/title-sequences/releases/download/v0.4.6/title-sequences.zip 80fefc6ebbabc42a6f4703412daa5c62f661420d https://github.com/OpenRCT2/objects/releases/download/v1.4.3/objects.zip diff --git a/src/openrct2-ui/drawing/engines/SoftwareDrawingEngine.cpp b/src/openrct2-ui/drawing/engines/SoftwareDrawingEngine.cpp index 1bacc91731..f0ad1fc27d 100644 --- a/src/openrct2-ui/drawing/engines/SoftwareDrawingEngine.cpp +++ b/src/openrct2-ui/drawing/engines/SoftwareDrawingEngine.cpp @@ -121,6 +121,10 @@ private: SDL_UnlockSurface(_surface); } +// On macOS with high DPI ("retina") screens this renders only to a quarter of the screen. +// A workaround is to always scale the surface, but that incurs an additonal copy. +// https://github.com/OpenRCT2/OpenRCT2/issues/21772 +#if defined(__APPLE__) // Copy the surface to the window if (gConfigGeneral.WindowScale == 1 || gConfigGeneral.WindowScale <= 0) { @@ -132,6 +136,7 @@ private: } } else +#endif { // first blit to rgba surface to change the pixel format if (SDL_BlitSurface(_surface, nullptr, _RGBASurface, nullptr))