diff --git a/ScreenPlayWallpaper/qml/Wallpaper.qml b/ScreenPlayWallpaper/qml/Wallpaper.qml index cb39d6c3..8572d2f0 100644 --- a/ScreenPlayWallpaper/qml/Wallpaper.qml +++ b/ScreenPlayWallpaper/qml/Wallpaper.qml @@ -282,13 +282,24 @@ Rectangle { ] } + + FrameAnimation { + id: frameAnimation + property real fps: smoothFrameTime > 0 ? (1.0 / smoothFrameTime) : 0 + readonly property string ft: (1000 * smoothFrameTime).toFixed(1) + readonly property real maxFPS: 24.0 + readonly property real maxPeriod: 1.0 / maxFPS + readonly property int skipFrames: fps / maxFPS + running: Wallpaper.debugMode + } + Pane { id: debug visible: Wallpaper.debugMode enabled: Wallpaper.debugMode - width: parent.width * 0.3 - height: parent.height * 0.3 + width: parent.width * 0.6 + height: parent.height * 0.5 anchors.centerIn: parent Column { @@ -296,6 +307,14 @@ Rectangle { anchors.margins: 20 spacing: 10 + Text { + visible: Wallpaper.debugMode + enabled: Wallpaper.debugMode + font.pointSize: 14 + text: "fps: " + frameAnimation.fps.toFixed(0) + " - Frame time:"+ frameAnimation.ft + " ms" + } + + Text { text: "appID " + Wallpaper.appID font.pointSize: 14