Añadidos defines para compilar en raspberry pi

This commit is contained in:
2024-07-01 09:11:13 +02:00
parent 59671d6e55
commit b05e1c6025
3 changed files with 28 additions and 11 deletions

View File

@@ -178,8 +178,8 @@ bool Director::initSDL()
std::cout << "Warning: texture filtering not enabled!\n";
}
}
if (options->video.shaders || true)
#ifndef RASPI
if (options->video.shaders)
if (!SDL_SetHint(SDL_HINT_RENDER_DRIVER, "opengl"))
{
if (options->console)
@@ -187,7 +187,7 @@ bool Director::initSDL()
std::cout << "Warning: opengl not enabled!\n";
}
}
#endif
// Crea la ventana
int incW = 0;
int incH = 0;
@@ -213,13 +213,13 @@ bool Director::initSDL()
{
flags = flags | SDL_RENDERER_PRESENTVSYNC;
}
#ifndef RASPI
// La aceleración se activa según las opciones
if (options->video.shaders || true)
{
flags = flags | SDL_RENDERER_ACCELERATED | SDL_RENDERER_TARGETTEXTURE;
}
#endif
renderer = SDL_CreateRenderer(window, -1, flags);
if (renderer == nullptr)