Skip to content

Commit f251b4c

Browse files
committed
Fix FPS display condition in example apps
Changed the FPS check from 'fps >= 0' to 'fps > 0' in both WPF and Windows Forms example applications to prevent displaying stats when FPS is zero.
1 parent 94b42bf commit f251b4c

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

RemoteViewing.WPF.Example/MainWindow.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ private void UpdateTitle()
146146
int cpu = (int)Math.Round(stats.CpuUsage * 100);
147147
double fps = vncControl.CurrentFps;
148148

149-
if (recv / 1024 >= 0.1 || send / 1024 >= 0.1 || cpu > 0 || fps >= 0)
149+
if (recv / 1024 >= 0.1 || send / 1024 >= 0.1 || cpu > 0 || fps > 0)
150150
{
151151
title += string.Format(" - {0} KB/s received, {1} KB/s sent, {2}% CPU, {3} FPS"
152152
, (recv / 1024).ToString("0.0")

RemoteViewing.Windows.Forms.Example/MainForm.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ private void UpdateTitle()
131131
int cpu = (int)Math.Round(stats.CpuUsage * 100);
132132
double fps = vncControl.CurrentFps;
133133

134-
if (recv / 1024 >= 0.1 || send / 1024 >= 0.1 || cpu > 0 || fps >= 0)
134+
if (recv / 1024 >= 0.1 || send / 1024 >= 0.1 || cpu > 0 || fps > 0)
135135
{
136136
title += string.Format(" - {0} KB/s received, {1} KB/s sent, {2}% CPU, {3} FPS"
137137
, (recv / 1024).ToString("0.0")

0 commit comments

Comments
 (0)