mirror of
https://bitbucket.org/CPMADevs/cnq3
synced 2024-11-10 06:31:48 +00:00
disabled DPI scaling on the Windows client
This commit is contained in:
parent
8900291f0d
commit
93950031b9
7 changed files with 28 additions and 9 deletions
|
@ -165,6 +165,8 @@ chg: remove the byzantine r_mode usage added in 1.47
|
|||
|
||||
Windows:
|
||||
|
||||
fix: disabled DPI scaling on the client
|
||||
|
||||
add: in_minimize registers a hotkey to minimize/restore the client
|
||||
key names must be separated by white space and there can be at most 2 modifier keys
|
||||
|
||||
|
|
2
code/win32/client.manifest
Normal file
2
code/win32/client.manifest
Normal file
|
@ -0,0 +1,2 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"><trustInfo xmlns="urn:schemas-microsoft-com:asm.v3"><security><requestedPrivileges><requestedExecutionLevel level="asInvoker" uiAccess="false"></requestedExecutionLevel></requestedPrivileges></security></trustInfo><application xmlns="urn:schemas-microsoft-com:asm.v3"><windowsSettings><dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">True/PM</dpiAware></windowsSettings></application></assembly>
|
17
code/win32/client_manifest.txt
Normal file
17
code/win32/client_manifest.txt
Normal file
|
@ -0,0 +1,17 @@
|
|||
We embed a manifest in the client executables to disable DPI scaling.
|
||||
|
||||
There are 2 settings to do so:
|
||||
a) <dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">True/PM</dpiAware>
|
||||
b) <dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitor</dpiAwareness>
|
||||
Note that the 2 XML namespaces are actually slightly different.
|
||||
|
||||
"dpiAwareness" is only used for Windows 10 v1607 or later and overrides "dpiAware".
|
||||
Since "dpiAware" is currently enough for every OS CNQ3 currently ships on, we don't use "dpiAwareness" (for now).
|
||||
|
||||
"dpiAware" "True/PM" means:
|
||||
- system DPI aware on Vista, 7 and 8.0
|
||||
- per-monitor DPI aware on 8.1 and 10
|
||||
|
||||
Why only system DPI aware on Vista, 7 and 8.0?
|
||||
Because they don't support changing DPI scaling on the fly.
|
||||
You have to log off and log in for the changes to take effect.
|
|
@ -483,6 +483,9 @@ local function ApplyExeProjectSettings(exeName, server)
|
|||
-- LINK accepts .res files directly
|
||||
filter "action:vs*"
|
||||
linkoptions { path.translate(make_path_src.."/win32/winquake.res", "\\"), "/STACK:8388608" }
|
||||
if (server == 0) then
|
||||
linkoptions { "/MANIFEST:EMBED", "/MANIFESTINPUT:"..path.translate(make_path_src.."/win32/client.manifest", "\\") }
|
||||
end
|
||||
|
||||
filter { "action:vs*", "configurations:release" }
|
||||
linkoptions { "/OPT:REF", "/OPT:ICF" }
|
||||
|
|
|
@ -118,7 +118,7 @@
|
|||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>Winmm.lib;ws2_32.lib;Version.lib;opengl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>..\..\.build\debug_x32;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalOptions> ..\..\code\win32\winquake.res /STACK:8388608 %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalOptions> ..\..\code\win32\winquake.res /STACK:8388608 /MANIFEST:EMBED /MANIFESTINPUT:..\..\code\win32\client.manifest %(AdditionalOptions)</AdditionalOptions>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>"..\create_git_header.cmd" "..\..\code\qcommon\git.h"</Command>
|
||||
|
@ -147,7 +147,7 @@ copy "..\..\.bin\debug_x32\cnq3-x86.pdb" "$(QUAKE3DIR)"</Command>
|
|||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>Winmm.lib;ws2_32.lib;Version.lib;opengl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>..\..\.build\debug_x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalOptions> ..\..\code\win32\winquake.res /STACK:8388608 %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalOptions> ..\..\code\win32\winquake.res /STACK:8388608 /MANIFEST:EMBED /MANIFESTINPUT:..\..\code\win32\client.manifest %(AdditionalOptions)</AdditionalOptions>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>"..\create_git_header.cmd" "..\..\code\qcommon\git.h"</Command>
|
||||
|
@ -187,7 +187,7 @@ copy "..\..\.bin\debug_x64\cnq3-x64.pdb" "$(QUAKE3DIR)"</Command>
|
|||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalDependencies>Winmm.lib;ws2_32.lib;Version.lib;opengl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>..\..\.build\release_x32;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalOptions> ..\..\code\win32\winquake.res /STACK:8388608 /OPT:REF /OPT:ICF %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalOptions> ..\..\code\win32\winquake.res /STACK:8388608 /MANIFEST:EMBED /MANIFESTINPUT:..\..\code\win32\client.manifest /OPT:REF /OPT:ICF %(AdditionalOptions)</AdditionalOptions>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>"..\create_git_header.cmd" "..\..\code\qcommon\git.h"</Command>
|
||||
|
@ -226,7 +226,7 @@ copy "..\..\.bin\release_x32\cnq3-x86.pdb" "$(QUAKE3DIR)"</Command>
|
|||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalDependencies>Winmm.lib;ws2_32.lib;Version.lib;opengl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>..\..\.build\release_x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalOptions> ..\..\code\win32\winquake.res /STACK:8388608 /OPT:REF /OPT:ICF %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalOptions> ..\..\code\win32\winquake.res /STACK:8388608 /MANIFEST:EMBED /MANIFESTINPUT:..\..\code\win32\client.manifest /OPT:REF /OPT:ICF %(AdditionalOptions)</AdditionalOptions>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>"..\create_git_header.cmd" "..\..\code\qcommon\git.h"</Command>
|
||||
|
@ -299,7 +299,6 @@ copy "..\..\.bin\release_x64\cnq3-x64.pdb" "$(QUAKE3DIR)"</Command>
|
|||
<ClInclude Include="..\..\code\qcommon\vm_local.h" />
|
||||
<ClInclude Include="..\..\code\qcommon\vm_shim.h" />
|
||||
<ClInclude Include="..\..\code\renderer\qgl.h" />
|
||||
<ClInclude Include="..\..\code\renderer\qgl_linked.h" />
|
||||
<ClInclude Include="..\..\code\renderer\stb_image.h" />
|
||||
<ClInclude Include="..\..\code\renderer\tr_help.h" />
|
||||
<ClInclude Include="..\..\code\renderer\tr_local.h" />
|
||||
|
|
|
@ -210,9 +210,6 @@
|
|||
<ClInclude Include="..\..\code\renderer\qgl.h">
|
||||
<Filter>renderer</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\code\renderer\qgl_linked.h">
|
||||
<Filter>renderer</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\code\renderer\stb_image.h">
|
||||
<Filter>renderer</Filter>
|
||||
</ClInclude>
|
||||
|
|
|
@ -206,7 +206,6 @@
|
|||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\code\renderer\qgl.h" />
|
||||
<ClInclude Include="..\..\code\renderer\qgl_linked.h" />
|
||||
<ClInclude Include="..\..\code\renderer\stb_image.h" />
|
||||
<ClInclude Include="..\..\code\renderer\tr_help.h" />
|
||||
<ClInclude Include="..\..\code\renderer\tr_local.h" />
|
||||
|
|
Loading…
Reference in a new issue