Screenshots on X10 / X12S were not always working (thanks Lothar for the new report)
This commit is contained in:
+4
-3
@@ -289,13 +289,14 @@ void guiMain(event_t evt)
|
|||||||
lcdRefreshWait(); // WARNING: make sure no code above this line does any change to the LCD display buffer!
|
lcdRefreshWait(); // WARNING: make sure no code above this line does any change to the LCD display buffer!
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
bool screenshotRequested = (mainRequestFlags & (1u << REQUEST_SCREENSHOT));
|
||||||
|
|
||||||
if (!refreshNeeded) {
|
if (!refreshNeeded) {
|
||||||
DEBUG_TIMER_START(debugTimerMenus);
|
DEBUG_TIMER_START(debugTimerMenus);
|
||||||
while (true) {
|
while (true) {
|
||||||
// normal GUI from menus
|
// normal GUI from menus
|
||||||
const char * warn = warningText;
|
const char * warn = warningText;
|
||||||
uint8_t menu = popupMenuItemsCount;
|
uint8_t menu = popupMenuItemsCount;
|
||||||
|
|
||||||
static bool popupDisplayed = false;
|
static bool popupDisplayed = false;
|
||||||
if (warn || menu) {
|
if (warn || menu) {
|
||||||
if (popupDisplayed == false) {
|
if (popupDisplayed == false) {
|
||||||
@@ -305,7 +306,7 @@ void guiMain(event_t evt)
|
|||||||
lcdStoreBackupBuffer();
|
lcdStoreBackupBuffer();
|
||||||
TIME_MEASURE_STOP(storebackup);
|
TIME_MEASURE_STOP(storebackup);
|
||||||
}
|
}
|
||||||
if (popupDisplayed == false || evt) {
|
if (popupDisplayed == false || evt || screenshotRequested) {
|
||||||
popupDisplayed = lcdRestoreBackupBuffer();
|
popupDisplayed = lcdRestoreBackupBuffer();
|
||||||
if (warn) {
|
if (warn) {
|
||||||
DISPLAY_WARNING(evt);
|
DISPLAY_WARNING(evt);
|
||||||
@@ -358,7 +359,7 @@ void guiMain(event_t evt)
|
|||||||
DEBUG_TIMER_STOP(debugTimerMenus);
|
DEBUG_TIMER_STOP(debugTimerMenus);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mainRequestFlags & (1u << REQUEST_SCREENSHOT)) {
|
if (screenshotRequested) {
|
||||||
writeScreenshot();
|
writeScreenshot();
|
||||||
mainRequestFlags &= ~(1u << REQUEST_SCREENSHOT);
|
mainRequestFlags &= ~(1u << REQUEST_SCREENSHOT);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user