MCPcopy Create free account
hub / github.com/VCVRack/Rack / getModSpeed

Function getModSpeed

src/app/Knob.cpp:132–142  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

130}
131
132static float getModSpeed() {
133 int mods = APP->window->getMods();
134 if ((mods & RACK_MOD_MASK) == RACK_MOD_CTRL)
135 return 1 / 10.f;
136 else if ((mods & RACK_MOD_MASK) == GLFW_MOD_SHIFT)
137 return 4.f;
138 else if ((mods & RACK_MOD_MASK) == (RACK_MOD_CTRL | GLFW_MOD_SHIFT))
139 return 1 / 100.f;
140 else
141 return 1.f;
142}
143
144void Knob::onDragMove(const DragMoveEvent& e) {
145 if (e.button != GLFW_MOUSE_BUTTON_LEFT)

Callers 2

onDragMoveMethod · 0.85
onHoverScrollMethod · 0.85

Calls 1

getModsMethod · 0.80

Tested by

no test coverage detected