eliminat renderInfo de ResourceCache::init

This commit is contained in:
2026-03-28 10:49:39 +01:00
parent a06eb8c8e9
commit 21c8d1e8ca
2 changed files with 11 additions and 1 deletions

View File

@@ -529,7 +529,10 @@ void Screen::hide() { SDL_HideWindow(window_); }
void Screen::setNotificationsEnabled(bool value) { notifications_enabled_ = value; }
// Activa / desactiva el contador de FPS
void Screen::toggleFPS() { show_fps_ = !show_fps_; }
void Screen::toggleFPS() {
show_fps_ = !show_fps_;
if (show_fps_) { updateZoomFactor(); }
}
// Alterna entre activar y desactivar el escalado entero
void Screen::toggleIntegerScale() {

View File

@@ -55,6 +55,11 @@ namespace Resource {
// Carga todos los recursos
void Cache::load() {
// Oculta el overlay de debug durante la carga inicial; al restaurarlo
// SDL ya estará estabilizado y toggleFPS recalculará zoom_factor_ correctamente
const bool WAS_FPS_VISIBLE = Screen::get()->isFPSVisible();
if (WAS_FPS_VISIBLE) { Screen::get()->toggleFPS(); }
calculateTotal();
Screen::get()->setBorderColor(static_cast<Uint8>(PaletteColor::BLACK));
std::cout << "\n** LOADING RESOURCES" << '\n';
@@ -67,6 +72,8 @@ namespace Resource {
loadRooms();
createText();
std::cout << "\n** RESOURCES LOADED" << '\n';
if (WAS_FPS_VISIBLE) { Screen::get()->toggleFPS(); }
}
// Recarga todos los recursos