Browse Source

Do not show update-rate-limit menu options on macOS, does nothing

tags/22.02
falkTX 3 years ago
parent
commit
69f0ff9084
3 changed files with 4 additions and 23 deletions
  1. +2
    -0
      src/CardinalUI.cpp
  2. +0
    -23
      src/custom/dep.cpp
  3. +2
    -0
      src/override/MenuBar.cpp

+ 2
- 0
src/CardinalUI.cpp View File

@@ -382,11 +382,13 @@ public:
filebrowserhandle = nullptr;
}

#ifndef DISTRHO_OS_MAC
if (windowParameters.rateLimit != 0 && ++rateLimitStep % (windowParameters.rateLimit * 2))
return;

rateLimitStep = 0;
repaint();
#endif
}

void WindowParametersChanged(const WindowParameterList param, float value) override


+ 0
- 23
src/custom/dep.cpp View File

@@ -249,29 +249,6 @@ static const struct {
{ "/LittleUtils/res/TeleportOut.svg", {}, -1 },
};

static inline void removeShape(NSVGimage* const handle, const char* const id)
{
if (id == nullptr)
return;

for (NSVGshape *shape = handle->shapes, *old = nullptr; shape != nullptr; old = shape, shape = shape->next)
{
if (std::strcmp(shape->id, id) != 0)
continue;

if (old != nullptr)
old->next = shape->next;
else
handle->shapes = shape->next;

nsvg__deletePaths(shape->paths);
free(shape);
return;
}

printf("NOTICE: failed to find '%s' shape to remove\n", id);
}

static inline bool invertPaint(NSVGpaint& paint, const char* const svgFileToInvert = nullptr)
{
// Special case for DrumKit background grandient


+ 2
- 0
src/override/MenuBar.cpp View File

@@ -479,6 +479,7 @@ struct ViewButton : MenuButton {

menu->addChild(createBoolPtrMenuItem("Lock module positions", "", &settings::lockModules));

#ifndef DISTRHO_OS_MAC
menu->addChild(new ui::MenuSeparator);

static const std::vector<std::string> rateLimitLabels = {
@@ -495,6 +496,7 @@ struct ViewButton : MenuButton {
));
}
}));
#endif
}
};



Loading…
Cancel
Save