eliminat renderInfo de ResourceCache::init
This commit is contained in:
@@ -529,7 +529,10 @@ void Screen::hide() { SDL_HideWindow(window_); }
|
|||||||
void Screen::setNotificationsEnabled(bool value) { notifications_enabled_ = value; }
|
void Screen::setNotificationsEnabled(bool value) { notifications_enabled_ = value; }
|
||||||
|
|
||||||
// Activa / desactiva el contador de FPS
|
// 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
|
// Alterna entre activar y desactivar el escalado entero
|
||||||
void Screen::toggleIntegerScale() {
|
void Screen::toggleIntegerScale() {
|
||||||
|
|||||||
@@ -55,6 +55,11 @@ namespace Resource {
|
|||||||
|
|
||||||
// Carga todos los recursos
|
// Carga todos los recursos
|
||||||
void Cache::load() {
|
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();
|
calculateTotal();
|
||||||
Screen::get()->setBorderColor(static_cast<Uint8>(PaletteColor::BLACK));
|
Screen::get()->setBorderColor(static_cast<Uint8>(PaletteColor::BLACK));
|
||||||
std::cout << "\n** LOADING RESOURCES" << '\n';
|
std::cout << "\n** LOADING RESOURCES" << '\n';
|
||||||
@@ -67,6 +72,8 @@ namespace Resource {
|
|||||||
loadRooms();
|
loadRooms();
|
||||||
createText();
|
createText();
|
||||||
std::cout << "\n** RESOURCES LOADED" << '\n';
|
std::cout << "\n** RESOURCES LOADED" << '\n';
|
||||||
|
|
||||||
|
if (WAS_FPS_VISIBLE) { Screen::get()->toggleFPS(); }
|
||||||
}
|
}
|
||||||
|
|
||||||
// Recarga todos los recursos
|
// Recarga todos los recursos
|
||||||
|
|||||||
Reference in New Issue
Block a user