Skip to content

Commit

Permalink
#12 Reset aspect ratio on double click
Browse files Browse the repository at this point in the history
  • Loading branch information
hagronnestad committed Apr 4, 2020
1 parent df4d08d commit 4814e72
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ComputerSystems/Commodore64/FormC64Screen.Designer.cs

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

7 changes: 7 additions & 0 deletions ComputerSystems/Commodore64/FormC64Screen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -317,5 +317,12 @@ private void btnSlowDown_Click(object sender, EventArgs e) {
private void btnClockSpeedFaster_Click(object sender, EventArgs e) {
C64.CpuClockSpeed /= 10.0d;
}

private void pScreen_DoubleClick(object sender, EventArgs e) {
var height = (int)((pScreen.Width / 4.0f) * 3.0f);

if (height < pScreen.Height) Height -= pScreen.Height - height;
if (height > pScreen.Height) Height += height - pScreen.Height;
}
}
}

0 comments on commit 4814e72

Please sign in to comment.