windows: Mark app as high-dpi aware

This commit is contained in:
Amaryllis Kulla 2021-12-07 07:09:20 +01:00
parent a91acbe6ef
commit ca71e6ecb7
4 changed files with 20 additions and 1 deletions

View File

@ -276,7 +276,7 @@ int main(int argc, char *argv[])
} }
SDL_Window *win; SDL_Window *win;
Uint32 winFlags = SDL_WINDOW_OPENGL | SDL_WINDOW_INPUT_FOCUS; Uint32 winFlags = SDL_WINDOW_OPENGL | SDL_WINDOW_INPUT_FOCUS | SDL_WINDOW_ALLOW_HIGHDPI;
if (conf.winResizable) if (conf.winResizable)
winFlags |= SDL_WINDOW_RESIZABLE; winFlags |= SDL_WINDOW_RESIZABLE;

16
windows/mkxp.exe.manifest Normal file
View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly
xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"
xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
<assemblyIdentity type="win32" name="mapleshrine.ancurio.mkxp" version="0.99.0.0"/>
<asmv3:application>
<asmv3:windowsSettings>
<dpiAware
xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true
</dpiAware>
<dpiAwareness
xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2
</dpiAwareness>
</asmv3:windowsSettings>
</asmv3:application>
</assembly>

View File

@ -1 +1,2 @@
#define IDI_MANIFEST 1
#define IDI_APPICON 101 #define IDI_APPICON 101

View File

@ -1,4 +1,6 @@
#include <windows.h> #include <windows.h>
#include <winuser.h>
#include "resource.h" #include "resource.h"
IDI_MANIFEST RT_MANIFEST "mkxp.exe.manifest"
IDI_APPICON ICON "icon.ico" IDI_APPICON ICON "icon.ico"