sys: Fixed compile issue on non-Windows

This commit is contained in:
WerWolv 2022-08-04 09:51:07 +02:00
parent be37228dc6
commit 0f8ac672f3
3 changed files with 9 additions and 1 deletions

View File

@ -128,7 +128,6 @@ struct ImGui_ImplGlfw_Data
bool WantUpdateMonitors; bool WantUpdateMonitors;
#ifdef _WIN32 #ifdef _WIN32
WNDPROC GlfwWndProc; WNDPROC GlfwWndProc;
bool BorderlessWindow; // IMHEX PATCH
#endif #endif
// Chain GLFW callbacks: our callbacks will call the user's previously installed callbacks, if any. // Chain GLFW callbacks: our callbacks will call the user's previously installed callbacks, if any.
@ -140,6 +139,7 @@ struct ImGui_ImplGlfw_Data
GLFWkeyfun PrevUserCallbackKey; GLFWkeyfun PrevUserCallbackKey;
GLFWcharfun PrevUserCallbackChar; GLFWcharfun PrevUserCallbackChar;
GLFWmonitorfun PrevUserCallbackMonitor; GLFWmonitorfun PrevUserCallbackMonitor;
bool BorderlessWindow; // IMHEX PATCH
ImGui_ImplGlfw_Data() { memset((void*)this, 0, sizeof(*this)); } ImGui_ImplGlfw_Data() { memset((void*)this, 0, sizeof(*this)); }
}; };

View File

@ -13,6 +13,8 @@
#include <sys/wait.h> #include <sys/wait.h>
#include <unistd.h> #include <unistd.h>
#include <imgui_impl_glfw.h>
namespace hex { namespace hex {
void Window::initNative() { void Window::initNative() {
@ -22,6 +24,8 @@ namespace hex {
} }
void Window::setupNativeWindow() { void Window::setupNativeWindow() {
ImGui_ImplGlfw_SetBorderlessWindowMode(false);
bool themeFollowSystem = ImHexApi::System::usesSystemThemeDetection(); bool themeFollowSystem = ImHexApi::System::usesSystemThemeDetection();
EventManager::subscribe<EventOSThemeChanged>(this, [themeFollowSystem] { EventManager::subscribe<EventOSThemeChanged>(this, [themeFollowSystem] {
if (!themeFollowSystem) return; if (!themeFollowSystem) return;

View File

@ -12,6 +12,8 @@
#include <nlohmann/json.hpp> #include <nlohmann/json.hpp>
#include <unistd.h> #include <unistd.h>
#include <imgui_impl_glfw.h>
namespace hex { namespace hex {
void Window::initNative() { void Window::initNative() {
@ -21,6 +23,8 @@ namespace hex {
} }
void Window::setupNativeWindow() { void Window::setupNativeWindow() {
ImGui_ImplGlfw_SetBorderlessWindowMode(false);
bool themeFollowSystem = ImHexApi::System::usesSystemThemeDetection(); bool themeFollowSystem = ImHexApi::System::usesSystemThemeDetection();
EventManager::subscribe<EventOSThemeChanged>(this, [themeFollowSystem] { EventManager::subscribe<EventOSThemeChanged>(this, [themeFollowSystem] {
if (!themeFollowSystem) return; if (!themeFollowSystem) return;