Skip to content

Commit 691a9b7

Browse files
committed
GPU Display Qt GUI: Add proper passing of frames with config elements to the GUI and returning lambda functions with value updates
1 parent 8cae0e3 commit 691a9b7

19 files changed

Lines changed: 1449 additions & 227 deletions

‎GPU/GPUTracking/Definitions/GPUSettingsList.h‎

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ EndConfig()
436436
#ifndef GPUCA_GPUCODE_DEVICE
437437
// Light settings concerning the event display (can be changed without rebuilding vertices)
438438
BeginSubConfig(GPUSettingsDisplayLight, light, configStandalone.display, "GLL", 'g', "Light OpenGL display settings", display_light)
439-
AddOption(animationMode, int32_t, 0, "", 0, "")
439+
AddOption(animationMode, int32_t, 0, "", 0, "", min(0), max(6))
440440
AddOption(smoothPoints, bool, true, "", 0, "Apply smoothing to points")
441441
AddOption(smoothLines, bool, false, "", 0, "Apply smoothing to lines")
442442
AddOption(depthBuffer, bool, false, "", 0, "Enable Z-buffer")
@@ -449,19 +449,19 @@ AddOption(drawTracks, bool, false, "", 0, "Highlight sector tracks")
449449
AddOption(drawExtrapolatedTracks, bool, false, "", 0, "Highlight global sector tracks prolonged into adjacent sector")
450450
AddOption(drawFinal, bool, false, "", 0, "Highlight final tracks")
451451
AddOption(excludeClusters, int32_t, 0, "", 0, "Exclude clusters from selected draw objects from display, (2 = exclude clusters but still show tracks)")
452-
AddOption(drawSector, int32_t, -1, "", 0, "Show individual sector")
452+
AddOption(drawSector, int32_t, -1, "", 0, "Show individual sector", min(-1), max(35))
453453
AddOption(drawRelatedSectors, int32_t, 0, "", 0, "Show related sectors (if drawSector != -1)")
454454
AddOption(drawGrid, int32_t, 0, "", 0, "Highlight grid")
455455
AddOption(propagateTracks, int32_t, 0, "", 0, "Propagate final tracks further (inward / outward / show MC tracks)")
456456
AddOption(showCollision, int32_t, -1, "", 0, "Show only individual collision")
457457
AddOption(colorCollisions, int32_t, 0, "", 0, "Distinguish collisions in timeframe by color")
458458
AddOption(colorClusters, int32_t, 1, "", 0, "Color clusters belonging to track objects")
459-
AddOption(pointSize, float, 2.0f, "", 0, "Set point size")
460-
AddOption(lineWidth, float, 1.4f, "", 0, "Set line width")
459+
AddOption(pointSize, float, 2.0f, "", 0, "Set point size", min(0.8f), max(20.f))
460+
AddOption(lineWidth, float, 1.4f, "", 0, "Set line width", min(0.4f), max(20.f))
461461
AddOption(drawTPC, bool, true, "", 0, "Enable drawing TPC data")
462-
AddOption(drawTRD, bool, true, "", 0, "Enabale drawing TRD data")
463-
AddOption(drawTOF, bool, true, "", 0, "Enabale drawing TOF data")
464-
AddOption(drawITS, bool, true, "", 0, "Enabale drawing ITS data")
462+
AddOption(drawTRD, bool, true, "", 0, "Enable drawing TRD data")
463+
AddOption(drawTOF, bool, true, "", 0, "Enable drawing TOF data")
464+
AddOption(drawITS, bool, true, "", 0, "Enable drawing ITS data")
465465
AddOption(drawField, bool, false, "", 0, "Enable drawing magnetic field")
466466
AddOption(bFieldStepSize, float, 5.0f, "", 0, "Set field line step size")
467467
AddOption(bFieldStepCount, int32_t, 100, "", 0, "Set field line step count")
@@ -477,7 +477,7 @@ AddOption(drawITSTracks, bool, true, "", 0, "Show tracks with ITS contribution")
477477
AddOption(drawTRDTracks, bool, true, "", 0, "Show tracks with TRD contribution")
478478
AddOption(drawTOFTracks, bool, true, "", 0, "Show tracks with TOF contribution")
479479
AddOption(drawTracksAndFilter, bool, false, "", 0, "Use AND filter instead of OR filter for selecting tracks")
480-
AddOption(propagateLoopers, bool, false, "", 0, "Enabale propagation of loopers")
480+
AddOption(propagateLoopers, bool, false, "", 0, "Enable propagation of loopers")
481481
AddOption(clustersOnly, bool, false, "", 0, "Visualize clusters only")
482482
AddOption(clustersOnNominalRow, bool, false, "", 0, "Show clusters at nominal x of pad row for early-transformed data")
483483
AddOption(separateExtrapolatedTracks, bool, false, "", 0, "Draw track segments propagated to adjacent sectors separately")
@@ -490,8 +490,7 @@ AddOption(hideRejectedTracks, int32_t, 1, "", 0, "Hide rejected tracks")
490490
AddOption(hideUnmatchedClusters, int32_t, 0, "", 0, "Hide unmatched clusters")
491491
AddOption(trackFilter, int32_t, 0, "", 0, "Apply filter on tracks to be displayed")
492492
AddOption(projectXY, int32_t, 0, "", 0, "Project everything on the XY-plane")
493-
AddOption(xAdd, float, 0, "", 0, "Separate sectors, increase X coordinate")
494-
AddOption(zAdd, float, 0, "", 0, "Separate sides, increase Z coordinate")
493+
AddOption(xzAdd, float, 0, "", 0, "Separate sectors, increase X coordinate", min(0.f), max(300.f))
495494
AddHelp("help", 'h')
496495
EndConfig()
497496

