From ab1ed6038406492b7d60036c3b9c5d46e7e0f754 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 10 Dec 2015 16:09:39 +0300 Subject: Reorder defines in renderers. --- src/render/renderers.cpp | 45 ++++++++++++++++++++++++++++++++++++--------- 1 file changed, 36 insertions(+), 9 deletions(-) (limited to 'src/render/renderers.cpp') diff --git a/src/render/renderers.cpp b/src/render/renderers.cpp index 7af602548..ce5174859 100644 --- a/src/render/renderers.cpp +++ b/src/render/renderers.cpp @@ -41,29 +41,56 @@ RenderType intToRenderType(const int mode) return getDefault(); if (mode != RENDER_SOFTWARE -#if defined(USE_OPENGL) && defined(ANDROID) && defined(USE_SDL2) +#if defined(USE_OPENGL) + +// with OpenGL start +#if defined(ANDROID) + +// with OpenGL + with ANDROID start +#if defined(USE_SDL2) && mode != RENDER_GLES_OPENGL && mode != RENDER_SDL2_DEFAULT) -#elif defined(USE_OPENGL) && defined(ANDROID) && !defined(USE_SDL2) +#else // defined(USE_SDL2) + && mode != RENDER_GLES_OPENGL) -#elif defined(USE_OPENGL) && !defined(ANDROID) && defined(USE_SDL2) +#endif // defined(USE_SDL2) +// with OpenGL + with ANDROID end + +#else // defined(ANDROID) + +// with OpenGL + without ANDROID start +#if defined(USE_SDL2) && mode != RENDER_NORMAL_OPENGL && mode != RENDER_MODERN_OPENGL && mode != RENDER_SAFE_OPENGL && mode != RENDER_GLES_OPENGL && mode != RENDER_GLES2_OPENGL && mode != RENDER_SDL2_DEFAULT) -#elif !defined(USE_OPENGL) && defined(USE_SDL2) - && mode != RENDER_SDL2_DEFAULT) -#elif !defined(USE_OPENGL) && !defined(USE_SDL2) - ) -#elif defined(USE_OPENGL) && !defined(ANDROID) && !defined(USE_SDL2) +#else // defined(USE_SDL2) + && mode != RENDER_NORMAL_OPENGL && mode != RENDER_MODERN_OPENGL && mode != RENDER_SAFE_OPENGL && mode != RENDER_GLES_OPENGL && mode != RENDER_GLES2_OPENGL) -#endif +#endif // defined(USE_SDL2) +// with OpenGL + without ANDROID end + +#endif // defined(ANDROID) +// with OpenGL end + +#else // defined(USE_OPENGL) + +// without OpenGL start +#if defined(USE_SDL2) + && mode != RENDER_SDL2_DEFAULT) +#elif !defined(USE_SDL2) + ) +#endif // defined(USE_SDL2) +// without OpenGL end + +#endif // defined(USE_OPENGL) + { return getDefault(); } -- cgit v1.2.3-70-g09d2