diff options
author | cpasjuste <cpasjuste@gmail.com> | 2020-04-22 15:24:08 +0200 |
---|---|---|
committer | cpasjuste <cpasjuste@gmail.com> | 2020-04-22 15:24:08 +0200 |
commit | f43e3aa48aeb561f5c7e85f1b7121aab6a61decd (patch) | |
tree | 1c23a1e1db2676c27a99b6385f0580442b29f7a0 /src/render | |
parent | b0c696eaab501391512b08826c3c9a52023e2be7 (diff) | |
download | manaplus-f43e3aa48aeb561f5c7e85f1b7121aab6a61decd.tar.gz manaplus-f43e3aa48aeb561f5c7e85f1b7121aab6a61decd.tar.bz2 manaplus-f43e3aa48aeb561f5c7e85f1b7121aab6a61decd.tar.xz manaplus-f43e3aa48aeb561f5c7e85f1b7121aab6a61decd.zip |
switch: first commit
Diffstat (limited to 'src/render')
-rw-r--r-- | src/render/renderers.cpp | 3 | ||||
-rw-r--r-- | src/render/rendererslistsdl2.h | 33 |
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 |