diff --git a/Client/launch/Main.cpp b/Client/launch/Main.cpp index 9b82dde275..27f97b1cff 100644 --- a/Client/launch/Main.cpp +++ b/Client/launch/Main.cpp @@ -10,7 +10,6 @@ *****************************************************************************/ #include "StdInc.h" -#include /* IMPORTANT @@ -23,44 +22,6 @@ (set flag.new_client_exe on the build server to generate new exe) */ -/** - * @brief Applies the highest available form of DPI awareness for this process. - */ -void ApplyDpiAwareness() -{ - // Minimum version: Windows 10, version 1607 - using SetProcessDpiAwarenessContext_t = BOOL(WINAPI*)(DPI_AWARENESS_CONTEXT value); - - static SetProcessDpiAwarenessContext_t Win32SetProcessDpiAwarenessContext = ([] { - HMODULE user32 = LoadLibrary("user32"); - return user32 ? reinterpret_cast(static_cast(GetProcAddress(user32, "SetProcessDpiAwarenessContext"))) - : nullptr; - })(); - - if (Win32SetProcessDpiAwarenessContext) - { - Win32SetProcessDpiAwarenessContext(DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2); - return; - } - - // Minimum version: Windows 8.1 - using SetProcessDpiAwareness_t = HRESULT(WINAPI*)(PROCESS_DPI_AWARENESS value); - - static SetProcessDpiAwareness_t Win32SetProcessDpiAwareness = ([] { - HMODULE shcore = LoadLibrary("shcore"); - return shcore ? reinterpret_cast(static_cast(GetProcAddress(shcore, "SetProcessDpiAwareness"))) : nullptr; - })(); - - if (Win32SetProcessDpiAwareness) - { - Win32SetProcessDpiAwareness(PROCESS_PER_MONITOR_DPI_AWARE); - return; - } - - // Minimum version: Windows Vista - SetProcessDPIAware(); -} - /////////////////////////////////////////////////////////////// // // WinMain @@ -76,8 +37,6 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine return 1; } - ApplyDpiAwareness(); - // Group our processes and windows under a single taskbar button SetCurrentProcessExplicitAppUserModelID(L"Multi Theft Auto"); diff --git a/Client/launch/Multi Theft Auto.manifest b/Client/launch/Multi Theft Auto.manifest new file mode 100644 index 0000000000..159fa06d34 --- /dev/null +++ b/Client/launch/Multi Theft Auto.manifest @@ -0,0 +1,33 @@ + + + + + + + True/PM + PerMonitorV2, PerMonitor + + + + + + + + + + + + + + + + + + + diff --git a/Client/launch/premake5.lua b/Client/launch/premake5.lua index 70561e9420..4a8fed34f6 100644 --- a/Client/launch/premake5.lua +++ b/Client/launch/premake5.lua @@ -18,7 +18,7 @@ project "Client Launcher" vpaths { ["Headers/*"] = "**.h", ["Sources/*"] = "**.cpp", - ["Resources/*"] = {"*.rc", "**.ico", "**.xml"}, + ["Resources/*"] = {"*.rc", "**.ico", "**.xml", "**.manifest"}, ["*"] = "premake5.lua" } @@ -35,6 +35,7 @@ project "Client Launcher" "NEU/Multi Theft Auto.gdf.xml", "launch.rc", "Multi Theft Auto.rc", + "Multi Theft Auto.manifest", "resource/mtaicon.ico" }