Skip to content

Commit ecd0b96

Browse files
committed
ui: Add render scale and backend to compat reports
1 parent 2736bab commit ecd0b96

File tree

4 files changed

+24
-15
lines changed

4 files changed

+24
-15
lines changed

ui/xui/compat.cc

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,6 @@ CompatibilityReporter::CompatibilityReporter()
4444
did_send = send_result = false;
4545
}
4646

47-
CompatibilityReporter::~CompatibilityReporter()
48-
{
49-
}
50-
5147
void CompatibilityReporter::Draw()
5248
{
5349
if (!is_open) return;
@@ -91,6 +87,23 @@ void CompatibilityReporter::Draw()
9187
description[0] = '\x00';
9288
report.compat_comments = description;
9389

90+
char render_scale_buffer[8];
91+
snprintf(render_scale_buffer, sizeof(render_scale_buffer), "%dx",
92+
nv2a_get_surface_scale_factor());
93+
report.rendering_scale = render_scale_buffer;
94+
95+
switch (g_config.display.renderer) {
96+
case CONFIG_DISPLAY_RENDERER_NULL:
97+
report.backend = "Null";
98+
break;
99+
case CONFIG_DISPLAY_RENDERER_OPENGL:
100+
report.backend = "OpenGL";
101+
break;
102+
case CONFIG_DISPLAY_RENDERER_VULKAN:
103+
report.backend = "Vulkan";
104+
break;
105+
}
106+
94107
strncpy(token_buf, g_config.general.user_token, sizeof(token_buf)-1);
95108
report.token = token_buf;
96109

ui/xui/compat.hh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public:
3434
std::string serialized_report;
3535

3636
CompatibilityReporter();
37-
~CompatibilityReporter();
37+
~CompatibilityReporter() = default;
3838
void Draw();
3939
};
4040

ui/xui/reporting.cc

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,6 @@ using json = nlohmann::json;
3131

3232
static const char *compat_report_endpoint_url = "https://reports.xemu.app/compatibility";
3333

34-
CompatibilityReport::CompatibilityReport()
35-
{
36-
}
37-
38-
CompatibilityReport::~CompatibilityReport()
39-
{
40-
}
41-
4234
const std::string &CompatibilityReport::GetSerializedReport()
4335
{
4436
json report = {
@@ -57,6 +49,8 @@ const std::string &CompatibilityReport::GetSerializedReport()
5749
{"compat_rating", compat_rating},
5850
{"compat_comments", compat_comments},
5951
{"xbe_headers", xbe_headers},
52+
{"rendering_scale", rendering_scale},
53+
{"backend", backend},
6054
};
6155
serialized = report.dump(2);
6256
return serialized;

ui/xui/reporting.hh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,17 @@ public:
4141
std::string compat_rating;
4242
std::string compat_comments;
4343
std::string xbe_headers;
44+
std::string rendering_scale;
45+
std::string backend;
4446

4547
private:
4648
std::string serialized;
4749
int result_code;
4850
std::string result_msg;
4951

5052
public:
51-
CompatibilityReport();
52-
~CompatibilityReport();
53+
CompatibilityReport() = default;
54+
~CompatibilityReport() = default;
5355
bool Send();
5456
int GetResultCode() { return result_code; }
5557
std::string &GetResultMessage() { return result_msg; }

0 commit comments

Comments
 (0)