diff --git a/source/common/jshader.cpp b/source/common/jshader.cpp index 4615cfb..dc70fe3 100644 --- a/source/common/jshader.cpp +++ b/source/common/jshader.cpp @@ -1,4 +1,4 @@ -#ifndef RASPI +#ifndef NO_SHADERS #include "jshader.h" #include diff --git a/source/common/jshader.h b/source/common/jshader.h index a5c5bed..64652c3 100644 --- a/source/common/jshader.h +++ b/source/common/jshader.h @@ -1,4 +1,4 @@ -#ifndef RASPI +#ifndef NO_SHADERS #pragma once diff --git a/source/common/screen.cpp b/source/common/screen.cpp index b947e5a..88ae486 100644 --- a/source/common/screen.cpp +++ b/source/common/screen.cpp @@ -3,7 +3,7 @@ #include #include #include -#ifndef RASPI +#ifndef NO_SHADERS #include "jshader.h" #endif @@ -81,7 +81,7 @@ void Screen::blit() // Atenua la pantalla doAttenuate(); -#ifdef RASPI +#ifdef NO_SHADERS // Vuelve a dejar el renderizador en modo normal SDL_SetRenderTarget(renderer, nullptr); @@ -201,7 +201,7 @@ void Screen::setVideoMode(int videoMode) } } -#ifdef RASPI +#ifdef NO_SHADERS SDL_RenderSetLogicalSize(renderer, windowWidth, windowHeight); #else // Reinicia los shaders diff --git a/source/director.cpp b/source/director.cpp index 5184644..8cdd480 100644 --- a/source/director.cpp +++ b/source/director.cpp @@ -192,15 +192,14 @@ bool Director::initSDL() std::cout << "Warning: texture filtering not enabled!\n"; } } -#ifndef RASPI - //if (options->video.shaders) - if (!SDL_SetHint(SDL_HINT_RENDER_DRIVER, "opengl")) +#ifndef NO_SHADERS + if (!SDL_SetHint(SDL_HINT_RENDER_DRIVER, "opengl")) + { + if (options->console) { - if (options->console) - { - std::cout << "Warning: opengl not enabled!\n"; - } + std::cout << "Warning: opengl not enabled!\n"; } + } #endif // Crea la ventana int incW = 0; @@ -227,12 +226,9 @@ bool Director::initSDL() { flags = flags | SDL_RENDERER_PRESENTVSYNC; } -#ifndef RASPI - // La aceleración se activa según las opciones - //if (options->video.shaders) - { - flags = flags | SDL_RENDERER_ACCELERATED | SDL_RENDERER_TARGETTEXTURE; - } +#ifndef NO_SHADERS + // La aceleración se activa según el define + flags = flags | SDL_RENDERER_ACCELERATED | SDL_RENDERER_TARGETTEXTURE; #endif renderer = SDL_CreateRenderer(window, -1, flags);