commit bf9ba880ded48ed051983d26aa7c23ec918f66c3
parent 9d283b02f10824d4cd947a7d4b6d16b879f6e761
Author: Patrick Desaulniers <desaulniers.patrick@carrefour.cegepvicto.ca>
Date: Tue, 27 Nov 2018 02:55:45 -0500
Fix external UI build (#87)
* Fix external UI build
* Use default bool parameter in setWindowSize (non-DGL version)
Diffstat:
3 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/distrho/DistrhoUI.hpp b/distrho/DistrhoUI.hpp
@@ -67,12 +67,14 @@ public:
*/
bool isUserResizable() const noexcept;
+#ifdef HAVE_DGL
/**
Set geometry constraints for the UI when resized by the user, and optionally scale UI automatically.
@see Window::setGeometryConstraints(uint,uint,bool)
@see Window::setScaling(double)
*/
void setGeometryConstraints(uint minWidth, uint minHeight, bool keepAspectRatio, bool automaticallyScale = false);
+#endif
/* --------------------------------------------------------------------------------------------------------
* Host state */
diff --git a/distrho/src/DistrhoUI.cpp b/distrho/src/DistrhoUI.cpp
@@ -62,6 +62,7 @@ bool UI::isUserResizable() const noexcept
return pData->userResizable;
}
+#ifdef HAVE_DGL
void UI::setGeometryConstraints(uint minWidth, uint minHeight, bool keepAspectRatio, bool automaticallyScale)
{
DISTRHO_SAFE_ASSERT_RETURN(minWidth > 0,);
@@ -72,7 +73,9 @@ void UI::setGeometryConstraints(uint minWidth, uint minHeight, bool keepAspectRa
pData->minHeight = minHeight;
getParentWindow().setGeometryConstraints(minWidth, minHeight, keepAspectRatio);
+
}
+#endif
/* ------------------------------------------------------------------------------------------------------------
* Host state */
diff --git a/distrho/src/DistrhoUIInternal.hpp b/distrho/src/DistrhoUIInternal.hpp
@@ -460,7 +460,7 @@ public:
return glWindow.handlePluginSpecial(press, key);
}
#else
- void setWindowSize(const uint, const uint, const bool) {}
+ void setWindowSize(const uint, const uint, const bool = false) {}
void setWindowTransientWinId(const uintptr_t) {}
bool setWindowVisible(const bool) { return true; }
#endif