Browse Source

Remove MileEnablePerMonitorDialogScaling usage because we can always use Per-Monitor (V2) DPI Awareness with the 2025 baseline.

main
MouriNaruto 20 hours ago
parent
commit
c2c896525e
  1. 20
      NanaZip.Core/SevenZip/CPP/7zip/Bundles/SFXSetup/SfxSetup.cpp
  2. 6
      NanaZip.Core/SevenZip/CPP/7zip/Bundles/SFXWin/SfxWin.cpp

20
NanaZip.Core/SevenZip/CPP/7zip/Bundles/SFXSetup/SfxSetup.cpp

@ -60,7 +60,7 @@ static bool ReadDataString(CFSTR fileName, LPCSTR startID,
Byte buffer[kBufferSize];
const unsigned signatureStartSize = MyStringLen(startID);
const unsigned signatureEndSize = MyStringLen(endID);
size_t numBytesPrev = 0;
bool writeMode = false;
UInt64 posTotal = 0;
@ -157,8 +157,6 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /* hPrevInstance */,
{
ShowErrorMessage(L"Cannot enable security mitigations");
}
::MileEnablePerMonitorDialogScaling();
// **************** NanaZip Modification End ****************
#ifdef _WIN32
@ -220,7 +218,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /* hPrevInstance */,
return 0;
}
appLaunched = GetTextConfigValue(pairs, "RunProgram");
#ifdef MY_SHELL_EXECUTE
executeFile = GetTextConfigValue(pairs, "ExecuteFile");
executeParameters = GetTextConfigValue(pairs, "ExecuteParameters");
@ -253,7 +251,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /* hPrevInstance */,
UString errorMessage;
HRESULT result = ExtractArchive(codecs, fullPath, tempDirPath, showProgress,
isCorrupt, errorMessage);
if (result != S_OK)
{
if (!assumeYes)
@ -279,7 +277,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /* hPrevInstance */,
if (!SetCurrentDir(tempDirPath))
return 1;
#endif
HANDLE hProcess = NULL;
#ifdef MY_SHELL_EXECUTE
if (!executeFile.IsEmpty())
@ -334,13 +332,13 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /* hPrevInstance */,
return 1;
}
}
{
FString s2 = tempDirPath;
NName::NormalizeDirPathPrefix(s2);
appLaunched.Replace(L"%%T" WSTRING_PATH_SEPARATOR, fs2us(s2));
}
const UString appNameForError = appLaunched; // actually we need to rtemove parameters also
appLaunched.Replace(L"%%T", fs2us(tempDirPath));
@ -358,11 +356,11 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /* hPrevInstance */,
startupInfo.dwFlags = 0;
startupInfo.cbReserved2 = 0;
startupInfo.lpReserved2 = NULL;
PROCESS_INFORMATION processInformation;
const CSysString appLaunchedSys (GetSystemString(dirPrefix + appLaunched));
const BOOL createResult = CreateProcess(NULL,
appLaunchedSys.Ptr_non_const(),
NULL, NULL, FALSE, 0, NULL, NULL /*tempDir.GetPath() */,

6
NanaZip.Core/SevenZip/CPP/7zip/Bundles/SFXWin/SfxWin.cpp

@ -112,7 +112,7 @@ static int APIENTRY WinMain2()
}
#endif
#endif
UString password;
bool assumeYes = false;
bool outputFolderDefined = false;
@ -204,7 +204,7 @@ static int APIENTRY WinMain2()
NExtract::NOverwriteMode::kAsk;
eo.PathMode = NExtract::NPathMode::kFullPaths;
eo.TestMode = false;
UStringVector v1, v2;
v1.Add(fs2us(fullPath));
v2.Add(fs2us(fullPath));
@ -265,8 +265,6 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /* hPrevInstance */,
{
ShowErrorMessage(L"Cannot enable security mitigations");
}
::MileEnablePerMonitorDialogScaling();
// **************** NanaZip Modification End ****************
try

Loading…
Cancel
Save