From ec663196c1127ae38bc33828df1e88b9eaf65589 Mon Sep 17 00:00:00 2001 From: mjbudd77 Date: Mon, 3 Jan 2022 20:51:53 -0500 Subject: [PATCH] Increased fade in/out rate for Qt bookmark preview popup window. Change instantly if already up. --- src/drivers/Qt/TasEditor/TasEditorWindow.cpp | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/src/drivers/Qt/TasEditor/TasEditorWindow.cpp b/src/drivers/Qt/TasEditor/TasEditorWindow.cpp index 2d41ad50..9ad280c2 100644 --- a/src/drivers/Qt/TasEditor/TasEditorWindow.cpp +++ b/src/drivers/Qt/TasEditor/TasEditorWindow.cpp @@ -6778,7 +6778,7 @@ void bookmarkPreviewPopup::periodicUpdate(void) { if ( alpha < 255 ) { - alpha += 15; + alpha += 25; if ( alpha > 255 ) { @@ -6793,7 +6793,7 @@ void bookmarkPreviewPopup::periodicUpdate(void) { if ( alpha > 0 ) { - alpha -= 15; + alpha -= 25; if ( alpha < 0 ) { @@ -6831,9 +6831,18 @@ int bookmarkPreviewPopup::currentIndex(void) //---------------------------------------------------------------------------- void bookmarkPreviewPopup::imageIndexChanged(int newIndex) { + FCEU_CRITICAL_SECTION(emuLock); //printf("newIndex:%i\n", newIndex ); - actv = ( newIndex >= 0 ); + if ( newIndex >= 0 ) + { + reloadImage(newIndex); + actv = true; + } + else + { + actv = false; + } //if ( instance == this ) //{ @@ -6865,6 +6874,10 @@ int bookmarkPreviewPopup::reloadImage(int index) uint32_t pixel; QPixmap pixmap; + if ( index == imageIndex ) + { // no change + return 0; + } actv = true; imageIndex = index;