diff --git a/distrho/src/DistrhoPluginChecks.h b/distrho/src/DistrhoPluginChecks.h index 7d7883f6..910089db 100644 --- a/distrho/src/DistrhoPluginChecks.h +++ b/distrho/src/DistrhoPluginChecks.h @@ -146,12 +146,11 @@ // ----------------------------------------------------------------------- // Enable full state if plugin exports presets -// FIXME -// #if DISTRHO_PLUGIN_WANT_PROGRAMS && DISTRHO_PLUGIN_WANT_STATE && ! DISTRHO_PLUGIN_WANT_FULL_STATE -// # warning Plugins with programs and state need to implement full state API -// # undef DISTRHO_PLUGIN_WANT_FULL_STATE -// # define DISTRHO_PLUGIN_WANT_FULL_STATE 1 -// #endif +#if DISTRHO_PLUGIN_WANT_PROGRAMS && DISTRHO_PLUGIN_WANT_STATE && ! DISTRHO_PLUGIN_WANT_FULL_STATE +# warning Plugins with programs and state need to implement full state API too +# undef DISTRHO_PLUGIN_WANT_FULL_STATE +# define DISTRHO_PLUGIN_WANT_FULL_STATE 1 +#endif // ----------------------------------------------------------------------- // Disable UI if DGL or External UI is not available diff --git a/examples/States/DistrhoPluginInfo.h b/examples/States/DistrhoPluginInfo.h index 52e13568..383313a0 100644 --- a/examples/States/DistrhoPluginInfo.h +++ b/examples/States/DistrhoPluginInfo.h @@ -29,4 +29,7 @@ #define DISTRHO_PLUGIN_WANT_STATE 1 #define DISTRHO_UI_USER_RESIZABLE 1 +// states and presets together require this in order to function +#define DISTRHO_PLUGIN_WANT_FULL_STATE 1 + #endif // DISTRHO_PLUGIN_INFO_H_INCLUDED diff --git a/examples/States/ExamplePluginStates.cpp b/examples/States/ExamplePluginStates.cpp index 8d1c6c94..df52e07b 100644 --- a/examples/States/ExamplePluginStates.cpp +++ b/examples/States/ExamplePluginStates.cpp @@ -105,9 +105,9 @@ The plugin will be treated as an effect, but it will not change the host audio." * Init */ /** - This plugin has no parameters.. + This plugin has no parameters. */ - void initParameter(uint32_t, Parameter&) override {} + void initParameter(uint32_t, Parameter&) override {} /** Set the name of the program @a index. @@ -172,8 +172,8 @@ The plugin will be treated as an effect, but it will not change the host audio." /** This plugin has no parameters.. */ - void setParameterValue(uint32_t, float) override {} - float getParameterValue(uint32_t) const override { return 0.0f; } + void setParameterValue(uint32_t, float) override {} + float getParameterValue(uint32_t) const override { return 0.0f; } /** Load a program. @@ -208,7 +208,6 @@ The plugin will be treated as an effect, but it will not change the host audio." } } -#if DISTRHO_PLUGIN_WANT_FULL_STATE /* FIXME */ /** Get the value of an internal state. The host may call this function from any non-realtime context. @@ -240,7 +239,6 @@ The plugin will be treated as an effect, but it will not change the host audio." return sFalse; } -#endif /** Change an internal state. diff --git a/examples/States/Makefile b/examples/States/Makefile index 408bd014..0a0bfb77 100644 --- a/examples/States/Makefile +++ b/examples/States/Makefile @@ -30,10 +30,6 @@ ifeq ($(HAVE_OPENGL),true) TARGETS += jack endif # HAVE_OPENGL -ifneq ($(MACOS_OR_WINDOWS),true) -TARGETS += dssi -endif # MACOS_OR_WINDOWS - ifeq ($(HAVE_OPENGL),true) TARGETS += lv2_sep else