Write screen resolution into SkyrimPrefs.ini
This commit is contained in:
parent
6f56bddc14
commit
9da4ff09c7
@ -161,6 +161,8 @@ Filename: "{app}\MO2\ModOrganizer.ini"; Section: "Plugins"; Key: "Skyrim%20Speci
|
||||
Filename: "{app}\MO2\ModOrganizer.ini"; Section: "Plugins"; Key: "Skyrim%20VR%20Support%20Plugin\enderal_downloads"; String: "true"
|
||||
|
||||
Filename: "{app}\Data\profiles\Default\skyrimprefs.ini"; Section: "Display"; Key: "iShadowMaskQuarter"; String: "4"
|
||||
Filename: "{app}\Data\profiles\Default\skyrimprefs.ini"; Section: "Display"; Key: "iSize W"; String: "{code:GetScreenWidth}"
|
||||
Filename: "{app}\Data\profiles\Default\skyrimprefs.ini"; Section: "Display"; Key: "iSize H"; String: "{code:GetScreenHeight}"
|
||||
Filename: "{app}\Data\profiles\Default\skyrimprefs.ini"; Section: "Controls"; Key: "fMouseHeadingSensitivity"; String: "0.0320"; Flags: createkeyifdoesntexist
|
||||
|
||||
[Icons]
|
||||
@ -327,3 +329,20 @@ begin
|
||||
S := S + NewLine + Space + 'v' + sSkyrimVersion;
|
||||
Result := S;
|
||||
end;
|
||||
|
||||
function GetSystemMetrics(nIndex: Integer): Integer;
|
||||
external 'GetSystemMetrics@User32.dll stdcall setuponly';
|
||||
|
||||
Const
|
||||
SM_CXSCREEN = 0; // The enum-value for getting the width of the cient area for a full-screen window on the primary display monitor, in pixels.
|
||||
SM_CYSCREEN = 1; // The enum-value for getting the height of the client area for a full-screen window on the primary display monitor, in pixels.
|
||||
|
||||
function GetScreenWidth(Param: String): String;
|
||||
begin
|
||||
Result := IntToStr(GetSystemMetrics(SM_CXSCREEN));
|
||||
end;
|
||||
|
||||
function GetScreenHeight(Param: String): String;
|
||||
begin
|
||||
Result := IntToStr(GetSystemMetrics(SM_CYSCREEN));
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user