From dc21e1babea9a9806d68c8863b043b0f2a94fb19 Mon Sep 17 00:00:00 2001 From: Lorenzooone Date: Sat, 6 Dec 2025 23:31:45 +0100 Subject: [PATCH] Fix issue preventing reload of screen ratio --- include/libgpiod_compat.h | 2 +- source/WindowScreen.cpp | 4 ++-- source/utils.cpp | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/include/libgpiod_compat.h b/include/libgpiod_compat.h index 390b69c..1b7da2c 100644 --- a/include/libgpiod_compat.h +++ b/include/libgpiod_compat.h @@ -7,7 +7,7 @@ // time version is baffling... :/ // It's the basis of making a library... // Do they expect you to use dlopen? Is that what is going on? -#ifndef GPIOD_CTXLESS_FLAG_OPEN_DRAIN +#ifndef GPIOD_API #define LIBGPIOD3 #endif diff --git a/source/WindowScreen.cpp b/source/WindowScreen.cpp index b99b802..02cabf3 100755 --- a/source/WindowScreen.cpp +++ b/source/WindowScreen.cpp @@ -214,7 +214,7 @@ void WindowScreen::reload() { this->future_operations.call_rotate = true; this->future_operations.call_blur = true; this->future_operations.call_screen_settings_update = true; - if(this->m_win.isOpen()) + if(this->m_win.isOpen() || this->m_info.window_enabled) this->create_window(false); this->prepare_size_ratios(true, true); } @@ -293,7 +293,7 @@ void WindowScreen::draw(double frame_time, VideoOutputData* out_buf, InputVideoD if(this->m_win.isOpen() ^ should_be_open) { if(this->m_win.isOpen()) this->close(); - else + else if(!this->future_operations.call_create) this->open(); } if(!should_be_open) diff --git a/source/utils.cpp b/source/utils.cpp index aa80de2..2e86191 100755 --- a/source/utils.cpp +++ b/source/utils.cpp @@ -20,6 +20,7 @@ #include #include #include +#include #ifdef SFML_SYSTEM_ANDROID // Since we want to get the native activity from SFML, we'll have to use an