Skip to content

Commit b6c4147

Browse files
committed
Introduce FLUTTER_WAYLAND_PIXEL_RATIO env. variable
FLUTTER_WAYLAND_PIXEL_RATIO=<double> can be used to overwrite the pixel aspect ratio reported to the engine by FlutterEngineSendWindowMetricsEvent(). See also: https://api.flutter.dev/flutter/dart-ui/Window/devicePixelRatio.html
1 parent ff5f25d commit b6c4147

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/wayland_display.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,7 @@ static double get_pixel_ratio(int32_t physical_width, int32_t physical_height, i
4242
return 1.0;
4343
}
4444

45-
// TODO
46-
return 1.0;
45+
return getEnv("FLUTTER_WAYLAND_PIXEL_RATIO", 1.0);
4746
}
4847

4948
static inline WaylandDisplay *get_wayland_display(void *data, const bool check_non_null = true) {

0 commit comments

Comments
 (0)