1
0
Fork 0

Add a todo for fallback DPI scale detection

This commit is contained in:
Robbert van der Helm 2022-04-27 19:26:39 +02:00
parent ae31e416c2
commit 4fb67a720b

View file

@ -457,6 +457,13 @@ impl<P: Vst3Plugin> IPlugView for WrapperView<P> {
impl<P: Vst3Plugin> IPlugViewContentScaleSupport for WrapperView<P> {
unsafe fn set_scale_factor(&self, factor: f32) -> tresult {
// TODO: So apparently Ableton Live doesn't call this function. Right now we'll hardcode the
// default scale to 1.0 on Linux and Windows since we can't easily get the scale from
// baseview. A better alternative would be to do the fallback DPI scale detection
// within NIH-plug itself. Then we can still only use baseview's system scale policy
// on macOS and both the editor implementation and the wrappers would know about the
// correct scale.
// On macOS scaling is done by the OS, and all window sizes are in logical pixels
if cfg!(target_os = "macos") {
nih_debug_assert_failure!("Ignoring host request to set explicit DPI scaling factor");