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. (#2320)
  • Loading branch information
bobcao3 authored May 6, 2021
1 parent 10bc0bc commit 865c22a
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 865c22a

Please sign in to comment.