refactor(main): move SetProcessDPIAware to manifests (#1413)

This commit is contained in:
Takase 2023-03-09 21:58:32 +08:00 committed by George Sokianos
parent 703b14170b
commit d31f128ef9
2 changed files with 8 additions and 7 deletions

View File

@ -24,6 +24,13 @@
/>
</dependentAssembly>
</dependency>
<asmv3:application xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
<asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
<dpiAware>true</dpiAware>
</asmv3:windowsSettings>
</asmv3:application>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!--The ID below indicates application support for Windows Vista -->

View File

@ -144,13 +144,7 @@ void set_macos_bundle_resources(lua_State *L);
#endif
int main(int argc, char **argv) {
#ifdef _WIN32
HINSTANCE lib = LoadLibrary("user32.dll");
int (*SetProcessDPIAware)() = (void*) GetProcAddress(lib, "SetProcessDPIAware");
SetProcessDPIAware();
#elif defined(__amigaos4__) || defined(__morphos__)
setlocale(LC_ALL, "C");
#else
#ifndef _WIN32
signal(SIGPIPE, SIG_IGN);
#endif