Skip to content

Commit

Permalink
Fix DPI scaling in Wine 9.17+
Browse files Browse the repository at this point in the history
  • Loading branch information
robbert-vdh committed Oct 6, 2024
1 parent 921d2e8 commit 2ad8aba
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Versioning](https://semver.org/spec/v2.0.0.html).

### Fixed

- Fixed DPI scaling causing windows contents to become larger than they should
be when using **Wine 9.17+** and Wine's font DPI scaling feature.
- Fixed a potential segfault when unloading yabridge.

## [5.1.0] - 2023-12-23
Expand Down
6 changes: 6 additions & 0 deletions src/wine-host/host.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,12 @@ int YABRIDGE_EXPORT

std::cerr << "Initializing " << host_name << std::endl;

// NOTE: Without this, Wine 9.17+ will try to scale surface bitmaps in the
// X11 driver, which results in window client areas being larger than
// should be.
// https://github.com/robbert-vdh/yabridge/issues/368
SetProcessDpiAwarenessContext(DPI_AWARENESS_CONTEXT_SYSTEM_AWARE);

// NOTE: Some plugins use Microsoft COM, but don't initialize it first and
// just pray the host does it for them. Examples of this are
// PSPaudioware's InfiniStrip and Shattered Glass Audio Code Red Free.
Expand Down

0 comments on commit 2ad8aba

Please sign in to comment.