Skip to content

Commit

Permalink
#12 Added StatusStrip and FPS label
Browse files Browse the repository at this point in the history
  • Loading branch information
hagronnestad committed Sep 18, 2019
1 parent d1b6f94 commit 58fe098
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 3 deletions.
24 changes: 24 additions & 0 deletions ComputerSystems/Commodore64/FormC64Screen.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions ComputerSystems/Commodore64/FormC64Screen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ private void MnuReset_Click(object sender, EventArgs e) {

private void PScreen_Paint(object sender, PaintEventArgs e) {
if (C64.Cpu.Memory[C64MemoryLocations.CURRENT_OUTPUT_DEVICE] != C64MemoryValues.CURRENT_OUTPUT_DEVICE_SCREEN) {
Text = "Screen disabled!";
return;
}

Expand All @@ -155,7 +154,7 @@ private void PScreen_Paint(object sender, PaintEventArgs e) {
_stopWatch.Stop();

_fpsActual = 1000f / _stopWatch.Elapsed.TotalMilliseconds;
Text = $"{_fpsActual:F1} fps";
lblFps.Text = $"{_fpsActual:F1} fps";

_stopWatch.Restart();
}
Expand Down
5 changes: 4 additions & 1 deletion ComputerSystems/Commodore64/FormC64Screen.resx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Expand Down Expand Up @@ -120,4 +120,7 @@
<metadata name="mnuMain.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="statusMain.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>121, 17</value>
</metadata>
</root>

0 comments on commit 58fe098

Please sign in to comment.