From 0845a0ffa2d30e79ce6b3ada0cd2fdb06f76ca32 Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 8 Oct 2021 10:33:14 +0100 Subject: [PATCH] Rename --- .gitmodules | 8 +-- Makefile | 30 ++++++------ README.md | 4 +- .../CardinalPlugin.cpp} | 49 +++++++++++-------- .../CVCRackUI.cpp => Cardinal/CardinalUI.cpp} | 40 +++++++++------ .../{CVCRack => Cardinal}/DistrhoPluginInfo.h | 10 ++-- plugins/{CVCRack => Cardinal}/Makefile | 6 +-- plugins/{CVCRack => Cardinal}/Rack | 0 .../{CVCRack => Cardinal}/ResizeHandle.hpp | 0 plugins/{CVCRack => Cardinal}/Window.cpp | 10 ++-- .../mingw-compat/Shlobj.h | 0 .../mingw-compat/Shlwapi.h | 0 .../mingw-compat/Windows.h | 0 .../mingw-compat/condition_variable | 0 .../{CVCRack => Cardinal}/mingw-compat/mutex | 0 .../{CVCRack => Cardinal}/mingw-compat/thread | 0 .../{CVCRack => Cardinal}/mingw-std-threads | 0 17 files changed, 86 insertions(+), 71 deletions(-) rename plugins/{CVCRack/CVCRackPlugin.cpp => Cardinal/CardinalPlugin.cpp} (77%) rename plugins/{CVCRack/CVCRackUI.cpp => Cardinal/CardinalUI.cpp} (79%) rename plugins/{CVCRack => Cardinal}/DistrhoPluginInfo.h (80%) rename plugins/{CVCRack => Cardinal}/Makefile (98%) rename plugins/{CVCRack => Cardinal}/Rack (100%) rename plugins/{CVCRack => Cardinal}/ResizeHandle.hpp (100%) rename plugins/{CVCRack => Cardinal}/Window.cpp (98%) rename plugins/{CVCRack => Cardinal}/mingw-compat/Shlobj.h (100%) rename plugins/{CVCRack => Cardinal}/mingw-compat/Shlwapi.h (100%) rename plugins/{CVCRack => Cardinal}/mingw-compat/Windows.h (100%) rename plugins/{CVCRack => Cardinal}/mingw-compat/condition_variable (100%) rename plugins/{CVCRack => Cardinal}/mingw-compat/mutex (100%) rename plugins/{CVCRack => Cardinal}/mingw-compat/thread (100%) rename plugins/{CVCRack => Cardinal}/mingw-std-threads (100%) diff --git a/.gitmodules b/.gitmodules index 3f67ffd..d3ee55a 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,9 +1,9 @@ -[submodule "plugins/CVCRack/Rack"] - path = plugins/CVCRack/Rack +[submodule "plugins/Cardinal/Rack"] + path = plugins/Cardinal/Rack url = https://github.com/VCVRack/Rack.git [submodule "dpf"] path = dpf url = https://github.com/DISTRHO/DPF.git -[submodule "plugins/CVCRack/mingw-std-threads"] - path = plugins/CVCRack/mingw-std-threads +[submodule "plugins/Cardinal/mingw-std-threads"] + path = plugins/Cardinal/mingw-std-threads url = https://github.com/meganz/mingw-std-threads.git diff --git a/Makefile b/Makefile index 7a41563..49a3382 100644 --- a/Makefile +++ b/Makefile @@ -8,15 +8,13 @@ include dpf/Makefile.base.mk all: dgl plugins gen -SKIP_NANOVG = true - # -------------------------------------------------------------- dgl: - $(MAKE) -C dpf/dgl opengl + $(MAKE) SKIP_NANOVG=true -C dpf/dgl opengl plugins: dgl - $(MAKE) all -C plugins/CVCRack + $(MAKE) all -C plugins/Cardinal ifneq ($(CROSS_COMPILING),true) gen: plugins dpf/utils/lv2_ttl_generator @@ -36,19 +34,19 @@ endif clean: $(MAKE) clean -C dpf/dgl $(MAKE) clean -C dpf/utils/lv2-ttl-generator - $(MAKE) clean -C plugins/CVCRack + $(MAKE) clean -C plugins/Cardinal rm -rf bin build - rm -rf plugins/CVCRack/Rack/dep/bin - rm -rf plugins/CVCRack/Rack/dep/include - rm -rf plugins/CVCRack/Rack/dep/lib - rm -rf plugins/CVCRack/Rack/dep/share - rm -rf plugins/CVCRack/Rack/dep/curl-7.66.0 - rm -rf plugins/CVCRack/Rack/dep/glew-2.1.0 - rm -rf plugins/CVCRack/Rack/dep/jansson-2.12 - rm -rf plugins/CVCRack/Rack/dep/libarchive-3.4.3 - rm -rf plugins/CVCRack/Rack/dep/openssl-1.1.1d - rm -rf plugins/CVCRack/Rack/dep/speexdsp-SpeexDSP-1.2rc3 - rm -rf plugins/CVCRack/Rack/dep/zstd-1.4.5 + rm -rf plugins/Cardinal/Rack/dep/bin + rm -rf plugins/Cardinal/Rack/dep/include + rm -rf plugins/Cardinal/Rack/dep/lib + rm -rf plugins/Cardinal/Rack/dep/share + rm -rf plugins/Cardinal/Rack/dep/curl-7.66.0 + rm -rf plugins/Cardinal/Rack/dep/glew-2.1.0 + rm -rf plugins/Cardinal/Rack/dep/jansson-2.12 + rm -rf plugins/Cardinal/Rack/dep/libarchive-3.4.3 + rm -rf plugins/Cardinal/Rack/dep/openssl-1.1.1d + rm -rf plugins/Cardinal/Rack/dep/speexdsp-SpeexDSP-1.2rc3 + rm -rf plugins/Cardinal/Rack/dep/zstd-1.4.5 # -------------------------------------------------------------- diff --git a/README.md b/README.md index 6a273f1..4dbff37 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,6 @@ -# DISTRHO CVCRack +# DISTRHO Cardinal + +*Cardinal, bring forth the Rack!* WORK IN PROGRESS - nothing to see here diff --git a/plugins/CVCRack/CVCRackPlugin.cpp b/plugins/Cardinal/CardinalPlugin.cpp similarity index 77% rename from plugins/CVCRack/CVCRackPlugin.cpp rename to plugins/Cardinal/CardinalPlugin.cpp index d55a3d5..277a43c 100644 --- a/plugins/CVCRack/CVCRackPlugin.cpp +++ b/plugins/Cardinal/CardinalPlugin.cpp @@ -1,17 +1,18 @@ /* - * DISTRHO CVCRack Plugin + * DISTRHO Cardinal Plugin * Copyright (C) 2021 Filipe Coelho * - * Permission to use, copy, modify, and/or distribute this software for any purpose with - * or without fee is hereby granted, provided that the above copyright notice and this - * permission notice appear in all copies. + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 3 of + * the License, or any later version. * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD - * TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN - * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER - * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * For a full copy of the GNU General Public License see the LICENSE file. */ #include @@ -35,6 +36,15 @@ START_NAMESPACE_DISTRHO // ----------------------------------------------------------------------------------------------------------- +// The following code was based from VCVRack adapters/standalone.cpp + +/* + Copyright (C) 2016-2021 VCV + + This program is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. +*/ struct Initializer { Initializer() @@ -121,13 +131,12 @@ static const Initializer& getInitializerInstance() return init; } -/** - Plugin to demonstrate parameter outputs using meters. - */ -class CVCRackPlugin : public Plugin +// ----------------------------------------------------------------------------------------------------------- + +class CardinalPlugin : public Plugin { public: - CVCRackPlugin() + CardinalPlugin() : Plugin(0, 0, 0) { } @@ -142,7 +151,7 @@ protected: */ const char* getLabel() const override { - return "CVCRack"; + return "Cardinal"; } /** @@ -166,7 +175,7 @@ protected: */ const char* getHomePage() const override { - return "https://github.com/DISTRHO/CVCRack"; + return "https://github.com/DISTRHO/Cardinal"; } /** @@ -192,7 +201,7 @@ protected: */ int64_t getUniqueId() const override { - return d_cconst('d', 'C', 'V', 'C'); + return d_cconst('d', 'C', 'd', 'n'); } /* -------------------------------------------------------------------------------------------------------- @@ -223,7 +232,7 @@ private: /** Set our plugin class as non-copyable and add a leak detector just in case. */ - DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(CVCRackPlugin) + DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(CardinalPlugin) }; /* ------------------------------------------------------------------------------------------------------------ @@ -232,7 +241,7 @@ private: Plugin* createPlugin() { getInitializerInstance(); - return new CVCRackPlugin(); + return new CardinalPlugin(); } // ----------------------------------------------------------------------------------------------------------- diff --git a/plugins/CVCRack/CVCRackUI.cpp b/plugins/Cardinal/CardinalUI.cpp similarity index 79% rename from plugins/CVCRack/CVCRackUI.cpp rename to plugins/Cardinal/CardinalUI.cpp index 30495df..a00c846 100644 --- a/plugins/CVCRack/CVCRackUI.cpp +++ b/plugins/Cardinal/CardinalUI.cpp @@ -1,17 +1,18 @@ /* - * DISTRHO CVCRack Plugin + * DISTRHO Cardinal Plugin * Copyright (C) 2021 Filipe Coelho * - * Permission to use, copy, modify, and/or distribute this software for any purpose with - * or without fee is hereby granted, provided that the above copyright notice and this - * permission notice appear in all copies. + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 3 of + * the License, or any later version. * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD - * TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN - * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER - * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * For a full copy of the GNU General Public License see the LICENSE file. */ #include @@ -64,16 +65,25 @@ static const Initializer2& getInitializer2Instance() return init; } -class CVCRackUI : public UI +class CardinalUI : public UI { ResizeHandle fResizeHandle; public: - CVCRackUI() + CardinalUI() : UI(1280, 720), fResizeHandle(this) { using namespace rack; + /* + The following code was based from VCVRack adapters/standalone.cpp + + Copyright (C) 2016-2021 VCV + + This program is free software: you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + */ // Initialize context INFO("Initializing context"); window::lastUI = this; @@ -92,7 +102,7 @@ public: APP->engine->startFallbackThread(); } - ~CVCRackUI() override + ~CardinalUI() override { using namespace rack; @@ -183,7 +193,7 @@ private: /** Set our UI class as non-copyable and add a leak detector just in case. */ - DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(CVCRackUI) + DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(CardinalUI) }; /* ------------------------------------------------------------------------------------------------------------ @@ -192,7 +202,7 @@ private: UI* createUI() { getInitializer2Instance(); - return new CVCRackUI(); + return new CardinalUI(); } // ----------------------------------------------------------------------------------------------------------- diff --git a/plugins/CVCRack/DistrhoPluginInfo.h b/plugins/Cardinal/DistrhoPluginInfo.h similarity index 80% rename from plugins/CVCRack/DistrhoPluginInfo.h rename to plugins/Cardinal/DistrhoPluginInfo.h index 0e8af8f..9fc88fb 100644 --- a/plugins/CVCRack/DistrhoPluginInfo.h +++ b/plugins/Cardinal/DistrhoPluginInfo.h @@ -1,10 +1,10 @@ /* - * DISTRHO CVCRack Plugin + * DISTRHO Cardinal Plugin * Copyright (C) 2021 Filipe Coelho * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of + * published by the Free Software Foundation; either version 3 of * the License, or any later version. * * This program is distributed in the hope that it will be useful, @@ -12,15 +12,15 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * For a full copy of the license see the LICENSE file. + * For a full copy of the GNU General Public License see the LICENSE file. */ #ifndef DISTRHO_PLUGIN_INFO_H_INCLUDED #define DISTRHO_PLUGIN_INFO_H_INCLUDED #define DISTRHO_PLUGIN_BRAND "DISTRHO" -#define DISTRHO_PLUGIN_NAME "CVCRack" -#define DISTRHO_PLUGIN_URI "http://distrho.sf.net/plugins/CVCRack" +#define DISTRHO_PLUGIN_NAME "Cardinal" +#define DISTRHO_PLUGIN_URI "https://distrho.kx.studio/plugins/cardinal" #define DISTRHO_PLUGIN_HAS_UI 1 #define DISTRHO_PLUGIN_NUM_INPUTS 2 diff --git a/plugins/CVCRack/Makefile b/plugins/Cardinal/Makefile similarity index 98% rename from plugins/CVCRack/Makefile rename to plugins/Cardinal/Makefile index 8037eb2..bcf098c 100644 --- a/plugins/CVCRack/Makefile +++ b/plugins/Cardinal/Makefile @@ -7,16 +7,16 @@ # -------------------------------------------------------------- # Project name, used for binaries -NAME = CVCRack +NAME = Cardinal # -------------------------------------------------------------- # Files to build (DPF stuff) FILES_DSP = \ - CVCRackPlugin.cpp + CardinalPlugin.cpp FILES_UI = \ - CVCRackUI.cpp \ + CardinalUI.cpp \ Window.cpp # -------------------------------------------------------------- diff --git a/plugins/CVCRack/Rack b/plugins/Cardinal/Rack similarity index 100% rename from plugins/CVCRack/Rack rename to plugins/Cardinal/Rack diff --git a/plugins/CVCRack/ResizeHandle.hpp b/plugins/Cardinal/ResizeHandle.hpp similarity index 100% rename from plugins/CVCRack/ResizeHandle.hpp rename to plugins/Cardinal/ResizeHandle.hpp diff --git a/plugins/CVCRack/Window.cpp b/plugins/Cardinal/Window.cpp similarity index 98% rename from plugins/CVCRack/Window.cpp rename to plugins/Cardinal/Window.cpp index 0ee9abc..1d3cc6a 100644 --- a/plugins/CVCRack/Window.cpp +++ b/plugins/Cardinal/Window.cpp @@ -72,15 +72,10 @@ struct Window::Internal { std::string lastWindowTitle; - int lastWindowX = 0; - int lastWindowY = 0; - int lastWindowWidth = 0; - int lastWindowHeight = 0; - int frame = 0; bool ignoreNextMouseDelta = false; int frameSwapInterval = -1; - double monitorRefreshRate = 0.0; + double monitorRefreshRate = 60.0; // FIXME double frameTime = 0.0; double lastFrameDuration = 0.0; @@ -131,6 +126,7 @@ Window::Window() { osdialog_message(OSDIALOG_ERROR, OSDIALOG_OK, "Could not initialize NanoVG. Does your graphics card support OpenGL 2.0 or greater? If so, make sure you have the latest graphics drivers installed."); exit(1); } + d_stderr2("framebuffer is %p", fbVg); // Load default Blendish font uiFont = loadFont(asset::system("res/fonts/DejaVuSans.ttf")); @@ -305,7 +301,7 @@ void Window::cursorUnlock() { bool Window::isCursorLocked() { - return false; + return internal->ignoreNextMouseDelta; } diff --git a/plugins/CVCRack/mingw-compat/Shlobj.h b/plugins/Cardinal/mingw-compat/Shlobj.h similarity index 100% rename from plugins/CVCRack/mingw-compat/Shlobj.h rename to plugins/Cardinal/mingw-compat/Shlobj.h diff --git a/plugins/CVCRack/mingw-compat/Shlwapi.h b/plugins/Cardinal/mingw-compat/Shlwapi.h similarity index 100% rename from plugins/CVCRack/mingw-compat/Shlwapi.h rename to plugins/Cardinal/mingw-compat/Shlwapi.h diff --git a/plugins/CVCRack/mingw-compat/Windows.h b/plugins/Cardinal/mingw-compat/Windows.h similarity index 100% rename from plugins/CVCRack/mingw-compat/Windows.h rename to plugins/Cardinal/mingw-compat/Windows.h diff --git a/plugins/CVCRack/mingw-compat/condition_variable b/plugins/Cardinal/mingw-compat/condition_variable similarity index 100% rename from plugins/CVCRack/mingw-compat/condition_variable rename to plugins/Cardinal/mingw-compat/condition_variable diff --git a/plugins/CVCRack/mingw-compat/mutex b/plugins/Cardinal/mingw-compat/mutex similarity index 100% rename from plugins/CVCRack/mingw-compat/mutex rename to plugins/Cardinal/mingw-compat/mutex diff --git a/plugins/CVCRack/mingw-compat/thread b/plugins/Cardinal/mingw-compat/thread similarity index 100% rename from plugins/CVCRack/mingw-compat/thread rename to plugins/Cardinal/mingw-compat/thread diff --git a/plugins/CVCRack/mingw-std-threads b/plugins/Cardinal/mingw-std-threads similarity index 100% rename from plugins/CVCRack/mingw-std-threads rename to plugins/Cardinal/mingw-std-threads