fun with the c-preprocessor. platform dependent VST support.

This commit is contained in:
Robin Gareus 2014-04-14 17:54:21 +02:00
parent 57f09d5d9d
commit 18d4fd9f37

View file

@ -138,9 +138,15 @@ sigpipe_handler (int /*signal*/)
} }
} }
#if (defined(LXVST_SUPPORT) || (defined(COMPILER_MSVC) && defined(NDEBUG) && !defined(RDC_BUILD))) #if (defined WINDOWS_VST_SUPPORT && !defined PLATFORM_WINDOWS)
/*
* Release build with MSVC uses ardour_main()
*/
int ardour_main (int argc, char *argv[])
#ifdef LXVST_SUPPORT #elif (defined WINDOWS_VST_SUPPORT && !defined PLATFORM_WINDOWS)
// prototype for function in windows_vst_plugin_ui.cc
extern int windows_vst_gui_init (int* argc, char** argv[]); extern int windows_vst_gui_init (int* argc, char** argv[]);
/* this is called from the entry point of a wine-compiled /* this is called from the entry point of a wine-compiled
@ -148,7 +154,7 @@ extern int windows_vst_gui_init (int* argc, char** argv[]);
as a shared library. as a shared library.
*/ */
extern "C" { extern "C" {
#endif
int ardour_main (int argc, char *argv[]) int ardour_main (int argc, char *argv[])
#else #else
@ -167,9 +173,9 @@ int main (int argc, char *argv[])
gtk_set_locale (); gtk_set_locale ();
#endif #endif
#ifdef LXVST_SUPPORT #ifdef WINDOWS_VST_SUPPORT
/* this does some magic that is needed to make GTK and Wine's own /* this does some magic that is needed to make GTK and X11 client interact properly.
X11 client interact properly. * the platform dependent code is in windows_vst_plugin_ui.cc
*/ */
windows_vst_gui_init (&argc, &argv); windows_vst_gui_init (&argc, &argv);
#endif #endif
@ -263,6 +269,6 @@ int main (int argc, char *argv[])
return 0; return 0;
} }
#ifdef LXVST_SUPPORT #if (defined WINDOWS_VST_SUPPORT && !defined PLATFORM_WINDOWS)
} // end of extern "C" block } // end of extern "C" block
#endif #endif