summaryrefslogtreecommitdiff
path: root/src/render
diff options
context:
space:
mode:
Diffstat (limited to 'src/render')
-rw-r--r--src/render/renderers.cpp3
-rw-r--r--src/render/rendererslistsdl2.h33
2 files changed, 36 insertions, 0 deletions
diff --git a/src/render/renderers.cpp b/src/render/renderers.cpp
index c81ac9b57..efcad9ff2 100644
--- a/src/render/renderers.cpp
+++ b/src/render/renderers.cpp
@@ -41,6 +41,9 @@ static RenderType getDefault() noexcept2
RenderType intToRenderType(const int mode) noexcept2
{
+#ifdef __SWITCH__
+ return RENDER_SDL2_DEFAULT;
+#endif
if (mode < 0 || mode >= RENDER_LAST)
return getDefault();
diff --git a/src/render/rendererslistsdl2.h b/src/render/rendererslistsdl2.h
index 60202c2dd..b13324b2d 100644
--- a/src/render/rendererslistsdl2.h
+++ b/src/render/rendererslistsdl2.h
@@ -99,6 +99,39 @@ const int renderToIndex[] =
3 // RENDER_GLES2_OPENGL
};
+#elif defined(__SWITCH__)
+
+// map for index to RenderType
+const RenderType indexToRender[] =
+{
+ RENDER_SOFTWARE,
+ RENDER_SDL2_DEFAULT,
+ RENDER_MODERN_OPENGL
+};
+
+const char *OPENGL_NAME[] =
+{
+ // TRANSLATORS: draw backend
+ N_("Software"),
+ // TRANSLATORS: draw backend
+ N_("SDL2 default"),
+ // TRANSLATORS: draw backend
+ N_("Modern OpenGL")
+};
+
+const int renderModesListSize = 3;
+
+const int renderToIndex[] =
+{
+ 2, // RENDER_SOFTWARE
+ 2, // RENDER_NORMAL_OPENGL
+ 2, // RENDER_SAFE_OPENGL
+ 2, // RENDER_GLES_OPENGL
+ 1, // RENDER_SDL2_DEFAULT
+ 2, // RENDER_MODERN_OPENGL
+ 2 // RENDER_GLES2_OPENGL
+};
+
#else // ANDROID or nacl
// defined OPENGL