diff --git a/src/Core/Blank.cpp b/src/Core/Blank.cpp index 4b8feda2..bdb3bb95 100644 --- a/src/Core/Blank.cpp +++ b/src/Core/Blank.cpp @@ -33,11 +33,10 @@ struct ModuleResizeHandle : virtual Widget { ModuleResizeHandle() { box.size = Vec(RACK_GRID_WIDTH * 1, RACK_GRID_HEIGHT); } - void onHover(const event::Hover &e) override { - // TODO - // if (e.button == 0) { - // e.target = this; - // } + void onButton(const event::Button &e) override { + if (e.button == GLFW_MOUSE_BUTTON_LEFT) { + e.consume(this); + } } void onDragStart(const event::DragStart &e) override { dragX = context()->scene->rackWidget->lastMousePos.x; diff --git a/src/audio.cpp b/src/audio.cpp index ab9e8c17..627b772a 100644 --- a/src/audio.cpp +++ b/src/audio.cpp @@ -323,7 +323,8 @@ json_t *IO::toJson() { json_t *rootJ = json_object(); json_object_set_new(rootJ, "driver", json_integer(driver)); std::string deviceName = getDeviceName(device); - json_object_set_new(rootJ, "deviceName", json_string(deviceName.c_str())); + if (!deviceName.empty()) + json_object_set_new(rootJ, "deviceName", json_string(deviceName.c_str())); json_object_set_new(rootJ, "offset", json_integer(offset)); json_object_set_new(rootJ, "maxChannels", json_integer(maxChannels)); json_object_set_new(rootJ, "sampleRate", json_integer(sampleRate));