Skip to content

Commit 45d8f02

Browse files
committed
Merge pull request #7560 from Bigpet/dpiaware
Add dpiawareness to manifest
2 parents af4b559 + 565da73 commit 45d8f02

6 files changed

Lines changed: 49 additions & 60 deletions

File tree

Windows/PPSSPP.manifest

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
2+
<assembly
3+
xmlns="urn:schemas-microsoft-com:asm.v3"
4+
manifestVersion="1.0">
5+
<assemblyIdentity
6+
processorArchitecture="*"
7+
version="5.1.0.0"
8+
type="win32"
9+
name="PPSSPPWindows.exe"/>
10+
<description>PPSSPP</description>
11+
<dependency>
12+
<dependentAssembly>
13+
<assemblyIdentity
14+
type="win32"
15+
name="Microsoft.Windows.Common-Controls"
16+
version="6.0.0.0"
17+
publicKeyToken="6595b64144ccf1df"
18+
language="*"
19+
processorArchitecture="*"/>
20+
</dependentAssembly>
21+
</dependency>
22+
<!-- Identify the application security requirements. -->
23+
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
24+
<security>
25+
<requestedPrivileges>
26+
<requestedExecutionLevel
27+
level="asInvoker"
28+
uiAccess="false"/>
29+
</requestedPrivileges>
30+
</security>
31+
</trustInfo>
32+
<application xmlns="urn:schemas-microsoft-com:asm.v3">
33+
<windowsSettings>
34+
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/pm</dpiAware>
35+
</windowsSettings>
36+
</application>
37+
</assembly>

Windows/PPSSPP.vcxproj

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,20 +98,24 @@
9898
<TargetName>PPSSPPDebug</TargetName>
9999
<IncludePath>..\dx9sdk\Include;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSdkDir)include;$(FrameworkSDKDir)\include;$(WindowsSDK_IncludePath);</IncludePath>
100100
<LibraryPath>..\dx9sdk\Lib\x86;$(VCInstallDir)lib;$(VCInstallDir)atlmfc\lib;$(WindowsSdkDir)lib;$(FrameworkSDKDir)\lib;$(WindowsSDK_LibraryPath_x86);</LibraryPath>
101+
<EmbedManifest>false</EmbedManifest>
101102
</PropertyGroup>
102103
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
103104
<TargetName>PPSSPPDebug64</TargetName>
104105
<IncludePath>..\dx9sdk\Include;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSdkDir)include;$(FrameworkSDKDir)\include;$(WindowsSDK_IncludePath)</IncludePath>
105106
<LibraryPath>..\dx9sdk\Lib\x64;$(VCInstallDir)lib\amd64;$(VCInstallDir)atlmfc\lib\amd64;$(WindowsSdkDir)lib\x64;$(WindowsSDK_LibraryPath_x64)</LibraryPath>
107+
<EmbedManifest>false</EmbedManifest>
106108
</PropertyGroup>
107109
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
108110
<TargetName>PPSSPPWindows64</TargetName>
109111
<IncludePath>..\dx9sdk\Include;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSdkDir)include;$(FrameworkSDKDir)\include;$(WindowsSDK_IncludePath)</IncludePath>
110112
<LibraryPath>..\dx9sdk\Lib\x64;$(VCInstallDir)lib\amd64;$(VCInstallDir)atlmfc\lib\amd64;$(WindowsSdkDir)lib\x64;$(WindowsSDK_LibraryPath_x64)</LibraryPath>
113+
<EmbedManifest>false</EmbedManifest>
111114
</PropertyGroup>
112115
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
113116
<IncludePath>..\dx9sdk\Include;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSdkDir)include;$(FrameworkSDKDir)\include;$(WindowsSDK_IncludePath)</IncludePath>
114117
<LibraryPath>..\dx9sdk\Lib\x86;$(VCInstallDir)lib;$(VCInstallDir)atlmfc\lib;$(WindowsSdkDir)lib;$(FrameworkSDKDir)\lib;$(WindowsSDK_LibraryPath_x86)</LibraryPath>
118+
<EmbedManifest>false</EmbedManifest>
115119
</PropertyGroup>
116120
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
117121
<ClCompile>
@@ -406,7 +410,6 @@
406410
<None Include="ppsspp.ico" />
407411
<None Include="icon1.ico" />
408412
<None Include="pspmode.png" />
409-
<None Include="rt_manif.bin" />
410413
<None Include="stop1.ico" />
411414
</ItemGroup>
412415
<ItemGroup>
@@ -437,6 +440,9 @@
437440
<Project>{004b8d11-2be3-4bd9-ab40-2be04cf2096f}</Project>
438441
</ProjectReference>
439442
</ItemGroup>
443+
<ItemGroup>
444+
<None Include="PPSSPP.manifest" />
445+
</ItemGroup>
440446
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
441447
<ImportGroup Label="ExtensionTargets">
442448
</ImportGroup>

