Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ui: show render scale and screen resolution to about window #1006

Draft
wants to merge 14 commits into
base: master
Choose a base branch
from
Draft
11 changes: 7 additions & 4 deletions ui/xui/main-menu.cc
Original file line number Diff line number Diff line change
Expand Up @@ -794,24 +794,27 @@ void MainMenuSystemView::Draw()

void MainMenuAboutView::Draw()
{
static const char *build_info_text = NULL;
const char *build_info_text = NULL;
Fabxx marked this conversation as resolved.
Show resolved Hide resolved
if (build_info_text == NULL) {
build_info_text = g_strdup_printf(
"Version: %s\nBranch: %s\nCommit: %s\nDate: %s",
xemu_version, xemu_branch, xemu_commit, xemu_date);
}

static const char *sys_info_text = NULL;
const char *sys_info_text = NULL;
Fabxx marked this conversation as resolved.
Show resolved Hide resolved
if (sys_info_text == NULL) {
Fabxx marked this conversation as resolved.
Show resolved Hide resolved
const char *gl_shader_version = (const char*)glGetString(GL_SHADING_LANGUAGE_VERSION);
const char *gl_version = (const char*)glGetString(GL_VERSION);
const char *gl_renderer = (const char*)glGetString(GL_RENDERER);
const char *gl_vendor = (const char*)glGetString(GL_VENDOR);
SDL_DisplayMode DM;
Fabxx marked this conversation as resolved.
Show resolved Hide resolved
SDL_GetCurrentDisplayMode(0, &DM);
sys_info_text = g_strdup_printf(
"CPU: %s\nOS Platform: %s\nOS Version: %s\nManufacturer: %s\n"
"GPU Model: %s\nDriver: %s\nShader: %s",
"GPU Model: %s\nDriver: %s\nShader: %s\nScaling: %dx\n"
"Resolution: %dx%d\n",
xemu_get_cpu_info(), xemu_get_os_platform(), xemu_get_os_info(), gl_vendor,
gl_renderer, gl_version, gl_shader_version);
gl_renderer, gl_version, gl_shader_version, nv2a_get_surface_scale_factor(), DM.w, DM.h);
}

static uint32_t time_start = 0;
Expand Down
1 change: 1 addition & 0 deletions ui/xui/reporting.cc
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ const std::string &CompatibilityReport::GetSerializedReport()
{"xemu_branch", xemu_branch},
{"xemu_commit", xemu_commit},
{"xemu_date", xemu_date},
{"xemu_rendering_scale", xemu_rendering_scale},
Fabxx marked this conversation as resolved.
Show resolved Hide resolved
{"os_platform", os_platform},
{"os_version", os_version},
{"cpu", cpu},
Expand Down
4 changes: 4 additions & 0 deletions ui/xui/reporting.hh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ public:
std::string xemu_branch;
std::string xemu_commit;
std::string xemu_date;
//not sure if report accepts unsigned int
unsigned int xemu_rendering_scale;
//is it ok to save the data from SDL_GetCurrentDisplayMode in main_menu.cc directly into the class? same as the rendering scale so the data will be filled
Fabxx marked this conversation as resolved.
Show resolved Hide resolved
int width, height;
Fabxx marked this conversation as resolved.
Show resolved Hide resolved
std::string os_platform;
std::string os_version;
std::string cpu;
Expand Down