mirror of
https://github.com/kangyu-california/PersistentWindows.git
synced 2025-05-11 21:15:38 +02:00
rename variable
This commit is contained in:
parent
0a6b45e7ab
commit
83e3ef4cc8
1 changed files with 4 additions and 4 deletions
|
@ -2394,19 +2394,19 @@ namespace PersistentWindows.Common
|
|||
return hwnd;
|
||||
}
|
||||
|
||||
// detect scale factor change of 125%, 150%, 175%, 200%, 225%, 250% etc
|
||||
// detect scale factor change back to 100% from 125%, 150%, 175%, 200%, 225%, 250% etc in User32.GetWindowRect()
|
||||
private bool IsScaleFactorChanged(int x, int y, int nx, int ny)
|
||||
{
|
||||
if (nx <= x || ny <= y)
|
||||
return false;
|
||||
|
||||
double r = nx * 4 / (double)x;
|
||||
double rem = r - Math.Round(r);
|
||||
double rx = nx * 4 / (double)x;
|
||||
double rem = rx - Math.Round(rx);
|
||||
if (Math.Abs(rem) > 0.005)
|
||||
return false; //not multiples of 25%
|
||||
|
||||
double ry = ny * 4 / (double)y;
|
||||
if (Math.Abs(ry - r) > 0.005)
|
||||
if (Math.Abs(ry - rx) > 0.005)
|
||||
return false; //different aspect ratio
|
||||
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue