Corregit un fallo amagat baix un ifdef ARCADE. Ja he posat que estiga definit per defecte pa que no torne a passar

This commit is contained in:
2024-10-20 15:43:10 +02:00
parent 848d61b5c0
commit 7434869894
2 changed files with 8 additions and 3 deletions

View File

@@ -39,7 +39,7 @@ namespace globalInputs
else else
{ {
#ifdef ARCADE #ifdef ARCADE
const int index = code == section::Options::QUIT_NORMAL ? 94 : 116; const int index = code == section::Options::QUIT_WITH_CONTROLLER ? 116 : 94;
Notifier::get()->showText(lang::getText(index), std::string(), -1, exit_code); Notifier::get()->showText(lang::getText(index), std::string(), -1, exit_code);
#else #else
Notifier::get()->showText(lang::getText(94), std::string(), -1, exit_code); Notifier::get()->showText(lang::getText(94), std::string(), -1, exit_code);

View File

@@ -38,9 +38,14 @@ Texture::Texture(SDL_Renderer *renderer, const std::string &path)
// .gif // .gif
else if (extension == "gif") else if (extension == "gif")
{ {
// Crea la surface desde un fichero
surface_ = loadSurface(path_); surface_ = loadSurface(path_);
addPaletteFromFile(path_);
setPaletteColor(0, 0, 0x00000000); // Añade la propia paleta del fichero a la lista
addPaletteFromFile(path_);
//setPaletteColor(0, 0, 0x00000000);
// Crea la textura, establece el BlendMode y copia la surface a la textura
createBlank(width_, height_, SDL_PIXELFORMAT_RGBA8888, SDL_TEXTUREACCESS_STREAMING); createBlank(width_, height_, SDL_PIXELFORMAT_RGBA8888, SDL_TEXTUREACCESS_STREAMING);
SDL_SetTextureBlendMode(texture_, SDL_BLENDMODE_BLEND); SDL_SetTextureBlendMode(texture_, SDL_BLENDMODE_BLEND);
flipSurface(); flipSurface();