mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Fix INI screen size issue (for good this time?)
This commit is contained in:
parent
8c34066a45
commit
74610bc52b
@ -289,11 +289,19 @@ namespace Wabbajack.Lib
|
|||||||
foreach (var file in Directory.EnumerateFiles(Path.Combine(OutputFolder, "profiles"), "*refs.ini",
|
foreach (var file in Directory.EnumerateFiles(Path.Combine(OutputFolder, "profiles"), "*refs.ini",
|
||||||
DirectoryEnumerationOptions.Recursive))
|
DirectoryEnumerationOptions.Recursive))
|
||||||
{
|
{
|
||||||
IniData data;
|
|
||||||
var parser = new FileIniDataParser(new IniDataParser(config));
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
IniData data;
|
||||||
|
var parser = new FileIniDataParser(new IniDataParser(config));
|
||||||
data = parser.ReadFile(file);
|
data = parser.ReadFile(file);
|
||||||
|
|
||||||
|
if (data.Sections["Display"]["iSize W"] != null && data.Sections["Display"]["iSize H"] != null)
|
||||||
|
{
|
||||||
|
data.Sections["Display"]["iSize W"] = SystemParameters.PrimaryScreenWidth.ToString();
|
||||||
|
data.Sections["Display"]["iSize H"] = SystemParameters.PrimaryScreenHeight.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
parser.WriteFile(file, data);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
@ -301,13 +309,6 @@ namespace Wabbajack.Lib
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data.Sections["Display"]["iSize W"] != null && data.Sections["Display"]["iSize H"] != null)
|
|
||||||
{
|
|
||||||
data.Sections["Display"]["iSize W"] = SystemParameters.PrimaryScreenWidth.ToString();
|
|
||||||
data.Sections["Display"]["iSize H"] = SystemParameters.PrimaryScreenHeight.ToString();
|
|
||||||
}
|
|
||||||
|
|
||||||
parser.WriteFile(file, data);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user