mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2025-01-12 00:09:11 +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; }
|
catch { missingSetting = true; }
|
||||||
try { Item = m_Xdoc.SelectSingleNode("/Profile/formHeight"); Int32.TryParse(Item.InnerText, out formHeight); }
|
try { Item = m_Xdoc.SelectSingleNode("/Profile/formHeight"); Int32.TryParse(Item.InnerText, out formHeight); }
|
||||||
catch { missingSetting = true; }
|
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; }
|
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; }
|
catch { missingSetting = true; }
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -2179,8 +2179,8 @@ namespace DS4Windows
|
|||||||
FormHeight = oldsize.Height;
|
FormHeight = oldsize.Height;
|
||||||
}
|
}
|
||||||
|
|
||||||
FormLocationX = Location.X;
|
FormLocationX = Location.X > 0 ? Location.X : 0;
|
||||||
FormLocationY = Location.Y;
|
FormLocationY = Location.Y > 0 ? Location.Y : 0;
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(appdatapath))
|
if (!string.IsNullOrEmpty(appdatapath))
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user