diff --git a/Makefile b/Makefile index c49c0aa9..f2184cc2 100644 --- a/Makefile +++ b/Makefile @@ -195,7 +195,7 @@ endif ifeq ($(ARCH), win) cp libRack.a dist/Rack-SDK/ endif - cd dist && zip -5 -r Rack-SDK-$(VERSION)-$(ARCH).zip Rack-SDK + cd dist && zip -5 -r Rack-SDK-$(VERSION).zip Rack-SDK # Obviously this will only work if you have the private keys to my server diff --git a/include/app.hpp b/include/app.hpp index ad61c0ca..24b10df8 100644 --- a/include/app.hpp +++ b/include/app.hpp @@ -11,6 +11,7 @@ static const float MM_PER_IN = 25.4; namespace rack { + inline float in2px(float inches) { return inches * SVG_DPI; } diff --git a/include/asset.hpp b/include/asset.hpp index dc5957a9..e5fa3f29 100644 --- a/include/asset.hpp +++ b/include/asset.hpp @@ -7,14 +7,11 @@ namespace rack { -/** Returns the path of a global resource. Read-only -*/ +/** Returns the path of a global resource. Should only read files from this location. */ std::string assetGlobal(std::string filename); -/** Returns the path of a local resource. Read/write -*/ +/** Returns the path of a local resource. Can read and write files to this location. */ std::string assetLocal(std::string filename); -/** Returns the path of a resource in the plugin's folder. Read-only -*/ +/** Returns the path of a resource in the plugin's folder. Should only read files from this location. */ std::string assetPlugin(Plugin *plugin, std::string filename); diff --git a/include/engine.hpp b/include/engine.hpp index ff36614f..096272af 100644 --- a/include/engine.hpp +++ b/include/engine.hpp @@ -121,8 +121,8 @@ float engineGetSampleRate(); float engineGetSampleTime(); extern bool gPaused; -/** If plugins begin using this in harmful ways, I will remove it and break your API. -To avoid spoiling the fun for everyone, make sure your plugins demonstrate good behavior by not being "surprising" to the user. Your plugin needs to have a clear purpose for manipulating other modules and wires and must be done with a good UX. +/** Plugins should not manipulate other modules or wires unless that is the entire purpose of the module. +Your plugin needs to have a clear purpose for manipulating other modules and wires and must be done with a good UX. */ extern std::vector gModules; extern std::vector gWires; diff --git a/include/util/common.hpp b/include/util/common.hpp index 735e686d..c3168478 100644 --- a/include/util/common.hpp +++ b/include/util/common.hpp @@ -101,7 +101,7 @@ DeferWrapper deferWrapper(F f) { return DeferWrapper(f); } -#define defer(code) auto CONCAT(x, __COUNTER__) = deferWrapper([&]() code) +#define defer(code) auto CONCAT(_defer_, __COUNTER__) = deferWrapper([&]() code) //////////////////// // Random number generator