From 7434869894eb82b9cff1b1e2f93f2e57dbe2a178 Mon Sep 17 00:00:00 2001 From: Sergio Valor Date: Sun, 20 Oct 2024 15:43:10 +0200 Subject: [PATCH] Corregit un fallo amagat baix un ifdef ARCADE. Ja he posat que estiga definit per defecte pa que no torne a passar --- source/global_inputs.cpp | 2 +- source/texture.cpp | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/source/global_inputs.cpp b/source/global_inputs.cpp index 03e6146..e37a296 100644 --- a/source/global_inputs.cpp +++ b/source/global_inputs.cpp @@ -39,7 +39,7 @@ namespace globalInputs else { #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); #else Notifier::get()->showText(lang::getText(94), std::string(), -1, exit_code); diff --git a/source/texture.cpp b/source/texture.cpp index 116f225..21dd582 100644 --- a/source/texture.cpp +++ b/source/texture.cpp @@ -38,9 +38,14 @@ Texture::Texture(SDL_Renderer *renderer, const std::string &path) // .gif else if (extension == "gif") { + // Crea la surface desde un fichero 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); SDL_SetTextureBlendMode(texture_, SDL_BLENDMODE_BLEND); flipSurface();