- renderInfo

- fix: no guardava el preset actual
This commit is contained in:
2026-04-04 20:14:11 +02:00
parent eb3f449a1e
commit d4fc7c0ee8
12 changed files with 197 additions and 6 deletions

View File

@@ -60,9 +60,29 @@ class Screen {
// Backend GPU (nullptr si no disponible o desactivat)
std::unique_ptr<Rendering::ShaderBackend> shader_backend_;
void updateRenderInfo();
struct FPS {
Uint32 ticks{0};
int frame_count{0};
int last_value{0};
void increment() { frame_count++; }
auto calculate(Uint32 current_ticks) -> int {
if (current_ticks - ticks >= 1000) {
last_value = frame_count;
frame_count = 0;
ticks = current_ticks;
}
return last_value;
}
};
int zoom_{3};
int max_zoom_{6};
bool fullscreen_{false};
FPS fps_;
std::string gpu_driver_;
static constexpr int GAME_WIDTH = 320;
static constexpr int GAME_HEIGHT = 200;