You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

settings.hpp 1.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #pragma once
  2. #include "common.hpp"
  3. #include "math.hpp"
  4. #include "plugin/Model.hpp"
  5. #include <jansson.h>
  6. namespace rack {
  7. /** Process-level globals. */
  8. namespace settings {
  9. /** Runtime state, not serialized. */
  10. extern bool devMode;
  11. extern bool headless;
  12. /** Persistent state, serialized to settings.json. */
  13. extern std::string token;
  14. extern math::Vec windowSize;
  15. extern math::Vec windowPos;
  16. extern float zoom;
  17. extern bool invertZoom;
  18. extern float cableOpacity;
  19. extern float cableTension;
  20. extern bool allowCursorLock;
  21. extern bool realTime;
  22. extern float sampleRate;
  23. extern int threadCount;
  24. extern bool paramTooltip;
  25. extern bool cpuMeter;
  26. extern bool lockModules;
  27. extern bool checkVersion;
  28. extern float frameRateLimit;
  29. extern bool frameRateSync;
  30. extern bool skipLoadOnLaunch;
  31. extern std::string patchPath;
  32. extern std::set<plugin::Model*> favoriteModels;
  33. json_t *toJson();
  34. void fromJson(json_t *rootJ);
  35. void save(const std::string &path);
  36. void load(const std::string &path);
  37. } // namespace settings
  38. } // namespace rack