Fix some blank panels not having matching background color

This commit is contained in:
falkTX 2021-12-08 17:02:26 +00:00
parent 6c7f478515
commit 809558eb71
3 changed files with 28 additions and 0 deletions

View file

@ -169,6 +169,11 @@ $(BUILD_DIR)/%.c.o: %.c
@echo "Compiling $<"
$(SILENT)$(CC) $< $(BUILD_C_FLAGS) -c -o $@
$(BUILD_DIR)/Rack/src/core/Blank.cpp.o: Rack/src/core/Blank.cpp
-@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)"
@echo "Compiling $<"
$(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -UPRIVATE -D'nvgRGB(r,g,b)=nvgRGBblank(r,g,b)' -c -o $@
$(BUILD_DIR)/Rack/src/core/%.cpp.o: Rack/src/core/%.cpp
-@mkdir -p "$(shell dirname $(BUILD_DIR)/$<)"
@echo "Compiling $<"

View file

@ -20,6 +20,8 @@
#include <cstdio>
#include <cstring>
#include "nanovg.h"
// fix blendish build, missing symbol in debug mode
#ifndef NDEBUG
extern "C" {
@ -39,6 +41,14 @@ float FollowerBase::efGainMaxDecibelsDebug = 12.0f;
}
#endif
// Special nvgRGB for blank panels
extern "C" {
NVGcolor nvgRGBblank(unsigned char, unsigned char, unsigned char)
{
return nvgRGB(0x20, 0x20, 0x20);
}
}
// Compile those nice implementation-in-header little libraries
#define NANOSVG_IMPLEMENTATION
#define NANOSVG_ALL_COLOR_KEYWORDS