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.

43 lines
822B

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