uisettings.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. // Copyright 2016 Citra Emulator Project
  2. // Licensed under GPLv2 or any later version
  3. // Refer to the license.txt file included.
  4. #pragma once
  5. #include <array>
  6. #include <atomic>
  7. #include <vector>
  8. #include <QByteArray>
  9. #include <QMetaType>
  10. #include <QString>
  11. #include <QStringList>
  12. #include "common/common_types.h"
  13. namespace UISettings {
  14. using ContextualShortcut = std::pair<QString, int>;
  15. struct Shortcut {
  16. QString name;
  17. QString group;
  18. ContextualShortcut shortcut;
  19. };
  20. using Themes = std::array<std::pair<const char*, const char*>, 2>;
  21. extern const Themes themes;
  22. struct GameDir {
  23. QString path;
  24. bool deep_scan;
  25. bool expanded;
  26. bool operator==(const GameDir& rhs) const {
  27. return path == rhs.path;
  28. };
  29. bool operator!=(const GameDir& rhs) const {
  30. return !operator==(rhs);
  31. };
  32. };
  33. struct Values {
  34. QByteArray geometry;
  35. QByteArray state;
  36. QByteArray renderwindow_geometry;
  37. QByteArray gamelist_header_state;
  38. QByteArray microprofile_geometry;
  39. bool microprofile_visible;
  40. bool single_window_mode;
  41. bool fullscreen;
  42. bool display_titlebar;
  43. bool show_filter_bar;
  44. bool show_status_bar;
  45. bool confirm_before_closing;
  46. bool first_start;
  47. bool select_user_on_boot;
  48. // Discord RPC
  49. bool enable_discord_presence;
  50. u16 screenshot_resolution_factor;
  51. QString roms_path;
  52. QString symbols_path;
  53. QString screenshot_path;
  54. QString game_dir_deprecated;
  55. bool game_dir_deprecated_deepscan;
  56. QList<UISettings::GameDir> game_dirs;
  57. QStringList recent_files;
  58. QString theme;
  59. // Shortcut name <Shortcut, context>
  60. std::vector<Shortcut> shortcuts;
  61. uint32_t callout_flags;
  62. // logging
  63. bool show_console;
  64. // Controllers
  65. int profile_index;
  66. // Game List
  67. bool show_unknown;
  68. bool show_add_ons;
  69. uint32_t icon_size;
  70. uint8_t row_1_text_id;
  71. uint8_t row_2_text_id;
  72. std::atomic_bool is_game_list_reload_pending{false};
  73. bool cache_game_list;
  74. };
  75. extern Values values;
  76. } // namespace UISettings
  77. Q_DECLARE_METATYPE(UISettings::GameDir*);