1
0
mirror of synced 2025-01-18 09:04:52 +01:00

fix: Multiwindow support not being disabled by default on Linux

This commit is contained in:
WerWolv 2023-06-26 09:02:23 +02:00
parent af147b4f54
commit 9282f1fe75
2 changed files with 8 additions and 8 deletions

View File

@ -934,13 +934,7 @@ namespace hex {
io.FontGlobalScale = 1.0F;
if (glfwGetPrimaryMonitor() != nullptr) {
#if defined (OS_LINUX)
constexpr static auto MultiWindowSupportEnabledDefault = 0;
#else
constexpr static auto MultiWindowSupportEnabledDefault = 1;
#endif
bool multiWindowEnabled = ContentRegistry::Settings::read("hex.builtin.setting.interface", "hex.builtin.setting.interface.multi_windows", MultiWindowSupportEnabledDefault) != 0;
bool multiWindowEnabled = ContentRegistry::Settings::read("hex.builtin.setting.interface", "hex.builtin.setting.interface.multi_windows", 0) != 0;
if (multiWindowEnabled)
io.ConfigFlags |= ImGuiConfigFlags_ViewportsEnable;

View File

@ -263,7 +263,13 @@ namespace hex::plugin::builtin {
return false;
});
ContentRegistry::Settings::add("hex.builtin.setting.interface", "hex.builtin.setting.interface.multi_windows", 1, [](auto name, nlohmann::json &setting) {
#if defined (OS_LINUX)
constexpr static auto MultiWindowSupportEnabledDefault = 0;
#else
constexpr static auto MultiWindowSupportEnabledDefault = 1;
#endif
ContentRegistry::Settings::add("hex.builtin.setting.interface", "hex.builtin.setting.interface.multi_windows", MultiWindowSupportEnabledDefault, [](auto name, nlohmann::json &setting) {
static bool enabled = static_cast<int>(setting);
if (ImGui::Checkbox(name.data(), &enabled)) {