UI: Fixed issues with palette color selection (video config & ppu viewer) when DPI is not set to 100%

This commit is contained in:
Sour 2018-05-26 11:58:14 -04:00
parent e871a9ce15
commit 483fd3f128
2 changed files with 5 additions and 2 deletions

View file

@ -100,8 +100,8 @@ namespace Mesen.GUI.Debugger
private void picPalette_MouseDown(object sender, MouseEventArgs e)
{
float xPos = (float)e.X / picPalette.Image.Width;
float yPos = (float)e.Y / picPalette.Image.Height;
float xPos = (float)e.X / picPalette.Width;
float yPos = (float)e.Y / picPalette.Height;
float y = yPos < 0.5 ? yPos : (yPos - 0.5f);
float x = yPos < 0.5 ? xPos : (xPos + 1);

View file

@ -74,6 +74,9 @@
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(350, 363);
this.Controls.Add(this.tableLayoutPanel1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "frmSelectColor";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Select Color...";