File tree Expand file tree Collapse file tree 4 files changed +14
-19
lines changed
Expand file tree Collapse file tree 4 files changed +14
-19
lines changed Original file line number Diff line number Diff line change @@ -196,10 +196,6 @@ namespace mrv
196196
197197 // ! Tooltip.
198198 Tooltip* tooltip = nullptr ;
199-
200- // HDR monitor tracking.
201- int screen_index = 0 ;
202- bool changed_screen = false ;
203199 };
204200 } // namespace opengl
205201} // namespace mrv
Original file line number Diff line number Diff line change @@ -1255,15 +1255,7 @@ namespace mrv
12551255 return 1 ;
12561256 }
12571257 case FL_MOVE:
1258- {
1259- // Track moving from one screen to the next so that Vulkan
1260- // recreates HDR / SDR swapchain properly.
1261- if (p.screen_index != this ->screen_num ())
1262- {
1263- p.changed_screen = true ;
1264- p.screen_index = this ->screen_num ();
1265- }
1266-
1258+ {
12671259 updateCoords ();
12681260 // If we are drawing or erasing, draw the cursor
12691261 if (p.actionMode != ActionMode::kScrub &&
Original file line number Diff line number Diff line change @@ -205,7 +205,6 @@ namespace mrv
205205
206206 // HDR monitor tracking.
207207 int screen_index = 0 ;
208- bool changed_screen = false ;
209208 monitor::HDRCapabilities hdrCapabilities;
210209 };
211210
Original file line number Diff line number Diff line change @@ -617,14 +617,22 @@ namespace mrv
617617
618618 // If we changed screen from an HDR to an SDR one, recreate the
619619 // Vulkan swapchain.
620- if (p.changed_screen )
620+ bool changed_screen = false ;
621+ if (p.screen_index != this ->screen_num ())
622+ {
623+ p.screen_index = this ->screen_num ();
624+ changed_screen = true ;
625+ }
626+
627+ if (changed_screen)
621628 {
622- p.changed_screen = false ;
623-
624629 auto hdrCapabilities = monitor::get_hdr_capabilities (this ->screen_num ());
625- // if (hdrCapabilities.supported != p.hdrCapabilities.supported)
630+ if (hdrCapabilities.supported != p.hdrCapabilities .supported )
631+ {
626632 m_swapchain_needs_recreation = true ;
627- return ;
633+ redraw ();
634+ return ;
635+ }
628636 }
629637
630638 // Get the command buffer started for the current frame.
You can’t perform that action at this time.
0 commit comments