Skip to content

Commit

Permalink
[gui] Set DPI awareness context to per-monitor-aware to create pixel …
Browse files Browse the repository at this point in the history
…perfect windows without system scaling.
  • Loading branch information
bobcao3 committed May 3, 2021
1 parent afdefbe commit 23efb42
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions taichi/gui/win32.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,8 @@ void GUI::process_event() {
void GUI::create_window() {
auto CLASS_NAME = L"Taichi Win32 Window";

SetThreadDpiAwarenessContext(DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE);

WNDCLASS wc = {};

wc.lpfnWndProc = WindowProc;
Expand Down

0 comments on commit 23efb42

Please sign in to comment.