@@ -42,6 +42,7 @@ void openFolder(const std::string &path); | |||||
The launched process will continue running if the current process is closed. | The launched process will continue running if the current process is closed. | ||||
*/ | */ | ||||
void runProcessAsync(const std::string &path); | void runProcessAsync(const std::string &path); | ||||
std::string getOperatingSystemInfo(); | |||||
} // namespace system | } // namespace system | ||||
@@ -35,7 +35,7 @@ void ParamQuantity::setValue(float value) { | |||||
float ParamQuantity::getValue() { | float ParamQuantity::getValue() { | ||||
if (!module) | if (!module) | ||||
return 0.f; | return 0.f; | ||||
return getParam()->getValue(); | |||||
return APP->engine->getParam(module, paramId); | |||||
} | } | ||||
float ParamQuantity::getMinValue() { | float ParamQuantity::getMinValue() { | ||||
@@ -100,6 +100,7 @@ int main(int argc, char *argv[]) { | |||||
// Log environment | // Log environment | ||||
INFO("%s v%s", app::APP_NAME, app::APP_VERSION); | INFO("%s v%s", app::APP_NAME, app::APP_VERSION); | ||||
INFO("%s", system::getOperatingSystemInfo().c_str()); | |||||
if (settings::devMode) | if (settings::devMode) | ||||
INFO("Development mode"); | INFO("Development mode"); | ||||
INFO("System directory: %s", asset::systemDir.c_str()); | INFO("System directory: %s", asset::systemDir.c_str()); | ||||
@@ -150,7 +150,6 @@ static bool loadPlugin(std::string path) { | |||||
for (Model *model : plugin->models) { | for (Model *model : plugin->models) { | ||||
std::string presetDir = asset::plugin(plugin, "presets/" + model->slug); | std::string presetDir = asset::plugin(plugin, "presets/" + model->slug); | ||||
for (const std::string &presetPath : system::listEntries(presetDir)) { | for (const std::string &presetPath : system::listEntries(presetDir)) { | ||||
DEBUG("%s", presetPath.c_str()); | |||||
model->presetPaths.push_back(presetPath); | model->presetPaths.push_back(presetPath); | ||||
} | } | ||||
} | } | ||||
@@ -10,6 +10,7 @@ | |||||
#include <sched.h> | #include <sched.h> | ||||
#include <execinfo.h> // for backtrace and backtrace_symbols | #include <execinfo.h> // for backtrace and backtrace_symbols | ||||
#include <unistd.h> // for execl | #include <unistd.h> // for execl | ||||
#include <sys/utsname.h> | |||||
#endif | #endif | ||||
#if defined ARCH_WIN | #if defined ARCH_WIN | ||||
@@ -190,5 +191,20 @@ void runProcessAsync(const std::string &path) { | |||||
} | } | ||||
std::string getOperatingSystemInfo() { | |||||
#if defined ARCH_LIN || defined ARCH_MAC | |||||
struct utsname u; | |||||
uname(&u); | |||||
return string::f("%s %s %s %s", u.sysname, u.release, u.version, u.machine); | |||||
#elif defined ARCH_WIN | |||||
OSVERSIONINFOEX info; | |||||
ZeroMemory(&info, sizeof(info)); | |||||
info.dwOSVersionInfoSize = sizeof(info); | |||||
GetVersionEx(&info); | |||||
return string::f("Windows %u.%u", info.dwMajorVersion, info.dwMinorVersion); | |||||
#endif | |||||
} | |||||
} // namespace system | } // namespace system | ||||
} // namespace rack | } // namespace rack |