From 4e2488534fa9c6988a880fcd8b831063a15ee822 Mon Sep 17 00:00:00 2001 From: David Capello Date: Mon, 23 Sep 2024 15:04:11 -0300 Subject: [PATCH] Don't show GPU checkbox in preferences dialog This option is only available in ENABLE_DEVMODE, regression from 31c80a5e0c8724635eff173a64b88604de595367. --- src/app/commands/cmd_options.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/app/commands/cmd_options.cpp b/src/app/commands/cmd_options.cpp index f8db29bbf..83154d0be 100644 --- a/src/app/commands/cmd_options.cpp +++ b/src/app/commands/cmd_options.cpp @@ -375,11 +375,13 @@ public: uiWindows()->setSelectedItem(multipleWindows()->isSelected() ? 1: 0); }); -#ifndef ENABLE_DEVMODE // TODO enable this on Release when Aseprite supports - // GPU-acceleration properly +#ifdef ENABLE_DEVMODE // TODO enable this on Release when Aseprite supports + // GPU-acceleration properly if (!os::instance()->hasCapability(os::Capabilities::GpuAccelerationSwitch)) - gpuAcceleration()->setVisible(false); #endif + { + gpuAcceleration()->setVisible(false); + } // If the platform does support native menus, we show the option, // in other case, the option doesn't make sense for this platform. @@ -635,9 +637,11 @@ public: // Scaling selectScalingItems(); +#ifdef ENABLE_DEVMODE if (os::instance()->hasCapability(os::Capabilities::GpuAccelerationSwitch)) { gpuAcceleration()->setSelected(m_pref.general.gpuAcceleration()); } +#endif if (os::instance()->menus()) showMenuBar()->setSelected(m_pref.general.showMenuBar()); @@ -904,11 +908,13 @@ public: reset_screen = true; } +#ifdef ENABLE_DEVMODE const bool newGpuAccel = gpuAcceleration()->isSelected(); if (newGpuAccel != m_pref.general.gpuAcceleration()) { m_pref.general.gpuAcceleration(newGpuAccel); reset_screen = true; } +#endif if (os::instance()->menus() && m_pref.general.showMenuBar() != showMenuBar()->isSelected()) {