Skip to content

Commit

Permalink
More Linux Fixes
Browse files Browse the repository at this point in the history
1. Pipeline to 18.04
2. Fix the sprintf errors
3. Upgrade vstgui in high-rect mode to be faster, closing surge-synthesizer#1103 again
  • Loading branch information
baconpaul committed May 23, 2020
1 parent ce15d7e commit db7f027
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 8 deletions.
4 changes: 2 additions & 2 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ jobs:
imageName: 'vs2017-win2016'
isWindowsUnitTest: True
linux-lv2:
imageName: 'ubuntu-16.04'
imageName: 'ubuntu-18.04'
isLinux: True
linuxProject: lv2
linux-vst3:
imageName: 'ubuntu-16.04'
imageName: 'ubuntu-18.04'
isLinux: True
linuxProject: vst3
linux-unittest:
Expand Down
6 changes: 3 additions & 3 deletions src/common/Parameter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1092,7 +1092,7 @@ void Parameter::get_display_alt(char* txt, bool external, float ef)
int oct_offset = 1;
if (storage)
oct_offset = Surge::Storage::getUserDefaultValue(storage, "middleC", 1);
char notename[8];
char notename[16];
sprintf(txt, "%s", get_notename(notename, i_value, oct_offset));

break;
Expand All @@ -1106,7 +1106,7 @@ void Parameter::get_display_alt(char* txt, bool external, float ef)
int oct_offset = 1;
if (storage)
oct_offset = Surge::Storage::getUserDefaultValue(storage, "middleC", 1);
char notename[8];
char notename[16];
sprintf(txt, "%s", get_notename(notename, i_value, oct_offset));

break;
Expand Down Expand Up @@ -1291,7 +1291,7 @@ void Parameter::get_display(char* txt, bool external, float ef)
int oct_offset = 1;
if (storage)
oct_offset = Surge::Storage::getUserDefaultValue(storage, "middleC", 1);
char notename[8];
char notename[16];
sprintf(txt, "%s", get_notename(notename, val.i, oct_offset));
break;
}
Expand Down
2 changes: 1 addition & 1 deletion src/common/gui/CNumberField.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ void CNumberField::draw(CDrawContext* pContext)
int oct_offset = 1;
if (storage)
oct_offset = Surge::Storage::getUserDefaultValue(storage, "middleC", 1);
char notename[8];
char notename[16];
sprintf(the_text, "%s", get_notename(notename, i_value, oct_offset));
}
break;
Expand Down
7 changes: 6 additions & 1 deletion src/common/gui/SurgeGUIEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -745,6 +745,11 @@ void SurgeGUIEditor::refresh_mod()
}
// ctnvg frame->redraw();
// frame->setDirty();
#if LINUX
frame->invalid();
// Turns out linux is very bad with lots of little invalid rects in vstgui
// see github issue 1103
#endif
}

int32_t SurgeGUIEditor::onKeyDown(const VstKeyCode& code, CFrame* frame)
Expand Down Expand Up @@ -5048,7 +5053,7 @@ R"HTML(
{
int oct_offset = 1;
oct_offset = Surge::Storage::getUserDefaultValue(&(this->synth->storage), "middleC", 1);
char notename[8];
char notename[16];

std::string rowstyle="";
std::string tdopen="<td colspan=2>";
Expand Down
2 changes: 1 addition & 1 deletion vstgui.surge

0 comments on commit db7f027

Please sign in to comment.