Fix #1
This commit is contained in:
parent
b9be78a102
commit
8d7d4f2d39
14
src/main.cpp
14
src/main.cpp
@ -78,10 +78,22 @@ FARPROC load_binary(const launcher::mode mode)
|
||||
return loader.load(self);
|
||||
}
|
||||
|
||||
void enable_dpi_awareness()
|
||||
{
|
||||
const utils::nt::library user32{"user32.dll"};
|
||||
const auto set_dpi = user32
|
||||
? user32.get_proc<BOOL(WINAPI*)(DPI_AWARENESS_CONTEXT)>("SetProcessDpiAwarenessContext")
|
||||
: nullptr;
|
||||
if (set_dpi)
|
||||
{
|
||||
set_dpi(DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2);
|
||||
}
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
FARPROC entry_point;
|
||||
SetProcessDpiAwarenessContext(DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2);
|
||||
enable_dpi_awareness();
|
||||
|
||||
{
|
||||
auto premature_shutdown = true;
|
||||
|
Loading…
Reference in New Issue
Block a user