From 4ce2fd1c9484d5d912695e40f5403bed9c0c8328 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Fri, 3 Apr 2020 14:31:07 -0400 Subject: Limit lumina-pingcursor to 60 FPS --- src-qt5/core/lumina-pingcursor/main.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src-qt5/core/lumina-pingcursor/main.cpp b/src-qt5/core/lumina-pingcursor/main.cpp index 9dfecd94..6e332398 100644 --- a/src-qt5/core/lumina-pingcursor/main.cpp +++ b/src-qt5/core/lumina-pingcursor/main.cpp @@ -13,6 +13,7 @@ #include #include #include +#include int main(int argc, char **argv){ //Setup the application @@ -31,13 +32,13 @@ int main(int argc, char **argv){ splash.setPixmap(QApplication::screens().at(0)->grabWindow(QApplication::desktop()->winId(), splash.x(), splash.y(), 100,100) ); splash.show(); QPropertyAnimation anim(&splash,"windowOpacity"); - anim.setDuration(1500); + anim.setDuration(1200); anim.setStartValue(1); anim.setKeyValueAt(0.30, 0); anim.setKeyValueAt(0.31, 1); anim.setKeyValueAt(0.60, 0); anim.setKeyValueAt(0.61, 1); anim.setEndValue(0); anim.start(); - while(anim.state() != QAbstractAnimation::Stopped){ App.processEvents(); } + while(anim.state() != QAbstractAnimation::Stopped){ QThread::msleep(20); App.processEvents(); } //60 fps splash.hide(); return 0; } -- cgit