mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2024-12-24 15:41:49 +01:00
Correct window location saving to take window state into account (negative values)
Related to issue #157.
This commit is contained in:
parent
7909e57620
commit
76136c71a9
@ -2752,9 +2752,18 @@ namespace DS4Windows
|
||||
catch { missingSetting = true; }
|
||||
try { Item = m_Xdoc.SelectSingleNode("/Profile/formHeight"); Int32.TryParse(Item.InnerText, out formHeight); }
|
||||
catch { missingSetting = true; }
|
||||
try { Item = m_Xdoc.SelectSingleNode("/Profile/formLocationX"); Int32.TryParse(Item.InnerText, out formLocationX); }
|
||||
try {
|
||||
int temp = 0;
|
||||
Item = m_Xdoc.SelectSingleNode("/Profile/formLocationX"); Int32.TryParse(Item.InnerText, out temp);
|
||||
formLocationX = Math.Max(temp, 0);
|
||||
}
|
||||
catch { missingSetting = true; }
|
||||
try { Item = m_Xdoc.SelectSingleNode("/Profile/formLocationY"); Int32.TryParse(Item.InnerText, out formLocationY); }
|
||||
|
||||
try {
|
||||
int temp = 0;
|
||||
Item = m_Xdoc.SelectSingleNode("/Profile/formLocationY"); Int32.TryParse(Item.InnerText, out temp);
|
||||
formLocationY = Math.Max(temp, 0);
|
||||
}
|
||||
catch { missingSetting = true; }
|
||||
|
||||
try {
|
||||
|
@ -2179,8 +2179,8 @@ namespace DS4Windows
|
||||
FormHeight = oldsize.Height;
|
||||
}
|
||||
|
||||
FormLocationX = Location.X;
|
||||
FormLocationY = Location.Y;
|
||||
FormLocationX = Location.X > 0 ? Location.X : 0;
|
||||
FormLocationY = Location.Y > 0 ? Location.Y : 0;
|
||||
|
||||
if (!string.IsNullOrEmpty(appdatapath))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user