uisettings.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  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 <QVector>
  13. #include "common/common_types.h"
  14. namespace UISettings {
  15. using ContextualShortcut = std::pair<QString, int>;
  16. struct Shortcut {
  17. QString name;
  18. QString group;
  19. ContextualShortcut shortcut;
  20. };
  21. using Themes = std::array<std::pair<const char*, const char*>, 6>;
  22. extern const Themes themes;
  23. struct GameDir {
  24. QString path;
  25. bool deep_scan = false;
  26. bool expanded = false;
  27. bool operator==(const GameDir& rhs) const {
  28. return path == rhs.path;
  29. }
  30. bool operator!=(const GameDir& rhs) const {
  31. return !operator==(rhs);
  32. }
  33. };
  34. struct Values {
  35. QByteArray geometry;
  36. QByteArray state;
  37. QByteArray renderwindow_geometry;
  38. QByteArray gamelist_header_state;
  39. QByteArray microprofile_geometry;
  40. bool microprofile_visible;
  41. bool single_window_mode;
  42. bool fullscreen;
  43. bool display_titlebar;
  44. bool show_filter_bar;
  45. bool show_status_bar;
  46. bool confirm_before_closing;
  47. bool first_start;
  48. bool pause_when_in_background;
  49. bool hide_mouse;
  50. bool select_user_on_boot;
  51. // Discord RPC
  52. bool enable_discord_presence;
  53. bool enable_screenshot_save_as;
  54. u16 screenshot_resolution_factor;
  55. QString roms_path;
  56. QString symbols_path;
  57. QString game_dir_deprecated;
  58. bool game_dir_deprecated_deepscan;
  59. QVector<UISettings::GameDir> game_dirs;
  60. QVector<u64> favorited_ids;
  61. QStringList recent_files;
  62. QString language;
  63. QString theme;
  64. // Shortcut name <Shortcut, context>
  65. std::vector<Shortcut> shortcuts;
  66. uint32_t callout_flags;
  67. // logging
  68. bool show_console;
  69. // Game List
  70. bool show_add_ons;
  71. uint32_t icon_size;
  72. uint8_t row_1_text_id;
  73. uint8_t row_2_text_id;
  74. std::atomic_bool is_game_list_reload_pending{false};
  75. bool cache_game_list;
  76. bool configuration_applied;
  77. bool reset_to_defaults;
  78. };
  79. extern Values values;
  80. } // namespace UISettings
  81. Q_DECLARE_METATYPE(UISettings::GameDir*);