diff options
Diffstat (limited to 'src/citra_qt')
| -rw-r--r-- | src/citra_qt/CMakeLists.txt | 3 | ||||
| -rw-r--r-- | src/citra_qt/configuration/config.cpp | 8 | ||||
| -rw-r--r-- | src/citra_qt/configuration/configure.ui | 15 | ||||
| -rw-r--r-- | src/citra_qt/configuration/configure_dialog.cpp | 1 | ||||
| -rw-r--r-- | src/citra_qt/configuration/configure_web.cpp | 52 | ||||
| -rw-r--r-- | src/citra_qt/configuration/configure_web.h | 30 | ||||
| -rw-r--r-- | src/citra_qt/configuration/configure_web.ui | 153 | ||||
| -rw-r--r-- | src/citra_qt/main.cpp | 46 | ||||
| -rw-r--r-- | src/citra_qt/main.h | 2 | ||||
| -rw-r--r-- | src/citra_qt/ui_settings.h | 2 |
10 files changed, 310 insertions, 2 deletions
diff --git a/src/citra_qt/CMakeLists.txt b/src/citra_qt/CMakeLists.txt index f364b2284..e0a19fd9e 100644 --- a/src/citra_qt/CMakeLists.txt +++ b/src/citra_qt/CMakeLists.txt | |||
| @@ -12,6 +12,7 @@ set(SRCS | |||
| 12 | configuration/configure_graphics.cpp | 12 | configuration/configure_graphics.cpp |
| 13 | configuration/configure_input.cpp | 13 | configuration/configure_input.cpp |
| 14 | configuration/configure_system.cpp | 14 | configuration/configure_system.cpp |
| 15 | configuration/configure_web.cpp | ||
| 15 | debugger/graphics/graphics.cpp | 16 | debugger/graphics/graphics.cpp |
| 16 | debugger/graphics/graphics_breakpoint_observer.cpp | 17 | debugger/graphics/graphics_breakpoint_observer.cpp |
| 17 | debugger/graphics/graphics_breakpoints.cpp | 18 | debugger/graphics/graphics_breakpoints.cpp |
| @@ -42,6 +43,7 @@ set(HEADERS | |||
| 42 | configuration/configure_graphics.h | 43 | configuration/configure_graphics.h |
| 43 | configuration/configure_input.h | 44 | configuration/configure_input.h |
| 44 | configuration/configure_system.h | 45 | configuration/configure_system.h |
| 46 | configuration/configure_web.h | ||
| 45 | debugger/graphics/graphics.h | 47 | debugger/graphics/graphics.h |
| 46 | debugger/graphics/graphics_breakpoint_observer.h | 48 | debugger/graphics/graphics_breakpoint_observer.h |
| 47 | debugger/graphics/graphics_breakpoints.h | 49 | debugger/graphics/graphics_breakpoints.h |
| @@ -71,6 +73,7 @@ set(UIS | |||
| 71 | configuration/configure_graphics.ui | 73 | configuration/configure_graphics.ui |
| 72 | configuration/configure_input.ui | 74 | configuration/configure_input.ui |
| 73 | configuration/configure_system.ui | 75 | configuration/configure_system.ui |
| 76 | configuration/configure_web.ui | ||
| 74 | debugger/registers.ui | 77 | debugger/registers.ui |
| 75 | hotkeys.ui | 78 | hotkeys.ui |
| 76 | main.ui | 79 | main.ui |
diff --git a/src/citra_qt/configuration/config.cpp b/src/citra_qt/configuration/config.cpp index 6e42db007..e2dceaa4c 100644 --- a/src/citra_qt/configuration/config.cpp +++ b/src/citra_qt/configuration/config.cpp | |||
| @@ -139,10 +139,13 @@ void Config::ReadValues() { | |||
| 139 | qt_config->endGroup(); | 139 | qt_config->endGroup(); |
| 140 | 140 | ||
| 141 | qt_config->beginGroup("WebService"); | 141 | qt_config->beginGroup("WebService"); |
| 142 | Settings::values.enable_telemetry = qt_config->value("enable_telemetry", true).toBool(); | ||
| 142 | Settings::values.telemetry_endpoint_url = | 143 | Settings::values.telemetry_endpoint_url = |
| 143 | qt_config->value("telemetry_endpoint_url", "https://services.citra-emu.org/api/telemetry") | 144 | qt_config->value("telemetry_endpoint_url", "https://services.citra-emu.org/api/telemetry") |
| 144 | .toString() | 145 | .toString() |
| 145 | .toStdString(); | 146 | .toStdString(); |
| 147 | Settings::values.citra_username = qt_config->value("citra_username").toString().toStdString(); | ||
| 148 | Settings::values.citra_token = qt_config->value("citra_token").toString().toStdString(); | ||
| 146 | qt_config->endGroup(); | 149 | qt_config->endGroup(); |
| 147 | 150 | ||
| 148 | qt_config->beginGroup("UI"); | 151 | qt_config->beginGroup("UI"); |
| @@ -194,6 +197,7 @@ void Config::ReadValues() { | |||
| 194 | UISettings::values.show_status_bar = qt_config->value("showStatusBar", true).toBool(); | 197 | UISettings::values.show_status_bar = qt_config->value("showStatusBar", true).toBool(); |
| 195 | UISettings::values.confirm_before_closing = qt_config->value("confirmClose", true).toBool(); | 198 | UISettings::values.confirm_before_closing = qt_config->value("confirmClose", true).toBool(); |
| 196 | UISettings::values.first_start = qt_config->value("firstStart", true).toBool(); | 199 | UISettings::values.first_start = qt_config->value("firstStart", true).toBool(); |
| 200 | UISettings::values.callout_flags = qt_config->value("calloutFlags", 0).toUInt(); | ||
| 197 | 201 | ||
| 198 | qt_config->endGroup(); | 202 | qt_config->endGroup(); |
| 199 | } | 203 | } |
| @@ -283,8 +287,11 @@ void Config::SaveValues() { | |||
| 283 | qt_config->endGroup(); | 287 | qt_config->endGroup(); |
| 284 | 288 | ||
| 285 | qt_config->beginGroup("WebService"); | 289 | qt_config->beginGroup("WebService"); |
| 290 | qt_config->setValue("enable_telemetry", Settings::values.enable_telemetry); | ||
| 286 | qt_config->setValue("telemetry_endpoint_url", | 291 | qt_config->setValue("telemetry_endpoint_url", |
| 287 | QString::fromStdString(Settings::values.telemetry_endpoint_url)); | 292 | QString::fromStdString(Settings::values.telemetry_endpoint_url)); |
| 293 | qt_config->setValue("citra_username", QString::fromStdString(Settings::values.citra_username)); | ||
| 294 | qt_config->setValue("citra_token", QString::fromStdString(Settings::values.citra_token)); | ||
| 288 | qt_config->endGroup(); | 295 | qt_config->endGroup(); |
| 289 | 296 | ||
| 290 | qt_config->beginGroup("UI"); | 297 | qt_config->beginGroup("UI"); |
| @@ -320,6 +327,7 @@ void Config::SaveValues() { | |||
| 320 | qt_config->setValue("showStatusBar", UISettings::values.show_status_bar); | 327 | qt_config->setValue("showStatusBar", UISettings::values.show_status_bar); |
| 321 | qt_config->setValue("confirmClose", UISettings::values.confirm_before_closing); | 328 | qt_config->setValue("confirmClose", UISettings::values.confirm_before_closing); |
| 322 | qt_config->setValue("firstStart", UISettings::values.first_start); | 329 | qt_config->setValue("firstStart", UISettings::values.first_start); |
| 330 | qt_config->setValue("calloutFlags", UISettings::values.callout_flags); | ||
| 323 | 331 | ||
| 324 | qt_config->endGroup(); | 332 | qt_config->endGroup(); |
| 325 | } | 333 | } |
diff --git a/src/citra_qt/configuration/configure.ui b/src/citra_qt/configuration/configure.ui index 85e206e42..6abd1917e 100644 --- a/src/citra_qt/configuration/configure.ui +++ b/src/citra_qt/configuration/configure.ui | |||
| @@ -6,8 +6,8 @@ | |||
| 6 | <rect> | 6 | <rect> |
| 7 | <x>0</x> | 7 | <x>0</x> |
| 8 | <y>0</y> | 8 | <y>0</y> |
| 9 | <width>441</width> | 9 | <width>740</width> |
| 10 | <height>501</height> | 10 | <height>500</height> |
| 11 | </rect> | 11 | </rect> |
| 12 | </property> | 12 | </property> |
| 13 | <property name="windowTitle"> | 13 | <property name="windowTitle"> |
| @@ -49,6 +49,11 @@ | |||
| 49 | <string>Debug</string> | 49 | <string>Debug</string> |
| 50 | </attribute> | 50 | </attribute> |
| 51 | </widget> | 51 | </widget> |
| 52 | <widget class="ConfigureWeb" name="webTab"> | ||
| 53 | <attribute name="title"> | ||
| 54 | <string>Web</string> | ||
| 55 | </attribute> | ||
| 56 | </widget> | ||
| 52 | </widget> | 57 | </widget> |
| 53 | </item> | 58 | </item> |
| 54 | <item> | 59 | <item> |
| @@ -97,6 +102,12 @@ | |||
| 97 | <header>configuration/configure_graphics.h</header> | 102 | <header>configuration/configure_graphics.h</header> |
| 98 | <container>1</container> | 103 | <container>1</container> |
| 99 | </customwidget> | 104 | </customwidget> |
| 105 | <customwidget> | ||
| 106 | <class>ConfigureWeb</class> | ||
| 107 | <extends>QWidget</extends> | ||
| 108 | <header>configuration/configure_web.h</header> | ||
| 109 | <container>1</container> | ||
| 110 | </customwidget> | ||
| 100 | </customwidgets> | 111 | </customwidgets> |
| 101 | <resources/> | 112 | <resources/> |
| 102 | <connections> | 113 | <connections> |
diff --git a/src/citra_qt/configuration/configure_dialog.cpp b/src/citra_qt/configuration/configure_dialog.cpp index dfc8c03a7..b87dc0e6c 100644 --- a/src/citra_qt/configuration/configure_dialog.cpp +++ b/src/citra_qt/configuration/configure_dialog.cpp | |||
| @@ -23,5 +23,6 @@ void ConfigureDialog::applyConfiguration() { | |||
| 23 | ui->graphicsTab->applyConfiguration(); | 23 | ui->graphicsTab->applyConfiguration(); |
| 24 | ui->audioTab->applyConfiguration(); | 24 | ui->audioTab->applyConfiguration(); |
| 25 | ui->debugTab->applyConfiguration(); | 25 | ui->debugTab->applyConfiguration(); |
| 26 | ui->webTab->applyConfiguration(); | ||
| 26 | Settings::Apply(); | 27 | Settings::Apply(); |
| 27 | } | 28 | } |
diff --git a/src/citra_qt/configuration/configure_web.cpp b/src/citra_qt/configuration/configure_web.cpp new file mode 100644 index 000000000..8715fb018 --- /dev/null +++ b/src/citra_qt/configuration/configure_web.cpp | |||
| @@ -0,0 +1,52 @@ | |||
| 1 | // Copyright 2017 Citra Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #include "citra_qt/configuration/configure_web.h" | ||
| 6 | #include "core/settings.h" | ||
| 7 | #include "core/telemetry_session.h" | ||
| 8 | #include "ui_configure_web.h" | ||
| 9 | |||
| 10 | ConfigureWeb::ConfigureWeb(QWidget* parent) | ||
| 11 | : QWidget(parent), ui(std::make_unique<Ui::ConfigureWeb>()) { | ||
| 12 | ui->setupUi(this); | ||
| 13 | connect(ui->button_regenerate_telemetry_id, &QPushButton::clicked, this, | ||
| 14 | &ConfigureWeb::refreshTelemetryID); | ||
| 15 | |||
| 16 | this->setConfiguration(); | ||
| 17 | } | ||
| 18 | |||
| 19 | ConfigureWeb::~ConfigureWeb() {} | ||
| 20 | |||
| 21 | void ConfigureWeb::setConfiguration() { | ||
| 22 | ui->web_credentials_disclaimer->setWordWrap(true); | ||
| 23 | ui->telemetry_learn_more->setOpenExternalLinks(true); | ||
| 24 | ui->telemetry_learn_more->setText("<a " | ||
| 25 | "href='https://citra-emu.org/entry/" | ||
| 26 | "telemetry-and-why-thats-a-good-thing/'>Learn more</a>"); | ||
| 27 | |||
| 28 | ui->web_signup_link->setOpenExternalLinks(true); | ||
| 29 | ui->web_signup_link->setText("<a href='https://services.citra-emu.org/'>Sign up</a>"); | ||
| 30 | ui->web_token_info_link->setOpenExternalLinks(true); | ||
| 31 | ui->web_token_info_link->setText( | ||
| 32 | "<a href='https://citra-emu.org/wiki/citra-web-service/'>What is my token?</a>"); | ||
| 33 | |||
| 34 | ui->toggle_telemetry->setChecked(Settings::values.enable_telemetry); | ||
| 35 | ui->edit_username->setText(QString::fromStdString(Settings::values.citra_username)); | ||
| 36 | ui->edit_token->setText(QString::fromStdString(Settings::values.citra_token)); | ||
| 37 | ui->label_telemetry_id->setText("Telemetry ID: 0x" + | ||
| 38 | QString::number(Core::GetTelemetryId(), 16).toUpper()); | ||
| 39 | } | ||
| 40 | |||
| 41 | void ConfigureWeb::applyConfiguration() { | ||
| 42 | Settings::values.enable_telemetry = ui->toggle_telemetry->isChecked(); | ||
| 43 | Settings::values.citra_username = ui->edit_username->text().toStdString(); | ||
| 44 | Settings::values.citra_token = ui->edit_token->text().toStdString(); | ||
| 45 | Settings::Apply(); | ||
| 46 | } | ||
| 47 | |||
| 48 | void ConfigureWeb::refreshTelemetryID() { | ||
| 49 | const u64 new_telemetry_id{Core::RegenerateTelemetryId()}; | ||
| 50 | ui->label_telemetry_id->setText("Telemetry ID: 0x" + | ||
| 51 | QString::number(new_telemetry_id, 16).toUpper()); | ||
| 52 | } | ||
diff --git a/src/citra_qt/configuration/configure_web.h b/src/citra_qt/configuration/configure_web.h new file mode 100644 index 000000000..20bc254b9 --- /dev/null +++ b/src/citra_qt/configuration/configure_web.h | |||
| @@ -0,0 +1,30 @@ | |||
| 1 | // Copyright 2017 Citra Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #pragma once | ||
| 6 | |||
| 7 | #include <memory> | ||
| 8 | #include <QWidget> | ||
| 9 | |||
| 10 | namespace Ui { | ||
| 11 | class ConfigureWeb; | ||
| 12 | } | ||
| 13 | |||
| 14 | class ConfigureWeb : public QWidget { | ||
| 15 | Q_OBJECT | ||
| 16 | |||
| 17 | public: | ||
| 18 | explicit ConfigureWeb(QWidget* parent = nullptr); | ||
| 19 | ~ConfigureWeb(); | ||
| 20 | |||
| 21 | void applyConfiguration(); | ||
| 22 | |||
| 23 | public slots: | ||
| 24 | void refreshTelemetryID(); | ||
| 25 | |||
| 26 | private: | ||
| 27 | void setConfiguration(); | ||
| 28 | |||
| 29 | std::unique_ptr<Ui::ConfigureWeb> ui; | ||
| 30 | }; | ||
diff --git a/src/citra_qt/configuration/configure_web.ui b/src/citra_qt/configuration/configure_web.ui new file mode 100644 index 000000000..d8d283fad --- /dev/null +++ b/src/citra_qt/configuration/configure_web.ui | |||
| @@ -0,0 +1,153 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | <ui version="4.0"> | ||
| 3 | <class>ConfigureWeb</class> | ||
| 4 | <widget class="QWidget" name="ConfigureWeb"> | ||
| 5 | <property name="geometry"> | ||
| 6 | <rect> | ||
| 7 | <x>0</x> | ||
| 8 | <y>0</y> | ||
| 9 | <width>400</width> | ||
| 10 | <height>300</height> | ||
| 11 | </rect> | ||
| 12 | </property> | ||
| 13 | <property name="windowTitle"> | ||
| 14 | <string>Form</string> | ||
| 15 | </property> | ||
| 16 | <layout class="QVBoxLayout" name="verticalLayout"> | ||
| 17 | <item> | ||
| 18 | <layout class="QVBoxLayout" name="verticalLayout_3"> | ||
| 19 | <item> | ||
| 20 | <widget class="QGroupBox" name="groupBoxWebConfig"> | ||
| 21 | <property name="title"> | ||
| 22 | <string>Citra Web Service</string> | ||
| 23 | </property> | ||
| 24 | <layout class="QVBoxLayout" name="verticalLayoutCitraWebService"> | ||
| 25 | <item> | ||
| 26 | <widget class="QLabel" name="web_credentials_disclaimer"> | ||
| 27 | <property name="text"> | ||
| 28 | <string>By providing your username and token, you agree to allow Citra to collect additional usage data, which may include user identifying information.</string> | ||
| 29 | </property> | ||
| 30 | </widget> | ||
| 31 | </item> | ||
| 32 | <item> | ||
| 33 | <layout class="QGridLayout" name="gridLayoutCitraUsername"> | ||
| 34 | <item row="0" column="0"> | ||
| 35 | <widget class="QLabel" name="label_username"> | ||
| 36 | <property name="text"> | ||
| 37 | <string>Username: </string> | ||
| 38 | </property> | ||
| 39 | </widget> | ||
| 40 | </item> | ||
| 41 | <item row="0" column="1"> | ||
| 42 | <widget class="QLineEdit" name="edit_username"> | ||
| 43 | <property name="maxLength"> | ||
| 44 | <number>36</number> | ||
| 45 | </property> | ||
| 46 | </widget> | ||
| 47 | </item> | ||
| 48 | <item row="1" column="0"> | ||
| 49 | <widget class="QLabel" name="label_token"> | ||
| 50 | <property name="text"> | ||
| 51 | <string>Token: </string> | ||
| 52 | </property> | ||
| 53 | </widget> | ||
| 54 | </item> | ||
| 55 | <item row="1" column="1"> | ||
| 56 | <widget class="QLineEdit" name="edit_token"> | ||
| 57 | <property name="maxLength"> | ||
| 58 | <number>36</number> | ||
| 59 | </property> | ||
| 60 | <property name="echoMode"> | ||
| 61 | <enum>QLineEdit::Password</enum> | ||
| 62 | </property> | ||
| 63 | </widget> | ||
| 64 | </item> | ||
| 65 | <item row="2" column="0"> | ||
| 66 | <widget class="QLabel" name="web_signup_link"> | ||
| 67 | <property name="text"> | ||
| 68 | <string>Sign up</string> | ||
| 69 | </property> | ||
| 70 | </widget> | ||
| 71 | </item> | ||
| 72 | <item row="2" column="1"> | ||
| 73 | <widget class="QLabel" name="web_token_info_link"> | ||
| 74 | <property name="text"> | ||
| 75 | <string>What is my token?</string> | ||
| 76 | </property> | ||
| 77 | </widget> | ||
| 78 | </item> | ||
| 79 | </layout> | ||
| 80 | </item> | ||
| 81 | </layout> | ||
| 82 | </widget> | ||
| 83 | </item> | ||
| 84 | <item> | ||
| 85 | <widget class="QGroupBox" name="groupBox"> | ||
| 86 | <property name="title"> | ||
| 87 | <string>Telemetry</string> | ||
| 88 | </property> | ||
| 89 | <layout class="QVBoxLayout" name="verticalLayout_2"> | ||
| 90 | <item> | ||
| 91 | <widget class="QCheckBox" name="toggle_telemetry"> | ||
| 92 | <property name="text"> | ||
| 93 | <string>Share anonymous usage data with the Citra team</string> | ||
| 94 | </property> | ||
| 95 | </widget> | ||
| 96 | </item> | ||
| 97 | <item> | ||
| 98 | <widget class="QLabel" name="telemetry_learn_more"> | ||
| 99 | <property name="text"> | ||
| 100 | <string>Learn more</string> | ||
| 101 | </property> | ||
| 102 | </widget> | ||
| 103 | </item> | ||
| 104 | <item> | ||
| 105 | <layout class="QGridLayout" name="gridLayoutTelemetryId"> | ||
| 106 | <item row="0" column="0"> | ||
| 107 | <widget class="QLabel" name="label_telemetry_id"> | ||
| 108 | <property name="text"> | ||
| 109 | <string>Telemetry ID:</string> | ||
| 110 | </property> | ||
| 111 | </widget> | ||
| 112 | </item> | ||
| 113 | <item row="0" column="1"> | ||
| 114 | <widget class="QPushButton" name="button_regenerate_telemetry_id"> | ||
| 115 | <property name="sizePolicy"> | ||
| 116 | <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> | ||
| 117 | <horstretch>0</horstretch> | ||
| 118 | <verstretch>0</verstretch> | ||
| 119 | </sizepolicy> | ||
| 120 | </property> | ||
| 121 | <property name="layoutDirection"> | ||
| 122 | <enum>Qt::RightToLeft</enum> | ||
| 123 | </property> | ||
| 124 | <property name="text"> | ||
| 125 | <string>Regenerate</string> | ||
| 126 | </property> | ||
| 127 | </widget> | ||
| 128 | </item> | ||
| 129 | </layout> | ||
| 130 | </item> | ||
| 131 | </layout> | ||
| 132 | </widget> | ||
| 133 | </item> | ||
| 134 | </layout> | ||
| 135 | </item> | ||
| 136 | <item> | ||
| 137 | <spacer name="verticalSpacer"> | ||
| 138 | <property name="orientation"> | ||
| 139 | <enum>Qt::Vertical</enum> | ||
| 140 | </property> | ||
| 141 | <property name="sizeHint" stdset="0"> | ||
| 142 | <size> | ||
| 143 | <width>20</width> | ||
| 144 | <height>40</height> | ||
| 145 | </size> | ||
| 146 | </property> | ||
| 147 | </spacer> | ||
| 148 | </item> | ||
| 149 | </layout> | ||
| 150 | </widget> | ||
| 151 | <resources/> | ||
| 152 | <connections/> | ||
| 153 | </ui> | ||
diff --git a/src/citra_qt/main.cpp b/src/citra_qt/main.cpp index c1ae0ccc8..8adbcfe86 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]); |
| @@ -320,6 +364,8 @@ bool GMainWindow::LoadROM(const QString& filename) { | |||
| 320 | 364 | ||
| 321 | const Core::System::ResultStatus result{system.Load(render_window, filename.toStdString())}; | 365 | const Core::System::ResultStatus result{system.Load(render_window, filename.toStdString())}; |
| 322 | 366 | ||
| 367 | Core::Telemetry().AddField(Telemetry::FieldType::App, "Frontend", "Qt"); | ||
| 368 | |||
| 323 | if (result != Core::System::ResultStatus::Success) { | 369 | if (result != Core::System::ResultStatus::Success) { |
| 324 | switch (result) { | 370 | switch (result) { |
| 325 | case Core::System::ResultStatus::ErrorGetLoader: | 371 | case Core::System::ResultStatus::ErrorGetLoader: |
diff --git a/src/citra_qt/main.h b/src/citra_qt/main.h index 360de2ced..d59a6d67d 100644 --- a/src/citra_qt/main.h +++ b/src/citra_qt/main.h | |||
| @@ -80,6 +80,8 @@ private: | |||
| 80 | void BootGame(const QString& filename); | 80 | void BootGame(const QString& filename); |
| 81 | void ShutdownGame(); | 81 | void ShutdownGame(); |
| 82 | 82 | ||
| 83 | void ShowCallouts(); | ||
| 84 | |||
| 83 | /** | 85 | /** |
| 84 | * Stores the filename in the recently loaded files list. | 86 | * Stores the filename in the recently loaded files list. |
| 85 | * The new filename is stored at the beginning of the recently loaded files list. | 87 | * The new filename is stored at the beginning of the recently loaded files list. |
diff --git a/src/citra_qt/ui_settings.h b/src/citra_qt/ui_settings.h index 025c73f84..d85c92765 100644 --- a/src/citra_qt/ui_settings.h +++ b/src/citra_qt/ui_settings.h | |||
| @@ -48,6 +48,8 @@ struct Values { | |||
| 48 | 48 | ||
| 49 | // Shortcut name <Shortcut, context> | 49 | // Shortcut name <Shortcut, context> |
| 50 | std::vector<Shortcut> shortcuts; | 50 | std::vector<Shortcut> shortcuts; |
| 51 | |||
| 52 | uint32_t callout_flags; | ||
| 51 | }; | 53 | }; |
| 52 | 54 | ||
| 53 | extern Values values; | 55 | extern Values values; |