Fix windows build, cleanup

Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
falkTX 2021-10-19 14:49:18 +01:00
parent 0dce76052e
commit 2ccdd992bc
No known key found for this signature in database
GPG key ID: CDBAA37ABC74FBA0
4 changed files with 20 additions and 46 deletions

View file

@ -34,7 +34,12 @@ GLFWAPI int glfwGetKeyScancode(int key) { return 0; }
namespace rack {
namespace window {
DISTRHO_NAMESPACE::UI* lastUI = nullptr;
struct Window::Internal {
int mods;
DISTRHO_NAMESPACE::UI* ui;
// more stuff below
};
void WindowInit(Window* window, DISTRHO_NAMESPACE::UI* ui);
}
}
@ -77,11 +82,8 @@ public:
fContext->scene = new rack::app::Scene;
fContext->event->rootWidget = fContext->scene;
// Initialize context
d_stdout("UI context ptr %p", NanoVG::getContext());
rack::window::lastUI = this;
fContext->window = new rack::window::Window;
rack::window::lastUI = nullptr;
rack::window::WindowInit(fContext->window, this);
// Hide non-wanted menu entries
typedef rack::ui::Button rButton;