summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gui/widgets/tabs/setup_video.cpp6
-rw-r--r--src/progs/manaplus/actions/actions.cpp9
-rw-r--r--src/progs/manaplus/client.cpp7
-rw-r--r--src/render/modernopenglgraphics.cpp8
-rw-r--r--src/render/modernopenglgraphics.h5
-rw-r--r--src/render/normalopenglgraphics.h9
6 files changed, 24 insertions, 20 deletions
diff --git a/src/gui/widgets/tabs/setup_video.cpp b/src/gui/widgets/tabs/setup_video.cpp
index f938f31f5..ff1c781a3 100644
--- a/src/gui/widgets/tabs/setup_video.cpp
+++ b/src/gui/widgets/tabs/setup_video.cpp
@@ -84,13 +84,13 @@ Setup_Video::Setup_Video(const Widget2 *const widget) :
mAltFpsSlider(new Slider(this, 2.0, 160.0, 1.0)),
// TRANSLATORS: video settings label
mAltFpsLabel(new Label(this, _("Alt FPS limit: "))),
-#if !defined(ANDROID) && !defined(__APPLE__) && \
- !defined(__native_client__) && !defined(__SWITCH__)
+#if !defined(ANDROID) && !defined(__APPLE__)
+#if !defined(__native_client__) && !defined(__SWITCH__)
// TRANSLATORS: video settings button
mDetectButton(new Button(this, _("Detect best mode"), "detect",
BUTTON_SKIN, this)),
+#endif // !defined(__native_client__) && !defined(__SWITCH__)
#endif // !defined(ANDROID) && !defined(__APPLE__) &&
- // !defined(__native_client__)
mDialog(nullptr),
mCustomCursorEnabled(config.getBoolValue("customcursor")),
mEnableResize(config.getBoolValue("enableresize")),
diff --git a/src/progs/manaplus/actions/actions.cpp b/src/progs/manaplus/actions/actions.cpp
index c367b01ee..6f9bf56b9 100644
--- a/src/progs/manaplus/actions/actions.cpp
+++ b/src/progs/manaplus/actions/actions.cpp
@@ -1528,11 +1528,12 @@ impHandler(dumpTests)
impHandler0(dumpOGL)
{
-#if defined(USE_OPENGL) && !defined(ANDROID) && !defined(__native_client__) \
- && !defined(__SWITCH__)
+#ifdef USE_OPENGL
+#if !defined(ANDROID) && !defined(__native_client__) && !defined(__SWITCH__)
NormalOpenGLGraphics::dumpSettings();
-#endif // defined(USE_OPENGL) && !defined(ANDROID) &&
- // !defined(__native_client__)
+#endif // !defined(ANDROID) && !defined(__native_client__) &&
+ // !defined(__SWITCH__)
+#endif // USE_OPENGL
return true;
}
diff --git a/src/progs/manaplus/client.cpp b/src/progs/manaplus/client.cpp
index 8670ae4ab..0fb971c61 100644
--- a/src/progs/manaplus/client.cpp
+++ b/src/progs/manaplus/client.cpp
@@ -411,8 +411,8 @@ void Client::gameInit()
Cpu::detect();
DyePalette::initFunctions();
#if defined(USE_OPENGL)
-#if !defined(ANDROID) && !defined(__APPLE__) && \
- !defined(__native_client__) && !defined(__SWITCH__) && !defined(UNITTESTS)
+#if !defined(ANDROID) && !defined(__APPLE__)
+#if !defined(__native_client__) && !defined(__SWITCH__) && !defined(UNITTESTS)
if (!settings.options.safeMode &&
settings.options.renderer < 0 &&
settings.options.test.empty() &&
@@ -421,8 +421,9 @@ void Client::gameInit()
{
graphicsManager.detectVideoSettings();
}
+#endif // !defined(__native_client__) && !defined(__SWITCH__) &&
+ // !defined(UNITTESTS)
#endif // !defined(ANDROID) && !defined(__APPLE__) &&
- // !defined(__native_client__) && !defined(UNITTESTS)
#endif // defined(USE_OPENGL)
initGraphics();
diff --git a/src/render/modernopenglgraphics.cpp b/src/render/modernopenglgraphics.cpp
index 5f2fd7ddd..e99f9440c 100644
--- a/src/render/modernopenglgraphics.cpp
+++ b/src/render/modernopenglgraphics.cpp
@@ -20,8 +20,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#if defined(USE_OPENGL) && !defined(ANDROID) && !defined(__native_client__) \
- && !defined(__SWITCH__)
+#ifdef USE_OPENGL
+#if !defined(ANDROID) && !defined(__native_client__) && !defined(__SWITCH__)
#include "render/modernopenglgraphics.h"
@@ -1402,5 +1402,5 @@ void ModernOpenGLGraphics::debugBindTexture(const Image *restrict const
}
#endif // DEBUG_BIND_TEXTURE
-#endif // defined(USE_OPENGL) && !defined(ANDROID) &&
- // !defined(__native_client__)
+#endif // !defined(ANDROID) && !defined(__native_client__) && !defined(__SWITCH__)
+#endif // USE_OPENGL
diff --git a/src/render/modernopenglgraphics.h b/src/render/modernopenglgraphics.h
index d5a9baf88..4362ea20d 100644
--- a/src/render/modernopenglgraphics.h
+++ b/src/render/modernopenglgraphics.h
@@ -23,8 +23,8 @@
#ifndef RENDER_MODERNOPENGLGRAPHICS_H
#define RENDER_MODERNOPENGLGRAPHICS_H
-#if defined(USE_OPENGL) && !defined(ANDROID) && \
- !defined(__native_client__) && !defined(__SWITCH__)
+#ifdef USE_OPENGL
+#if !defined(ANDROID) && !defined(__native_client__) && !defined(__SWITCH__)
#include "localconsts.h"
@@ -156,5 +156,6 @@ class ModernOpenGLGraphics final : public Graphics
};
#endif // defined(USE_OPENGL) && !defined(ANDROID) &&
// !defined(__native_client__)
+#endif // USE_OPENGL
#endif // RENDER_MODERNOPENGLGRAPHICS_H
diff --git a/src/render/normalopenglgraphics.h b/src/render/normalopenglgraphics.h
index 9964a61b8..8d3b23180 100644
--- a/src/render/normalopenglgraphics.h
+++ b/src/render/normalopenglgraphics.h
@@ -23,8 +23,8 @@
#ifndef RENDER_NORMALOPENGLGRAPHICS_H
#define RENDER_NORMALOPENGLGRAPHICS_H
-#if defined USE_OPENGL && !defined ANDROID && \
- !defined(__native_client__) && !defined(__SWITCH__)
+#ifdef USE_OPENGL
+#if !defined(ANDROID) && !defined(__native_client__) && !defined(__SWITCH__)
#include "localconsts.h"
@@ -128,7 +128,8 @@ class NormalOpenGLGraphics final : public Graphics
FBOInfo mFbo;
};
-#endif // defined USE_OPENGL && !defined ANDROID &&
- // !defined(__native_client__)
+#endif // !defined ANDROID && !defined(__native_client__) &&
+ // !defined(__SWITCH__)
+#endif // USE_OPENGL
#endif // RENDER_NORMALOPENGLGRAPHICS_H