Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions source/Core/Threads/GUIThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,14 @@ void guiRenderLoop(void) {
memset(&context.scratch_state, 0, sizeof(context.scratch_state));
currentOperatingMode = newMode;
}

bool detailedView = getSettingValue(SettingsOptions::DetailedIDLE) && getSettingValue(SettingsOptions::DetailedSoldering);
if (detailedView &&
((newMode == OperatingMode::HomeScreen && context.previousMode == OperatingMode::Soldering) || (newMode == OperatingMode::Soldering && context.previousMode == OperatingMode::HomeScreen))) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Ralim, just for fun: at first, right after looking for enum values of OperatingMode, I was seriously thinking about something like newMode + context.previousMode == 1, but then I thought that it's better to have a long line, than the twisted brain. :D

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Heh, yeah those optimisations have bitten me in the past though. Let the compiler make them 🤣

// Exclude side-slide-scroll animation if we do transition between soldering/home back and forth while detailed view setting for both modes is set
return OLED::refresh();
}

// If the transition marker is set, we need to make the next draw occur to the secondary buffer so we have something to transition to
if (context.transitionMode != TransitionAnimation::None) {
OLED::useSecondaryFramebuffer(true);
Expand Down