Don't show GPU checkbox in preferences dialog

This option is only available in ENABLE_DEVMODE, regression from
31c80a5e0c.
This commit is contained in:
David Capello 2024-09-23 15:04:11 -03:00
parent c697a8767b
commit 4e2488534f

View File

@ -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()) {