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.

41 lines
752B

  1. #pragma once
  2. #include "common.hpp"
  3. #include "math.hpp"
  4. #include <jansson.h>
  5. namespace rack {
  6. struct Settings {
  7. std::string token;
  8. math::Vec windowSize;
  9. math::Vec windowPos;
  10. float zoom = 1.0;
  11. bool invertZoom = false;
  12. float cableOpacity = 0.5;
  13. float cableTension = 0.5;
  14. bool allowCursorLock = true;
  15. float sampleRate = 44100.0;
  16. int threadCount = 1;
  17. bool paramTooltip = false;
  18. bool cpuMeter = false;
  19. bool lockModules = false;
  20. bool checkVersion = true;
  21. float frameRateLimit = 70.0;
  22. bool frameRateSync = true;
  23. bool skipLoadOnLaunch = false;
  24. std::string patchPath;
  25. json_t *toJson();
  26. void fromJson(json_t *rootJ);
  27. void save(std::string filename);
  28. void load(std::string filename);
  29. };
  30. extern Settings settings;
  31. } // namespace rack