From d2a504c04f92afe3af92af38c89c2cb5bb281e57 Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 3 Oct 2023 20:17:23 +0200 Subject: [PATCH 1/5] Update carla, dpf and pugl Signed-off-by: falkTX --- carla | 2 +- dpf | 2 +- src/custom/glfw.cpp | 28 +++++++++++++++------------- 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/carla b/carla index 9317df5..568fc96 160000 --- a/carla +++ b/carla @@ -1 +1 @@ -Subproject commit 9317df59709ae646f6e08a1e2c9834b4a0325101 +Subproject commit 568fc96aa376bee1f779d4d288b5095e8d67ca26 diff --git a/dpf b/dpf index 018e45d..3535934 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit 018e45db4a40d57761f12e797093e3699b1ca5e3 +Subproject commit 3535934e70810617b67a36c8fbdf3a67dbde8725 diff --git a/src/custom/glfw.cpp b/src/custom/glfw.cpp index b4fa62a..e3718d7 100644 --- a/src/custom/glfw.cpp +++ b/src/custom/glfw.cpp @@ -1,6 +1,6 @@ /* * DISTRHO Cardinal Plugin - * Copyright (C) 2021-2022 Filipe Coelho + * Copyright (C) 2021-2023 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 @@ -50,16 +50,16 @@ GLFWAPI void glfwSetClipboardString(GLFWwindow*, const char* const text) GLFWAPI GLFWcursor* glfwCreateStandardCursor(const int shape) { static GLFWcursor cursors[] = { - { kMouseCursorArrow }, // GLFW_ARROW_CURSOR - { kMouseCursorCaret }, // GLFW_IBEAM_CURSOR - { kMouseCursorCrosshair }, // GLFW_CROSSHAIR_CURSOR - { kMouseCursorHand }, // GLFW_POINTING_HAND_CURSOR - { kMouseCursorNotAllowed }, // GLFW_NOT_ALLOWED_CURSOR - { kMouseCursorLeftRight }, // GLFW_RESIZE_EW_CURSOR - { kMouseCursorUpDown }, // GLFW_RESIZE_NS_CURSOR - { kMouseCursorDiagonal }, // GLFW_RESIZE_NWSE_CURSOR - { kMouseCursorAntiDiagonal }, // GLFW_RESIZE_NESW_CURSOR - // NOTE GLFW_RESIZE_ALL_CURSOR is unsupported in pugl + { kMouseCursorArrow }, // GLFW_ARROW_CURSOR + { kMouseCursorCaret }, // GLFW_IBEAM_CURSOR + { kMouseCursorCrosshair }, // GLFW_CROSSHAIR_CURSOR + { kMouseCursorHand }, // GLFW_POINTING_HAND_CURSOR + { kMouseCursorNotAllowed }, // GLFW_NOT_ALLOWED_CURSOR + { kMouseCursorLeftRight }, // GLFW_RESIZE_EW_CURSOR + { kMouseCursorUpDown }, // GLFW_RESIZE_NS_CURSOR + { kMouseCursorUpLeftDownRight }, // GLFW_RESIZE_NWSE_CURSOR + { kMouseCursorUpRightDownLeft }, // GLFW_RESIZE_NESW_CURSOR + { kMouseCursorAllScroll }, // GLFW_RESIZE_ALL_CURSOR }; switch (shape) @@ -79,9 +79,11 @@ GLFWAPI GLFWcursor* glfwCreateStandardCursor(const int shape) case GLFW_RESIZE_NS_CURSOR: return &cursors[kMouseCursorUpDown]; case GLFW_RESIZE_NWSE_CURSOR: - return &cursors[kMouseCursorDiagonal]; + return &cursors[kMouseCursorUpLeftDownRight]; case GLFW_RESIZE_NESW_CURSOR: - return &cursors[kMouseCursorAntiDiagonal]; + return &cursors[kMouseCursorUpRightDownLeft]; + case GLFW_RESIZE_ALL_CURSOR: + return &cursors[kMouseCursorAllScroll]; default: return nullptr; } From 15b323d1d43ecbcd039eecd20a8dcea83f9dcd61 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 7 Oct 2023 17:24:36 +0200 Subject: [PATCH 2/5] Update carla and dpf again Signed-off-by: falkTX --- carla | 2 +- dpf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/carla b/carla index 568fc96..3a7d78c 160000 --- a/carla +++ b/carla @@ -1 +1 @@ -Subproject commit 568fc96aa376bee1f779d4d288b5095e8d67ca26 +Subproject commit 3a7d78c165ce3c7485a93e1901d45d5c5be4b6e1 diff --git a/dpf b/dpf index 3535934..a03257c 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit 3535934e70810617b67a36c8fbdf3a67dbde8725 +Subproject commit a03257c798058aa735ac8cc1ad757a4c1e63d483 From 8dfdb8e14ade3108502c034d7cf5fa4bdffab2df Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 7 Oct 2023 18:42:31 +0200 Subject: [PATCH 3/5] Fix windows and AU build Signed-off-by: falkTX --- dpf | 2 +- jucewrapper/CMakeLists.txt | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/dpf b/dpf index a03257c..07d7344 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit a03257c798058aa735ac8cc1ad757a4c1e63d483 +Subproject commit 07d73447c881264978b60c270b6c754c1489bd78 diff --git a/jucewrapper/CMakeLists.txt b/jucewrapper/CMakeLists.txt index 913c2eb..adeacef 100644 --- a/jucewrapper/CMakeLists.txt +++ b/jucewrapper/CMakeLists.txt @@ -166,6 +166,7 @@ target_sources(Cardinal target_include_directories(Cardinal PRIVATE ../dpf/distrho + ../dpf/dgl/src/pugl-upstream/include ../src/Cardinal) target_compile_definitions(Cardinal @@ -267,6 +268,7 @@ target_sources(CardinalFX target_include_directories(CardinalFX PRIVATE ../dpf/distrho + ../dpf/dgl/src/pugl-upstream/include ../src/CardinalFX) target_compile_definitions(CardinalFX @@ -367,6 +369,7 @@ target_sources(CardinalMIDI target_include_directories(CardinalMIDI PRIVATE ../dpf/distrho + ../dpf/dgl/src/pugl-upstream/include ../src/CardinalFX) target_compile_definitions(CardinalMIDI @@ -467,6 +470,7 @@ target_sources(CardinalSynth target_include_directories(CardinalSynth PRIVATE ../dpf/distrho + ../dpf/dgl/src/pugl-upstream/include ../src/CardinalSynth) target_compile_definitions(CardinalSynth From 89f2afc1913aa85976d498102d536432e9065e60 Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 13 Oct 2023 17:24:55 +0200 Subject: [PATCH 4/5] Update carla and dpf again, add FUNDING.yml Signed-off-by: falkTX --- .github/FUNDING.yml | 4 ++++ carla | 2 +- dpf | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 .github/FUNDING.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..aafd6f5 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,4 @@ +github: falkTX +liberapay: falkTX +patreon: falkTX +custom: "https://paypal.me/falkTX" diff --git a/carla b/carla index 3a7d78c..ade014c 160000 --- a/carla +++ b/carla @@ -1 +1 @@ -Subproject commit 3a7d78c165ce3c7485a93e1901d45d5c5be4b6e1 +Subproject commit ade014c97194486692c260b7cc09b04a92e58305 diff --git a/dpf b/dpf index 07d7344..a58498f 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit 07d73447c881264978b60c270b6c754c1489bd78 +Subproject commit a58498f0c491917e9e4501ffddd24895370d04b2 From 2f558407c070430d85defabb8b9d75bfc8aa300b Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 21 Oct 2023 14:00:37 +0200 Subject: [PATCH 5/5] Continue dpf update, fix clipboard Signed-off-by: falkTX --- dpf | 2 +- src/CardinalUI.cpp | 76 +++++++++++++++++++++++++++------------------- 2 files changed, 46 insertions(+), 32 deletions(-) diff --git a/dpf b/dpf index a58498f..78f6f18 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit a58498f0c491917e9e4501ffddd24895370d04b2 +Subproject commit 78f6f18216f032070e72cc583e326b88efd43ea7 diff --git a/src/CardinalUI.cpp b/src/CardinalUI.cpp index fddbca6..cf2c710 100644 --- a/src/CardinalUI.cpp +++ b/src/CardinalUI.cpp @@ -1066,34 +1066,15 @@ protected: const int action = ev.press ? GLFW_PRESS : GLFW_RELEASE; const int mods = glfwMods(ev.mod); - /* These are unsupported in pugl right now - #define GLFW_KEY_KP_0 320 - #define GLFW_KEY_KP_1 321 - #define GLFW_KEY_KP_2 322 - #define GLFW_KEY_KP_3 323 - #define GLFW_KEY_KP_4 324 - #define GLFW_KEY_KP_5 325 - #define GLFW_KEY_KP_6 326 - #define GLFW_KEY_KP_7 327 - #define GLFW_KEY_KP_8 328 - #define GLFW_KEY_KP_9 329 - #define GLFW_KEY_KP_DECIMAL 330 - #define GLFW_KEY_KP_DIVIDE 331 - #define GLFW_KEY_KP_MULTIPLY 332 - #define GLFW_KEY_KP_SUBTRACT 333 - #define GLFW_KEY_KP_ADD 334 - #define GLFW_KEY_KP_ENTER 335 - #define GLFW_KEY_KP_EQUAL 336 - */ - int key; switch (ev.key) { - case '\r': key = GLFW_KEY_ENTER; break; case '\t': key = GLFW_KEY_TAB; break; case kKeyBackspace: key = GLFW_KEY_BACKSPACE; break; + case kKeyEnter: key = GLFW_KEY_ENTER; break; case kKeyEscape: key = GLFW_KEY_ESCAPE; break; case kKeyDelete: key = GLFW_KEY_DELETE; break; + case kKeySpace: key = GLFW_KEY_SPACE; break; case kKeyF1: key = GLFW_KEY_F1; break; case kKeyF2: key = GLFW_KEY_F2; break; case kKeyF3: key = GLFW_KEY_F3; break; @@ -1106,15 +1087,21 @@ protected: case kKeyF10: key = GLFW_KEY_F10; break; case kKeyF11: key = GLFW_KEY_F11; break; case kKeyF12: key = GLFW_KEY_F12; break; + case kKeyPageUp: key = GLFW_KEY_PAGE_UP; break; + case kKeyPageDown: key = GLFW_KEY_PAGE_DOWN; break; + case kKeyEnd: key = GLFW_KEY_END; break; + case kKeyHome: key = GLFW_KEY_HOME; break; case kKeyLeft: key = GLFW_KEY_LEFT; break; case kKeyUp: key = GLFW_KEY_UP; break; case kKeyRight: key = GLFW_KEY_RIGHT; break; case kKeyDown: key = GLFW_KEY_DOWN; break; - case kKeyPageUp: key = GLFW_KEY_PAGE_UP; break; - case kKeyPageDown: key = GLFW_KEY_PAGE_DOWN; break; - case kKeyHome: key = GLFW_KEY_HOME; break; - case kKeyEnd: key = GLFW_KEY_END; break; + case kKeyPrintScreen: key = GLFW_KEY_PRINT_SCREEN; break; case kKeyInsert: key = GLFW_KEY_INSERT; break; + case kKeyPause: key = GLFW_KEY_PAUSE; break; + case kKeyMenu: key = GLFW_KEY_MENU; break; + case kKeyNumLock: key = GLFW_KEY_NUM_LOCK; break; + case kKeyScrollLock: key = GLFW_KEY_SCROLL_LOCK; break; + case kKeyCapsLock: key = GLFW_KEY_CAPS_LOCK; break; case kKeyShiftL: key = GLFW_KEY_LEFT_SHIFT; break; case kKeyShiftR: key = GLFW_KEY_RIGHT_SHIFT; break; case kKeyControlL: key = GLFW_KEY_LEFT_CONTROL; break; @@ -1123,12 +1110,39 @@ protected: case kKeyAltR: key = GLFW_KEY_RIGHT_ALT; break; case kKeySuperL: key = GLFW_KEY_LEFT_SUPER; break; case kKeySuperR: key = GLFW_KEY_RIGHT_SUPER; break; - case kKeyMenu: key = GLFW_KEY_MENU; break; - case kKeyCapsLock: key = GLFW_KEY_CAPS_LOCK; break; - case kKeyScrollLock: key = GLFW_KEY_SCROLL_LOCK; break; - case kKeyNumLock: key = GLFW_KEY_NUM_LOCK; break; - case kKeyPrintScreen: key = GLFW_KEY_PRINT_SCREEN; break; - case kKeyPause: key = GLFW_KEY_PAUSE; break; + case kKeyPad0: key = GLFW_KEY_KP_0; break; + case kKeyPad1: key = GLFW_KEY_KP_1; break; + case kKeyPad2: key = GLFW_KEY_KP_2; break; + case kKeyPad3: key = GLFW_KEY_KP_3; break; + case kKeyPad4: key = GLFW_KEY_KP_4; break; + case kKeyPad5: key = GLFW_KEY_KP_5; break; + case kKeyPad6: key = GLFW_KEY_KP_6; break; + case kKeyPad7: key = GLFW_KEY_KP_7; break; + case kKeyPad8: key = GLFW_KEY_KP_8; break; + case kKeyPad9: key = GLFW_KEY_KP_9; break; + case kKeyPadEnter: key = GLFW_KEY_KP_ENTER; break; + /* undefined in glfw + case kKeyPadPageUp: + case kKeyPadPageDown: + case kKeyPadEnd: + case kKeyPadHome: + case kKeyPadLeft: + case kKeyPadUp: + case kKeyPadRight: + case kKeyPadDown: + case kKeyPadClear: + case kKeyPadInsert: + case kKeyPadDelete: + */ + case kKeyPadEqual: key = GLFW_KEY_KP_EQUAL; break; + case kKeyPadMultiply: key = GLFW_KEY_KP_MULTIPLY; break; + case kKeyPadAdd: key = GLFW_KEY_KP_ADD; break; + /* undefined in glfw + case kKeyPadSeparator: + */ + case kKeyPadSubtract: key = GLFW_KEY_KP_SUBTRACT; break; + case kKeyPadDecimal: key = GLFW_KEY_KP_DECIMAL; break; + case kKeyPadDivide: key = GLFW_KEY_KP_DIVIDE; break; default: // glfw expects uppercase if (ev.key >= 'a' && ev.key <= 'z')