@@ -502,14 +501,14 @@ AddOption(camYUp, bool, false, "", 0, "Orient the camera such that the y-axis is
502501
AddOption(cameraMode, int32_t, 0, "", 0, "Camera mode")
503502
AddOption(fullScreen, bool, false, "", 0, "Full Screen")
504503
AddOption(maximized, bool, true, "", 0, "Maximized window")
505-
AddOption(drawQualityMSAA, int32_t, 0, "", 0, "MultiSample Anti Aliasing")
506-
AddOption(drawQualityDownsampleFSAA, int32_t, 0, "", 0, "Downsampling Anti Aliasing")
504+
AddOption(drawQualityMSAA, int32_t, 0, "", 0, "MultiSample Anti Aliasing", min(0), max(8))
505+
AddOption(drawQualityDownsampleFSAA, int32_t, 0, "", 0, "Downsampling Anti Aliasing", min(0), max(4))
507506
AddOption(drawQualityVSync, bool, true, "", 0, "Enable Vertical Sync")
508507
AddOption(fpsLimit, int32_t, 1, "", 0, "FPS limit: 0 = none (maximum rate), 1 = display refresh rate (no limit without VSync), 2 = fpsRate")
509-
AddOption(fpsRate, int32_t, 100, "", 0, "Target frame rate (frames per second) for fpsLimit 2, or if the backend cannot limit to the refresh rate (0 = no limit)")
508+
AddOption(fpsRate, int32_t, 100, "", 0, "Target frame rate (frames per second) for fpsLimit 2, or if the backend cannot limit to the refresh rate", min(1), max(9999))
510509
AddOption(useGLIndirectDraw, bool, true, "", 0, "Use OpenGL indirect draws to reduce number of draw calls")
511-
AddOption(screenshotScaleFactor, int32_t, 1, "", 0, "Resolution scale factor when taking screenshots")
512-
AddOption(fov, int32_t, 45, "", 0, "Display FOV")
510+
AddOption(screenshotScaleFactor, int32_t, 1, "", 0, "Resolution scale factor when taking screenshots", min(1), max(5))
511+
AddOption(fov, float, 45.f, "", 0, "Display FOV", min(5.f), max(175.f))
513512
AddHelp("help", 'h')
514513
EndConfig()
515514

‎GPU/GPUTracking/display/GPUDisplay.cxx‎

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include <stdexcept>
2525
#include <mutex>
2626
#include <condition_variable>
27+
#include <filesystem>
2728

2829
#ifndef _WIN32
2930
#include "../utils/linux_helpers.h"
@@ -201,6 +202,9 @@ int32_t GPUDisplay::InitDisplay_internal()
201202
void GPUDisplay::ExitDisplay()
202203
{
203204
mBackend->ExitBackend();
205+
if (mTrackFilterMacroTemporary) { // Custom track filter macro code
206+
std::filesystem::remove(mTrackFilterMacroLoaded);
207+
}
204208
}
205209

206210
int32_t GPUDisplay::DrawGLScene(bool suspended)
@@ -218,6 +222,10 @@ int32_t GPUDisplay::DrawGLScene(bool suspended)
218222
} else if (!mOverlayTFClusters.size()) {
219223
mNCollissions = std::max(1u, mIOPtrs->nMCInfosTPCCol);
220224
}
225+
if (mCfgL.showCollision >= mNCollissions) { // Fewer collisions in the new event
226+
mCfgL.showCollision = -1;
227+
mUpdateDrawCommands = true;
228+
}
221229
try {
222230
DrawGLScene_internal(suspended);
223231
} catch (const std::runtime_error& e) {
@@ -244,8 +252,8 @@ void GPUDisplay::DrawGLScene_cameraAndAnimation(bool suspended, float animateTim
244252
mFrontend->mMouseWheel = 0;
245253
bool lookOrigin = mCfgR.camLookOrigin ^ mFrontend->mKeys[mFrontend->mKeyDownMap[mFrontend->KEY_MAP_FOCUS_ORIGIN]];
246254
bool yUp = mCfgR.camYUp ^ mFrontend->mKeys[mFrontend->mKeyDownMap[mFrontend->KEY_MAP_FOCUS_ORIENT_UP]] ^ lookOrigin;
247-
bool rotateModel = mFrontend->mKeys[mFrontend->mKeyDownMap[mFrontend->KEY_MAP_ROTATE_MODEL]] || mFrontend->mKeys[mFrontend->mKeyDownMap[mFrontend->KEY_MAP_ROTATE_AROUND_Z]];
248-
bool rotateModelTPC = mFrontend->mKeys[mFrontend->mKeyDownMap[mFrontend->KEY_MAP_ROTATE_AROUND_Z]];
255+
bool rotateModelTPC = mCfgC.mRotateAroundZ || mFrontend->mKeys[mFrontend->mKeyDownMap[mFrontend->KEY_MAP_ROTATE_AROUND_Z]];
256+
bool rotateModel = rotateModelTPC || mCfgC.mRotateModel || mFrontend->mKeys[mFrontend->mKeyDownMap[mFrontend->KEY_MAP_ROTATE_MODEL]];
249257

250258
// Calculate rotation / translation scaling factors
251259
float scalefactor = mFrontend->mKeys[mFrontend->KEY_SHIFT] ? 0.2f : 1.0f;
@@ -277,7 +285,7 @@ void GPUDisplay::DrawGLScene_cameraAndAnimation(bool suspended, float animateTim
277285
mCfgL.lineWidth = 1.4f;
278286
mCfgL.drawSector = -1;
279287
mCfgL.showCollision = -1;
280-
mCfgH.xAdd = mCfgH.zAdd = 0;
288+
mCfgH.xzAdd = 0;
281289
mCfgR.camLookOrigin = mCfgR.camYUp = false;
282290
mAngleRollOrigin = -1e9f;
283291
mCfgR.fov = 45.f;
@@ -305,13 +313,15 @@ void GPUDisplay::DrawGLScene_cameraAndAnimation(bool suspended, float animateTim
305313
}
306314

307315
if (mFrontend->mKeys[mFrontend->mKeyDownMap[mFrontend->KEY_MAP_CHANGE_ANIMATION_INTERVAL]]) {
308-
mAnimationDelay += moveX;
309-
if (mAnimationDelay < 0.05f) {
310-
mAnimationDelay = 0.05f;
316+
mCfgC.mAnimationDelay += moveX;
317+
if (mCfgC.mAnimationDelay < 0.05f) {
318+
mCfgC.mAnimationDelay = 0.05f;
319+
} else if (mCfgC.mAnimationDelay > 20.f) {
320+
mCfgC.mAnimationDelay = 20.f;
311321
}
312322
moveX = 0.f;
313323
moveY = 0.f;
314-
SetInfo("Animation delay set to %1.2f", mAnimationDelay);
324+
SetInfo("Animation delay set to %1.2f", mCfgC.mAnimationDelay);
315325
}
316326

317327
if (yUp) {
@@ -706,10 +716,10 @@ void GPUDisplay::DrawGLScene_internal(bool suspended, float animateTime, bool re
706716
char info[1024];
707717
float fps = (double)mFramesDoneFPS / fpstime;
708718
snprintf(info, 1024,
709-
"FPS: %6.2f (Sector: %d, 1:Clusters %d, 2:Prelinks %d, 3:Links %d, 4:Seeds %d, 5:Tracklets %d, 6:Tracks %d, 7:GTracks %d, 8:Merger %d) (%d frames, %d draw calls) "
710-
"(X %1.2f Y %1.2f Z %1.2f / R %1.2f Phi %1.1f Theta %1.1f) / Yaw %1.1f Pitch %1.1f Roll %1.1f)",
719+
"FPS:%8.2f (Sector: %d, 1:Clusters %d, 2:Prelinks %d, 3:Links %d, 4:Seeds %d, 5:Tracklets %d, 6:Tracks %d, 7:GTracks %d, 8:Merger %d) (%d frames, %d draw calls) "
720+
"(X %1.2f Y %1.2f Z %1.2f / R %1.2f Phi %1.1f Theta %1.1f) / Yaw %1.1f Pitch %1.1f Roll %1.1f - Size: %ux%u",
711721
fps, mCfgL.drawSector, mCfgL.drawClusters, mCfgL.drawInitLinks, mCfgL.drawLinks, mCfgL.drawSeeds, mCfgL.drawTracklets, mCfgL.drawTracks, mCfgL.drawExtrapolatedTracks, mCfgL.drawFinal, mFramesDone, mNDrawCalls, mXYZ[0], mXYZ[1], mXYZ[2], mRPhiTheta[0], mRPhiTheta[1] * 180 / CAMath::Pi(),
712-
mRPhiTheta[2] * 180 / CAMath::Pi(), mAngle[1] * 180 / CAMath::Pi(), mAngle[0] * 180 / CAMath::Pi(), mAngle[2] * 180 / CAMath::Pi());
722+
mRPhiTheta[2] * 180 / CAMath::Pi(), mAngle[1] * 180 / CAMath::Pi(), mAngle[0] * 180 / CAMath::Pi(), mAngle[2] * 180 / CAMath::Pi(), mBackend->mScreenWidth, mBackend->mScreenHeight);
713723
if (fpstime > 1.) {
714724
if (mCfgC.mPrintInfoText & 2) {
715725
GPUInfo("%s", info);
@@ -721,7 +731,7 @@ void GPUDisplay::DrawGLScene_internal(bool suspended, float animateTime, bool re
721731
mFramesDoneFPS = 0;
722732
}
723733

724-
if (mCfgC.mPrintInfoText & 1) {
734+
if (mCfgC.mPrintInfoText & 1 || mCfgC.mPrintInfoTextGUI) {
725735
showInfo(info);
726736
}
727737
}
@@ -732,9 +742,9 @@ void GPUDisplay::DrawGLScene_internal(bool suspended, float animateTime, bool re
732742
std::vector<char> pixels = mBackend->getPixels();
733743
char tmpFileName[48];
734744
if (animateScreenshot) {
735-
snprintf(tmpFileName, 48, "mAnimation%d_%05d.bmp", mAnimationExport, mAnimationFrame);
745+
snprintf(tmpFileName, 48, "%d_%05d.bmp", mAnimationExport, mAnimationFrame);
736746
}
737-
DoScreenshot(animateScreenshot ? tmpFileName : mScreenshotFile.c_str(), pixels);
747+
DoScreenshot(animateScreenshot ? (mCfgC.mScreenShotname + tmpFileName).c_str() : mScreenshotFile.c_str(), pixels);
738748
}
739749
}
740750

‎GPU/GPUTracking/display/GPUDisplay.h‎

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,25 @@ class GPUDisplay : public GPUDisplayInterface
9595
bool mRequestScreenshot = false;
9696
int32_t mAnimateScreenshot = 0;
9797
bool mAnimationChangeConfig = true;
98-
bool dummy = false; // dummy value to reference for keys that do not change variables
98+
float mAnimationDelay = 2.f;
99+
bool mPrintInfoTextGUI = true; // Send the status and info text to the Qt GUI, shown at its bottom
100+
bool mGuiPrintInfo = false; // Show the info of options changed with Qt GUI elements (not for key presses in the GUI)
101+
bool mRotateModel = false; // Rotate the model instead of the camera, like holding RCTRL (set in the Qt GUI)
102+
bool mRotateAroundZ = false; // Rotate the TPC around the beamline, like holding RALT (set in the Qt GUI)
103+
std::string mFilterMacroCustom; // Code of the custom track filter ROOT macro (trackFilter = filterMacros.size() + 1), set in the Qt GUI
104+
std::string mScreenShotname = "screenshot"; // Name of screenshot and animation frame files, followed by numbers
105+
std::string mGLPosFile = "glpos.tmp"; // File for saving / loading the camera position
106+
std::string mGLAnimationFile = "glanimation.tmp"; // File for saving / loading the animation path
107+
int8_t mGuiDarkMode = -1; // Dark mode of the Qt GUI, -1 = not yet set: the GUI reports the system scheme when it starts
108+
float mGuiScale = 1.f; // Scale factor of text and elements of the Qt GUI (on top of the system scaling), Ctrl + mouse wheel / Ctrl + 0 in the GUI
109+
bool dummy = false; // dummy value to reference for keys that do not change variables
99110
} mCfgC;
100111

101112
private:
102113
void buildConfig();
103114
void buildConfigKeys();
104115
void buildConfigInfo();
116+
void buildConfigQtGUI();
105117

106118
static constexpr int32_t NSECTORS = o2::tpc::constants::MAXSECTOR;
107119
static constexpr float GL_SCALE_FACTOR = (1.f / 100.f);
@@ -114,6 +126,7 @@ class GPUDisplay : public GPUDisplayInterface
114126
static constexpr const int32_t N_LINES_TYPE = 7;
115127
static constexpr const int32_t N_FINAL_TYPE = 4;
116128
static constexpr int32_t TRACK_TYPE_ID_LIMIT = 100;
129+
static const std::array<std::string, 7> ANIMATION_MODE_NAMES_SHORT, ANIMATION_MODE_NAMES_LONG; // By mCfgL.animationMode
117130
enum PointTypes { tCLUSTER = 0,
118131
tINITLINK = 1,
119132
tLINK = 2,
@@ -180,6 +193,7 @@ class GPUDisplay : public GPUDisplayInterface
180193
void updateOptions();
181194
void disableUnsupportedOptions();
182195
int32_t buildTrackFilter();
196+
std::string trackFilterName() const; // Selected track filter: macro file from filterMacros, or "Custom Macro"
183197
const GPUTPCTracker& sectorTracker(int32_t iSector);
184198
const GPUTRDGeometry* trdGeometry();
185199
const GPUTrackingInOutPointers* mIOPtrs = nullptr;
@@ -191,6 +205,12 @@ class GPUDisplay : public GPUDisplayInterface
191205
void calcXYZ(const float*);
192206
void mAnimationCloseAngle(float& newangle, float lastAngle);
193207
void mAnimateCloseQuaternion(float* v, float lastx, float lasty, float lastz, float lastw);
208+
void SaveGLPos(); // Camera position to mCfgC.mGLPosFile
209+
void LoadGLPos();
210+
void SaveGLAnimation(); // Animation path to mCfgC.mGLAnimationFile
211+
void LoadGLAnimation();
212+
void takeScreenshot();
213+
void runAnimation(); // Starts the animation if it has enough points
194214
void setAnimationPoint();
195215
void resetAnimation();
196216
void removeAnimationPoint();
@@ -300,6 +320,9 @@ class GPUDisplay : public GPUDisplayInterface
300320
std::vector<bool> mTrackFilter;
301321

302322
volatile bool mUpdateTrackFilter = false;
323+
std::string mTrackFilterMacroLoaded; // Track filter macro file loaded into ROOT, unloaded before loading another one (same function name)
324+
bool mTrackFilterMacroTemporary = false; // mTrackFilterMacroLoaded is a temporary file with the custom macro code
325+
bool mUpdateGUIOptions = false; // The Qt GUI must call the dynamic option lambdas of its elements again (new event, GUI started)
303326
volatile bool mUpdateVertexLists = true;
304327
volatile bool mUpdateEventData = false;
305328
volatile bool mUpdateDrawCommands = true;
@@ -313,12 +336,14 @@ class GPUDisplay : public GPUDisplayInterface
313336
int32_t mAnimationLastBase = 0;
314337
int32_t mAnimationMixBase = -1; // Target keyframe of the current config blend (mixing), -1 = none
315338
int32_t mAnimationExport = 0;
316-
float mAnimationDelay = 2.f;
317339
vecpod<float> mAnimateVectors[9];
318340
vecpod<GPUSettingsDisplayLight> mAnimateConfig;
319341
opengl_spline mAnimationSplines[8];
320342

321343
char mInfoText2[1024];
344+
std::string mGUIInfoStatus; // Latest status line (FPS etc.) for the Qt GUI
345+
std::string mGUIInfoText; // Latest info message (SetInfo) for the Qt GUI
346+
uint64_t mGUIInfoTextCounter = 0; // Number of info messages, the GUI shows a new one for some seconds
322347
HighResTimer mInfoText2Timer, mInfoHelpTimer;
323348

324349
std::vector<threadVertexBuffer> mThreadBuffers;

‎GPU/GPUTracking/display/frontend/GPUDisplayFrontend.cxx‎

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,22 +123,43 @@ void GPUDisplayFrontend::HandleExternalGUISignals()
123123
for (int32_t key : update->keys) {
124124
mDisplay->HandleExternalGUIKey(key);
125125
}
126-
if (update->lineWidth) {
127-
mDisplay->mCfgL.lineWidth = *update->lineWidth;
126+
applyGUIValues(update->values);
127+
if (update->guiScale) {
128+
mDisplay->mCfgC.mGuiScale = *update->guiScale;
129+
}
130+
if (update->guiDarkMode) {
131+
mDisplay->mCfgC.mGuiDarkMode = *update->guiDarkMode;
128132
}
129133
}
130134

131135
if (gui) {
136+
auto values = getGUIValues();
132137
{
133138
std::lock_guard lock(mGUIChannel->mutex);
134139
mGUIChannel->state.cfg = {mDisplay->mCfgH, mDisplay->mCfgL, mDisplay->mCfgR};
140+
mGUIChannel->state.values = std::move(values);
141+
mGUIChannel->state.guiScale = mDisplay->mCfgC.mGuiScale;
142+
mGUIChannel->state.guiDarkMode = mDisplay->mCfgC.mGuiDarkMode;
143+
mGUIChannel->state.infoStatus = mDisplay->mCfgC.mPrintInfoTextGUI ? mDisplay->mGUIInfoStatus : "";
144+
mGUIChannel->state.infoText = mDisplay->mCfgC.mPrintInfoTextGUI ? mDisplay->mGUIInfoText : "";
145+
mGUIChannel->state.infoTextCounter = mDisplay->mGUIInfoTextCounter;
146+
if (mDisplay->mUpdateGUIOptions) {
147+
mGUIChannel->state.optionsRevision++;
148+
mDisplay->mUpdateGUIOptions = false;
149+
}
135150
if (update) {
136151
mGUIChannel->state.appliedUpdate = update->id;
137152
}
138153
mGUIChannel->state.counter++;
139154
mGUIChannel->displayProcessingCurrentUpdate = false;
140155
}
141156
mGUIChannel->stateUpdated.notify_all();
157+
std::unique_lock lock(mGUIChannel->mutex);
158+
if (mGUIChannel->optionsReadRevision != mGUIChannel->state.optionsRevision) { // The GUI calls the dynamic option lambdas (reading display data) only while we wait here, short timeout, retried in the next frame
159+
mGUIChannel->displayWaitingForOptions = true;
160+
mGUIChannel->optionsRead.wait_for(lock, std::chrono::milliseconds(20), [this] { return mGUIChannel->optionsReadRevision == mGUIChannel->state.optionsRevision || mGUIChannel->stop; });
161+
mGUIChannel->displayWaitingForOptions = false;
162+
}
142163
}
143164
}
144165

@@ -201,10 +222,13 @@ int32_t GPUDisplayFrontend::startGUI()
201222
std::lock_guard lock(mGUIChannel->mutex);
202223
mGUIChannel->update.reset();
203224
mGUIChannel->state = {};
204-
mGUIChannel->guiSleeping = mGUIChannel->displayProcessingCurrentUpdate = mGUIChannel->stop = false;
225+
mGUIChannel->guiSleeping = mGUIChannel->displayProcessingCurrentUpdate = mGUIChannel->stop = mGUIChannel->displayWaitingForOptions = false;
226+
mGUIChannel->optionsReadRevision = 0;
227+
mDisplay->mUpdateGUIOptions = true;
205228
mGUIChannel->replyTimeout = std::chrono::milliseconds(mDisplay->cfg().guiReplyTimeout);
206229
mGUIChannel->maxUpdatesAhead = std::max<uint32_t>(mDisplay->cfg().guiMaxUpdatesAhead, 1); // 0 would block all updates
207230
mGUIChannel->windowName = DISPLAY_WINDOW_NAME;
231+
setGUILayout(*mGUIChannel);
208232
}
209233
mGUI->start();
210234
} else {

0 commit comments

Comments
 (0)