@@ -19,6 +19,7 @@ using namespace Core::Devtools;
19
19
using L = Core::Devtools::Layer;
20
20
21
21
static bool show_simple_fps = false ;
22
+ static bool visibility_toggled = false ;
22
23
23
24
static float fps_scale = 1 .0f ;
24
25
static bool show_advanced_debug = false ;
@@ -296,20 +297,24 @@ void L::Draw() {
296
297
const auto fn = DebugState.flip_frame_count .load ();
297
298
frame_graph.AddFrame (fn, io.DeltaTime );
298
299
}
299
-
300
300
if (IsKeyPressed (ImGuiKey_F10, false )) {
301
301
if (io.KeyCtrl ) {
302
302
show_advanced_debug = !show_advanced_debug;
303
303
} else {
304
304
show_simple_fps = !show_simple_fps;
305
305
}
306
+ visibility_toggled = true ;
306
307
}
307
308
308
309
if (show_simple_fps) {
309
310
if (Begin (" Video Info" , nullptr ,
310
311
ImGuiWindowFlags_NoNav | ImGuiWindowFlags_NoDecoration |
311
312
ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoDocking)) {
312
- SetWindowPos (" Video Info" , {999999 .0f , 0 .0f }, ImGuiCond_FirstUseEver);
313
+ // Set window position to top left if it was toggled on
314
+ if (visibility_toggled) {
315
+ SetWindowPos (" Video Info" , {999999 .0f , 0 .0f }, ImGuiCond_Always);
316
+ visibility_toggled = false ;
317
+ }
313
318
if (BeginPopupContextWindow ()) {
314
319
#define M (label, value ) \
315
320
if (MenuItem (label, nullptr , fps_scale == value)) \
0 commit comments