Beginnings of creating isHighResolution bool

This commit is contained in:
Jason P 2025-06-22 18:56:07 -05:00
parent 791377b76b
commit 2f37204df2
2 changed files with 16 additions and 0 deletions

View File

@ -10,9 +10,23 @@
namespace graphics
{
void determineResolution(int16_t screenheight, int16_t screenwidth)
{
if (screenwidth > 128) {
isHighResolution = true;
}
// Special case for Heltec 1.1
if (screenwidth == 160 && screenheight == 80) {
isHighResolution = false;
}
}
// === Shared External State ===
bool hasUnreadMessage = false;
bool isMuted = false;
bool isHighResolution = false;
determineResolution(160, 80);
// === Internal State ===
bool isBoltVisibleShared = true;

View File

@ -41,6 +41,8 @@ namespace graphics
// Shared state (declare inside namespace)
extern bool hasUnreadMessage;
extern bool isMuted;
extern bool isHighResolution;
void determineResolution(int16_t screenheight, int16_t screenwidth);
// Rounded highlight (used for inverted headers)
void drawRoundedHighlight(OLEDDisplay *display, int16_t x, int16_t y, int16_t w, int16_t h, int16_t r);