From 56c75170ef5ff0c2788211133e85a1164c7ae49a Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Mon, 14 Oct 2024 17:11:14 -0300 Subject: [PATCH 1/2] cmake: find SDL3 on linux --- CMakeLists.txt | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a17a843ef..d3ec6ff8a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -186,9 +186,15 @@ Please see https://github.com/love2d/megasource # required for enet add_definitions(-D HAS_SOCKLEN_T) - find_package(SDL2 2.0.9 REQUIRED CONFIG COMPONENTS SDL2main) - target_include_directories(lovedep::SDL INTERFACE ${SDL2_INCLUDE_DIRS}) - target_link_libraries(lovedep::SDL INTERFACE ${SDL2_LIBRARIES}) + if(LOVE_USE_SDL3) + find_package(SDL3 3.1.3 REQUIRED CONFIG) + target_include_directories(lovedep::SDL INTERFACE ${SDL3_INCLUDE_DIRS}) + target_link_libraries(lovedep::SDL INTERFACE ${SDL3_LIBRARIES}) + else() + find_package(SDL2 2.0.9 REQUIRED CONFIG COMPONENTS SDL2main) + target_include_directories(lovedep::SDL INTERFACE ${SDL2_INCLUDE_DIRS}) + target_link_libraries(lovedep::SDL INTERFACE ${SDL2_LIBRARIES}) + endif() find_package(Freetype REQUIRED) target_include_directories(lovedep::Freetype INTERFACE ${FREETYPE_INCLUDE_DIRS}) From b69a22dca399c51e0ac4e814619abd9cfa378304 Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Mon, 14 Oct 2024 17:37:56 -0300 Subject: [PATCH 2/2] sync window state in love.window.minimize --- src/modules/window/sdl/Window.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/modules/window/sdl/Window.cpp b/src/modules/window/sdl/Window.cpp index b3805d143..1a7580d28 100644 --- a/src/modules/window/sdl/Window.cpp +++ b/src/modules/window/sdl/Window.cpp @@ -1443,7 +1443,10 @@ bool Window::isDisplaySleepEnabled() const void Window::minimize() { if (window != nullptr) + { SDL_MinimizeWindow(window); + updateSettings(settings, true); + } } void Window::maximize()