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.

48 lines
1002B

  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 float sampleRate;
  22. extern int threadCount;
  23. extern bool paramTooltip;
  24. extern bool cpuMeter;
  25. extern bool lockModules;
  26. extern bool checkVersion;
  27. extern float frameRateLimit;
  28. extern bool frameRateSync;
  29. extern bool skipLoadOnLaunch;
  30. extern std::string patchPath;
  31. extern std::set<plugin::Model*> favoriteModels;
  32. json_t *toJson();
  33. void fromJson(json_t *rootJ);
  34. void save(const std::string &path);
  35. void load(const std::string &path);
  36. } // namespace settings
  37. } // namespace rack