- renderInfo
- fix: no guardava el preset actual
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user