screen.cpp: getDisplayInfo()
resource.cpp: afegida info del display en la pantalla de carrega
This commit is contained in:
@@ -54,6 +54,12 @@ class Screen {
|
||||
[[nodiscard]] static auto getVSync() -> bool { return Options::video.vsync; } // Obtiene el valor de V-Sync
|
||||
[[nodiscard]] auto getText() const -> std::shared_ptr<Text> { return text_; } // Obtiene el puntero al texto de Screen
|
||||
|
||||
// --- Display Monitor getters ---
|
||||
[[nodiscard]] auto getDisplayMonitorName() const -> std::string { return display_monitor_.name; }
|
||||
[[nodiscard]] auto getDisplayMonitorWidth() const -> int { return display_monitor_.width; }
|
||||
[[nodiscard]] auto getDisplayMonitorHeight() const -> int { return display_monitor_.height; }
|
||||
[[nodiscard]] auto getDisplayMonitorRefreshRate() const -> int { return display_monitor_.refresh_rate; }
|
||||
|
||||
#ifdef _DEBUG
|
||||
// --- Debug ---
|
||||
void toggleDebugInfo() { debug_info_.show = !debug_info_.show; }
|
||||
@@ -65,6 +71,12 @@ class Screen {
|
||||
static constexpr int WINDOWS_DECORATIONS = 35; // Decoraciones de la ventana
|
||||
|
||||
// --- Estructuras privadas ---
|
||||
struct DisplayMonitor {
|
||||
std::string name;
|
||||
int width;
|
||||
int height;
|
||||
int refresh_rate;
|
||||
};
|
||||
struct FPS {
|
||||
Uint32 ticks{0}; // Tiempo en milisegundos desde que se comenzó a contar.
|
||||
int frame_count{0}; // Número acumulado de frames en el intervalo.
|
||||
@@ -206,6 +218,7 @@ class Screen {
|
||||
FlashEffect flash_effect_; // Efecto de flash en pantalla
|
||||
ShakeEffect shake_effect_; // Efecto de agitar la pantalla
|
||||
bool attenuate_effect_ = false; // Indica si la pantalla ha de estar atenuada
|
||||
DisplayMonitor display_monitor_; // Información del monitor actual
|
||||
#ifdef _DEBUG
|
||||
Debug debug_info_; // Información de debug
|
||||
#endif
|
||||
@@ -218,7 +231,7 @@ class Screen {
|
||||
void renderPresent(); // Selecciona y ejecuta el método de renderizado adecuado
|
||||
void loadShaders(); // Carga el contenido del archivo GLSL
|
||||
void adjustWindowSize(); // Calcula el tamaño de la ventana
|
||||
static void getDisplayInfo(); // Obtiene información sobre la pantalla
|
||||
void getDisplayInfo(); // Obtiene información sobre la pantalla
|
||||
void renderOverlays(); // Renderiza todos los overlays y efectos
|
||||
void renderAttenuate(); // Atenúa la pantalla
|
||||
void createText(); // Crea el objeto de texto
|
||||
|
||||
Reference in New Issue
Block a user