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.

52 lines
1.1KB

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