Mercurial > hg > touchkeys
changeset 29:f3efbf2984c3
OpenGL workaround for Linux (will get to the bottom of it later) and a bugfix on virtual ports.
author | Andrew McPherson <andrewm@eecs.qmul.ac.uk> |
---|---|
date | Mon, 03 Mar 2014 00:37:35 +0000 |
parents | cfbcd31a54e7 |
children | f2797a9d3d20 |
files | Source/Display/OpenGLJuceCanvas.h Source/GUI/KeyboardZoneComponent.cpp |
diffstat | 2 files changed, 11 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/Source/Display/OpenGLJuceCanvas.h Sun Mar 02 22:31:54 2014 +0000 +++ b/Source/Display/OpenGLJuceCanvas.h Mon Mar 03 00:37:35 2014 +0000 @@ -39,7 +39,12 @@ OpenGLJuceCanvas(OpenGLDisplayBase& display) : display_(display) { openGLContext_.setRenderer (this); openGLContext_.setComponentPaintingEnabled (false); - openGLContext_.setContinuousRepainting (false); + // Funny OpenGL bugs in Linux version that results in improper drawing when in background + // For other OSes, save the cycles of continuous repainting. + if(SystemStats::getOperatingSystemType() == SystemStats::Linux) + openGLContext_.setContinuousRepainting (true); + else + openGLContext_.setContinuousRepainting (false); openGLContext_.attachTo (*this); display_.setCanvas(this); }
--- a/Source/GUI/KeyboardZoneComponent.cpp Sun Mar 02 22:31:54 2014 +0000 +++ b/Source/GUI/KeyboardZoneComponent.cpp Mon Mar 03 00:37:35 2014 +0000 @@ -594,7 +594,12 @@ } if(!lastSelectedDeviceExists) { +#ifndef JUCE_WINDOWS + if(lastSelectedMidiOutputID_ != MidiOutputController::kMidiVirtualOutputPortNumber) + controller_->disableMIDIOutputPort(keyboardSegment_->outputPort()); +#else // No virtual port on Windows controller_->disableMIDIOutputPort(keyboardSegment_->outputPort()); +#endif } }