Update/sync to Rack 2.1

Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
falkTX 2022-02-27 00:18:43 +00:00
parent 6cb739b52c
commit 5188b50a4f
No known key found for this signature in database
GPG key ID: CDBAA37ABC74FBA0
16 changed files with 223 additions and 143 deletions

View file

@ -1,5 +1,5 @@
--- ../Rack/src/app/Scene.cpp 2021-12-04 09:46:43.912932319 +0000
+++ Scene.cpp 2022-02-11 05:30:49.567801073 +0000
--- ../Rack/src/app/Scene.cpp 2022-02-26 23:08:06.701192797 +0000
+++ Scene.cpp 2022-02-17 23:13:46.013018500 +0000
@@ -1,3 +1,30 @@
+/*
+ * DISTRHO Cardinal Plugin
@ -58,7 +58,7 @@
namespace rack {
namespace app {
@@ -23,16 +63,55 @@
@@ -23,21 +63,60 @@
math::Vec size;
void draw(const DrawArgs& args) override {
@ -120,6 +120,12 @@
size = APP->window->getSize();
}
void onDragMove(const DragMoveEvent& e) override {
- size = size.plus(e.mouseDelta);
+ size = size.plus(e.mouseDelta.mult(APP->window->pixelRatio));
APP->window->setSize(size.round());
}
};
@@ -46,9 +125,32 @@
struct Scene::Internal {
ResizeHandle* resizeHandle;
@ -283,7 +289,7 @@
// Key commands that can be overridden by children
if (e.action == GLFW_PRESS || e.action == GLFW_REPEAT) {
- // Alternate key command for exiting fullscreen, since F11 doesn't work reliably on Mac due to "Show desktop" OS binding.
- // Alternative key command for exiting fullscreen, since F11 doesn't work reliably on Mac due to "Show desktop" OS binding.
- if (e.key == GLFW_KEY_ESCAPE && (e.mods & RACK_MOD_MASK) == 0) {
- if (APP->window->isFullScreen()) {
- APP->window->setFullScreen(false);