Browse Source

Update README, small complilation warning fixes, reject zero-size FBOs

tags/v0.3.2
Andrew Belt 7 years ago
parent
commit
193c3902f6
5 changed files with 12 additions and 7 deletions
  1. +5
    -3
      README.md
  2. +1
    -3
      src/app/ModuleWidget.cpp
  3. +1
    -1
      src/util.cpp
  4. +3
    -0
      src/widgets/FramebufferWidget.cpp
  5. +2
    -0
      src/widgets/TextField.cpp

+ 5
- 3
README.md View File

@@ -1,5 +1,3 @@
***Note: This repo is unsupported until September 7. See you at [Knobcon](https://knobcon.com/)!***

# Rack # Rack


*Rack* is the engine for the VCV open-source virtual Eurorack DAW. *Rack* is the engine for the VCV open-source virtual Eurorack DAW.
@@ -9,7 +7,7 @@
*If the build fails for you, please report the issue with a detailed error message to help the portability of Rack.* *If the build fails for you, please report the issue with a detailed error message to help the portability of Rack.*


Clone this repository and `cd` into it. Clone this repository and `cd` into it.
On Windows, use [MSYS2](http://www.msys2.org/) and launch a mingw32/64 shell.
On Windows, use [MSYS2](http://www.msys2.org/) and launch a mingw64 shell.


Clone submodules. Clone submodules.


@@ -25,6 +23,10 @@ Build Rack.


make make


Run Rack.

make run

## License ## License


Rack source code by [Andrew Belt](https://andrewbelt.name/) licensed under the [BSD-3-Clause](LICENSE.txt) Rack source code by [Andrew Belt](https://andrewbelt.name/) licensed under the [BSD-3-Clause](LICENSE.txt)


+ 1
- 3
src/app/ModuleWidget.cpp View File

@@ -126,9 +126,8 @@ void ModuleWidget::draw(NVGcontext *vg) {


Widget::draw(vg); Widget::draw(vg);


/*
// CPU usage text // CPU usage text
if (dynamic_cast<RackScene*>(gScene)->toolbar->cpuUsageButton->value > 0.0) {
if (0) {
float cpuTime = module ? module->cpuTime : 0.0; float cpuTime = module ? module->cpuTime : 0.0;
std::string text = stringf("%.1f%%", cpuTime * 100.0); std::string text = stringf("%.1f%%", cpuTime * 100.0);


@@ -147,7 +146,6 @@ void ModuleWidget::draw(NVGcontext *vg) {
bndMenuItem(vg, 0.0, 0.0, box.size.x, BND_WIDGET_HEIGHT, BND_DEFAULT, -1, text.c_str()); bndMenuItem(vg, 0.0, 0.0, box.size.x, BND_WIDGET_HEIGHT, BND_DEFAULT, -1, text.c_str());
nvgRestore(vg); nvgRestore(vg);
} }
*/


nvgResetScissor(vg); nvgResetScissor(vg);
} }


+ 1
- 1
src/util.cpp View File

@@ -57,7 +57,7 @@ void openBrowser(std::string url) {
// shell injection is possible, so make sure the URL is trusted or hard coded // shell injection is possible, so make sure the URL is trusted or hard coded
#if ARCH_LIN #if ARCH_LIN
std::string command = "xdg-open " + url; std::string command = "xdg-open " + url;
system(command.c_str());
(void)system(command.c_str());
#endif #endif
#if ARCH_MAC #if ARCH_MAC
std::string command = "open " + url; std::string command = "open " + url;


+ 3
- 0
src/widgets/FramebufferWidget.cpp View File

@@ -41,6 +41,9 @@ void FramebufferWidget::step() {
internal->box.size = box.size.plus(padding.mult(2)); internal->box.size = box.size.plus(padding.mult(2));
Vec fbSize = internal->box.size.mult(gPixelRatio * oversample); Vec fbSize = internal->box.size.mult(gPixelRatio * oversample);
// assert(fbSize.isFinite()); // assert(fbSize.isFinite());
// Reject zero area size
if (fbSize.x <= 0.0 || fbSize.y <= 0.0)
return;


// Delete old one first to free up GPU memory // Delete old one first to free up GPU memory
internal->setFramebuffer(NULL); internal->setFramebuffer(NULL);


+ 2
- 0
src/widgets/TextField.cpp View File

@@ -33,6 +33,7 @@ bool TextField::onText(int codepoint) {
char c = codepoint; char c = codepoint;
std::string newText(1, c); std::string newText(1, c);
insertText(newText); insertText(newText);
return true;
} }


bool TextField::onKey(int key) { bool TextField::onKey(int key) {
@@ -99,6 +100,7 @@ bool TextField::onKey(int key) {


begin = mini(maxi(begin, 0), text.size()); begin = mini(maxi(begin, 0), text.size());
end = mini(maxi(end, 0), text.size()); end = mini(maxi(end, 0), text.size());
return true;
} }


void TextField::onSelect() { void TextField::onSelect() {


Loading…
Cancel
Save