Windows/PPSSPP.vcxproj.filters

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -277,9 +277,6 @@
277277
<None Include="icon1.ico">
278278
<Filter>Resource Files</Filter>
279279
</None>
280-
<None Include="rt_manif.bin">
281-
<Filter>Resource Files</Filter>
282-
</None>
283280
<None Include="stop1.ico">
284281
<Filter>Resource Files</Filter>
285282
</None>
@@ -326,10 +323,13 @@
326323
<None Include="..\assets\knownfuncs.ini">
327324
<Filter>Resource Files</Filter>
328325
</None>
326+
<None Include="PPSSPP.manifest">
327+
<Filter>Resource Files</Filter>
328+
</None>
329329
</ItemGroup>
330330
<ItemGroup>
331331
<ResourceCompile Include="ppsspp.rc">
332332
<Filter>Resource Files</Filter>
333333
</ResourceCompile>
334334
</ItemGroup>
335-
</Project>
335+
</Project>

Windows/main.cpp

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,6 @@ static std::string langRegion;
7171
static std::string osName;
7272
static std::string gpuDriverVersion;
7373

74-
typedef BOOL(WINAPI *isProcessDPIAwareProc)();
75-
typedef BOOL(WINAPI *setProcessDPIAwareProc)();
76-
7774
void LaunchBrowser(const char *url) {
7875
ShellExecute(NULL, L"open", ConvertUTF8ToWString(url).c_str(), NULL, NULL, SW_SHOWNORMAL);
7976
}
@@ -328,22 +325,6 @@ bool System_InputBoxGetWString(const wchar_t *title, const std::wstring &default
328325
}
329326
}
330327

331-
void MakePPSSPPDPIAware()
332-
{
333-
isProcessDPIAwareProc isDPIAwareProc = (isProcessDPIAwareProc)
334-
GetProcAddress(GetModuleHandle(TEXT("User32.dll")), "IsProcessDPIAware");
335-
336-
setProcessDPIAwareProc setDPIAwareProc = (setProcessDPIAwareProc)
337-
GetProcAddress(GetModuleHandle(TEXT("User32.dll")), "SetProcessDPIAware");
338-
339-
// If we're not DPI aware, make it so, but do it safely.
340-
if (isDPIAwareProc != nullptr) {
341-
if (!isDPIAwareProc()) {
342-
if (setDPIAwareProc != nullptr)
343-
setDPIAwareProc();
344-
}
345-
}
346-
}
347328

348329
std::vector<std::wstring> GetWideCmdLine() {
349330
wchar_t **wargv;
@@ -361,9 +342,6 @@ int WINAPI WinMain(HINSTANCE _hInstance, HINSTANCE hPrevInstance, LPSTR szCmdLin
361342

362343
CoInitializeEx(NULL, COINIT_MULTITHREADED);
363344

364-
// Windows Vista and above: alert Windows that PPSSPP is DPI aware,
365-
// so that we don't flicker in fullscreen on some PCs.
366-
MakePPSSPPDPIAware();
367345

368346
// FMA3 support in the 2013 CRT is broken on Vista and Windows 7 RTM (fixed in SP1). Just disable it.
369347
#ifdef _M_X64

Windows/ppsspp.rc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ IDB_IMAGE_PSP IMAGE "pspmode.png"
5353
// RT_MANIFEST
5454
//
5555

56-
1 RT_MANIFEST "rt_manif.bin"
56+
1 RT_MANIFEST "PPSSPP.manifest"
5757

5858

5959

Windows/rt_manif.bin

Lines changed: 0 additions & 32 deletions
This file was deleted.

0 commit comments

Comments
 (0)