mirror of
https://github.com/robbert-vdh/nih-plug.git
synced 2026-07-01 02:36:54 +00:00
Add a todo for fallback DPI scale detection
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user