uisettings.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  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*>, 4>;
  22. extern const Themes themes;
  23. struct GameDir {
  24. QString path;
  25. bool deep_scan;
  26. bool expanded;
  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. u16 screenshot_resolution_factor;
  54. QString roms_path;
  55. QString symbols_path;
  56. QString screenshot_path;
  57. QString game_dir_deprecated;
  58. bool game_dir_deprecated_deepscan;
  59. QVector<UISettings::GameDir> game_dirs;
  60. QStringList recent_files;
  61. QString theme;
  62. // Shortcut name <Shortcut, context>
  63. std::vector<Shortcut> shortcuts;
  64. uint32_t callout_flags;
  65. // logging
  66. bool show_console;
  67. // Controllers
  68. int profile_index;
  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. };
  77. extern Values values;
  78. } // namespace UISettings
  79. Q_DECLARE_METATYPE(UISettings::GameDir*);