From 08d84e0f6c3b8edbf199bb7635784284e87773a2 Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 12 Feb 2015 16:18:16 +0000 Subject: [PATCH] Fix windows build --- source/modules/dgl/src/pugl/pugl_win.cpp | 2 ++ source/native-plugins/_data.cpp | 2 +- source/native-plugins/distrho-mverb.cpp | 9 +++++---- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/source/modules/dgl/src/pugl/pugl_win.cpp b/source/modules/dgl/src/pugl/pugl_win.cpp index 8334bf6cd..ea3b11255 100644 --- a/source/modules/dgl/src/pugl/pugl_win.cpp +++ b/source/modules/dgl/src/pugl/pugl_win.cpp @@ -52,6 +52,7 @@ static HINSTANCE hInstance = NULL; LRESULT CALLBACK wndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam); +#if 0 extern "C" { BOOL WINAPI DllMain(HINSTANCE hInst, DWORD, LPVOID) @@ -60,6 +61,7 @@ DllMain(HINSTANCE hInst, DWORD, LPVOID) return 1; } } // extern "C" +#endif PuglInternals* puglInitInternals() diff --git a/source/native-plugins/_data.cpp b/source/native-plugins/_data.cpp index e540624fd..6ca12eccb 100644 --- a/source/native-plugins/_data.cpp +++ b/source/native-plugins/_data.cpp @@ -377,7 +377,7 @@ static const NativePluginDescriptor sNativePluginDescriptors[] = { }, { /* category */ NATIVE_PLUGIN_CATEGORY_DELAY, -#ifdef HAVE_DGL +#if defined(HAVE_DGL) && ! defined(CARLA_OS_WIN) /* hints */ static_cast(NATIVE_PLUGIN_IS_RTSAFE |NATIVE_PLUGIN_HAS_UI |NATIVE_PLUGIN_NEEDS_UI_MAIN_THREAD diff --git a/source/native-plugins/distrho-mverb.cpp b/source/native-plugins/distrho-mverb.cpp index c81f920e2..79230ed50 100644 --- a/source/native-plugins/distrho-mverb.cpp +++ b/source/native-plugins/distrho-mverb.cpp @@ -16,9 +16,10 @@ */ // config fix +#include "CarlaDefines.h" #include "distrho-mverb/DistrhoPluginInfo.h" -#if DISTRHO_PLUGIN_HAS_UI && ! defined(HAVE_DGL) +#if DISTRHO_PLUGIN_HAS_UI && (defined(CARLA_OS_WIN) || ! defined(HAVE_DGL)) # undef DISTRHO_PLUGIN_HAS_UI # define DISTRHO_PLUGIN_HAS_UI 0 #endif @@ -26,7 +27,7 @@ // Plugin Code #include "distrho-mverb/DistrhoArtworkMVerb.cpp" #include "distrho-mverb/DistrhoPluginMVerb.cpp" -#ifdef HAVE_DGL +#if DISTRHO_PLUGIN_HAS_UI #include "distrho-mverb/DistrhoUIMVerb.cpp" #include "distrho-mverb/font/Kh-Kangrey.cpp" #endif @@ -34,7 +35,7 @@ // DISTRHO Code #define DISTRHO_PLUGIN_TARGET_CARLA #include "DistrhoPluginMain.cpp" -#ifdef HAVE_DGL +#if DISTRHO_PLUGIN_HAS_UI #include "DistrhoUIMain.cpp" #endif @@ -44,7 +45,7 @@ START_NAMESPACE_DISTRHO static const NativePluginDescriptor _mverbDesc = { /* category */ NATIVE_PLUGIN_CATEGORY_DELAY, -#ifdef HAVE_DGL +#if DISTRHO_PLUGIN_HAS_UI /* hints */ static_cast(NATIVE_PLUGIN_IS_RTSAFE |NATIVE_PLUGIN_HAS_UI |NATIVE_PLUGIN_NEEDS_UI_MAIN_THREAD