diff options
Diffstat (limited to '')
| -rw-r--r-- | src/citra_qt/main.cpp | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/src/citra_qt/main.cpp b/src/citra_qt/main.cpp index c1ae0ccc8..a8bf6201a 100644 --- a/src/citra_qt/main.cpp +++ b/src/citra_qt/main.cpp | |||
| @@ -48,6 +48,47 @@ | |||
| 48 | Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin); | 48 | Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin); |
| 49 | #endif | 49 | #endif |
| 50 | 50 | ||
| 51 | /** | ||
| 52 | * "Callouts" are one-time instructional messages shown to the user. In the config settings, there | ||
| 53 | * is a bitfield "callout_flags" options, used to track if a message has already been shown to the | ||
| 54 | * user. This is 32-bits - if we have more than 32 callouts, we should retire and recyle old ones. | ||
| 55 | */ | ||
| 56 | enum class CalloutFlag : uint32_t { | ||
| 57 | Telemetry = 0x1, | ||
| 58 | }; | ||
| 59 | |||
| 60 | static void ShowCalloutMessage(const QString& message, CalloutFlag flag) { | ||
| 61 | if (UISettings::values.callout_flags & static_cast<uint32_t>(flag)) { | ||
| 62 | return; | ||
| 63 | } | ||
| 64 | |||
| 65 | UISettings::values.callout_flags |= static_cast<uint32_t>(flag); | ||
| 66 | |||
| 67 | QMessageBox msg; | ||
| 68 | msg.setText(message); | ||
| 69 | msg.setStandardButtons(QMessageBox::Ok); | ||
| 70 | msg.setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); | ||
| 71 | msg.setStyleSheet("QLabel{min-width: 900px;}"); | ||
| 72 | msg.exec(); | ||
| 73 | } | ||
| 74 | |||
| 75 | void GMainWindow::ShowCallouts() { | ||
| 76 | static const QString telemetry_message = | ||
| 77 | tr("To help improve Citra, the Citra Team collects anonymous usage data. No private or " | ||
| 78 | "personally identifying information is collected. This data helps us to understand how " | ||
| 79 | "people use Citra and prioritize our efforts. Furthermore, it helps us to more easily " | ||
| 80 | "identify emulation bugs and performance issues. This data includes:<ul><li>Information" | ||
| 81 | " about the version of Citra you are using</li><li>Performance data about the games you " | ||
| 82 | "play</li><li>Your configuration settings</li><li>Information about your computer " | ||
| 83 | "hardware</li><li>Emulation errors and crash information</li></ul>By default, this " | ||
| 84 | "feature is enabled. To disable this feature, click 'Emulation' from the menu and then " | ||
| 85 | "select 'Configure...'. Then, on the 'Web' tab, uncheck 'Share anonymous usage data with" | ||
| 86 | " the Citra team'. <br/><br/>By using this software, you agree to the above terms.<br/>" | ||
| 87 | "<br/><a href='https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/'>Learn " | ||
| 88 | "more</a>"); | ||
| 89 | ShowCalloutMessage(telemetry_message, CalloutFlag::Telemetry); | ||
| 90 | } | ||
| 91 | |||
| 51 | GMainWindow::GMainWindow() : config(new Config()), emu_thread(nullptr) { | 92 | GMainWindow::GMainWindow() : config(new Config()), emu_thread(nullptr) { |
| 52 | Pica::g_debug_context = Pica::DebugContext::Construct(); | 93 | Pica::g_debug_context = Pica::DebugContext::Construct(); |
| 53 | setAcceptDrops(true); | 94 | setAcceptDrops(true); |
| @@ -73,6 +114,9 @@ GMainWindow::GMainWindow() : config(new Config()), emu_thread(nullptr) { | |||
| 73 | 114 | ||
| 74 | UpdateUITheme(); | 115 | UpdateUITheme(); |
| 75 | 116 | ||
| 117 | // Show one-time "callout" messages to the user | ||
| 118 | ShowCallouts(); | ||
| 119 | |||
| 76 | QStringList args = QApplication::arguments(); | 120 | QStringList args = QApplication::arguments(); |
| 77 | if (args.length() >= 2) { | 121 | if (args.length() >= 2) { |
| 78 | BootGame(args[1]); | 122 | BootGame(args[1]); |