Skip to content
This repository was archived by the owner on Jan 5, 2024. It is now read-only.

Commit 0d7aa55

Browse files
committed
Added properties for storing desktop resolution and Allegro graphics driver
1 parent cb7476a commit 0d7aa55

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

Managers/FrameMan.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ namespace RTE {
3939
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
4040

4141
void FrameMan::Clear() {
42+
m_GfxDriver = GFX_AUTODETECT_WINDOWED;
43+
m_ScreenResX = GetSystemMetrics(SM_CXSCREEN);
44+
m_ScreenResY = GetSystemMetrics(SM_CYSCREEN);
4245
m_ResX = 960;
4346
m_ResY = 540;
4447
m_NewResX = m_ResX;

Managers/FrameMan.h

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -564,19 +564,24 @@ namespace RTE {
564564
protected:
565565

566566
static const std::string c_ClassName; //!< The friendly-formatted type name of this object.
567-
567+
568568
static constexpr unsigned short m_BPP = 32; //!< Color depth (bits per pixel).
569569

570-
int m_ResX; //!< Display width.
571-
int m_ResY; //!< Display height.
572-
int m_NewResX; //!< New display width that will take effect next time the FrameMan is started.
573-
int m_NewResY; //!< New display height that will take effect next time the FrameMan is started.
570+
int m_GfxDriver; //!< The graphics driver that will be used for rendering.
574571

575-
bool m_Fullscreen; //!< Whether in fullscreen mode or not.
572+
unsigned short m_ScreenResX; //!< Width of the physical screen (desktop resolution).
573+
unsigned short m_ScreenResY; //!< Height of the physical screen (desktop resolution).
574+
575+
unsigned short m_ResX; //!< Game window width.
576+
unsigned short m_ResY; //!< Game window height.
577+
unsigned short m_NewResX; //!< New game window width that will take effect next time the FrameMan is started.
578+
unsigned short m_NewResY; //!< New game window height that will take effect next time the FrameMan is started.
576579

577580
unsigned char m_ResMultiplier; //!< The number of times the game window and image should be multiplied and stretched across for better visibility.
578581
unsigned char m_NewResMultiplier; //!< This is the new multiple that will take effect next time the FrameMan is started.
579582

583+
bool m_Fullscreen; //!< Whether in fullscreen mode (borderless window) or not.
584+
580585
bool m_HSplit; //!< Whether the screen is split horizontally across the screen, ie as two splitscreens one above the other.
581586
bool m_VSplit; //!< Whether the screen is split vertically across the screen, ie as two splitscreens side by side.
582587
bool m_HSplitOverride; //!< Whether the screen is set to split horizontally in settings.

0 commit comments

Comments
 (0)