mirror of
https://github.com/optiscaler/OptiScaler.git
synced 2026-11-04 13:03:17 +00:00
Centered the API row
This commit is contained in:
1 parent
a6b8731533
commit
bc69b0bf50
1 file changed
+13
-2
@@ -10183,7 +10183,7 @@ void MenuCommon::RenderHudlessResourcesWindow(RenderMenuContext& ctx, ImGuiWindo
|
||||
}
|
||||
}
|
||||
|
||||
// Game name | API | GPU | Input, above the tabs
|
||||
// API | GPU | Input, above the tabs
|
||||
static void RenderGameInfoRow(State& state, const GpuInformation& primaryGpu)
|
||||
{
|
||||
// Game name is in the window title
|
||||
@@ -10193,7 +10193,18 @@ static void RenderGameInfoRow(State& state, const GpuInformation& primaryGpu)
|
||||
: IdentifyGpu::gameUsesVkd3dProton() ? " (VKD3D)"
|
||||
: "",
|
||||
primaryGpu.name.c_str(), ApiUpscalerInputName(state.currentInputApiName).c_str());
|
||||
ImGui::TextWrapped("%s", line.c_str());
|
||||
|
||||
const float avail = ImGui::GetContentRegionAvail().x;
|
||||
const float textWidth = ImGui::CalcTextSize(line.c_str()).x;
|
||||
if (textWidth < avail)
|
||||
{
|
||||
ImGui::SetCursorPosX(ImGui::GetCursorPosX() + (avail - textWidth) * 0.5f);
|
||||
ImGui::TextUnformatted(line.c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
ImGui::TextWrapped("%s", line.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
void MenuCommon::RenderMainMenuWindow(RenderMenuContext& ctx)
|
||||
|
||||
Reference in new issue
Block a user