@@ -260,7 +260,7 @@ RND_Renderer::ImGuiOverlay::~ImGuiOverlay() {
260260}
261261
262262void RND_Renderer::ImGuiOverlay::Update () {
263- ImGui::GetIO ().FontGlobalScale = 0 . 9f ;
263+ ImGui::GetIO ().FontGlobalScale = 1 . 0f ;
264264
265265 POINT p;
266266 GetCursorPos (&p);
@@ -284,14 +284,22 @@ void RND_Renderer::ImGuiOverlay::Update() {
284284 ImVec2 physicalRes = ImVec2 (renderPhysicalWidth, renderPhysicalHeight);
285285 ImVec2 framebufferRes = ImVec2 ((float )m_outputRes.width , (float )m_outputRes.height );
286286
287- ImGui::GetIO ().DisplaySize = physicalRes;
287+ // calculate a virtual resolution to keep UI size consistent
288+ float uiScaleFactor = (float )renderPhysicalHeight / 1080 .0f ;
289+ if (uiScaleFactor < 0 .1f ) uiScaleFactor = 0 .1f ;
290+
291+ uiScaleFactor *= 2 .0f ;
292+
293+ ImVec2 logicalRes = ImVec2 (physicalRes.x / uiScaleFactor, physicalRes.y / uiScaleFactor);
294+
295+ ImGui::GetIO ().DisplaySize = logicalRes;
288296
289297 // calculate the black bars
290298 uint32_t blackBarWidth = (nonCenteredWindowWidth - renderPhysicalWidth) / 2 ;
291299 uint32_t blackBarHeight = (nonCenteredWindowHeight - renderPhysicalHeight) / 2 ;
292300
293301 // adjust the framebuffer scale
294- ImGui::GetIO ().DisplayFramebufferScale = framebufferRes / physicalRes ;
302+ ImGui::GetIO ().DisplayFramebufferScale = framebufferRes / logicalRes ;
295303
296304 // the actual window is centered, so add offsets to both x and y on both sides
297305 p.x = p.x - blackBarWidth;
@@ -303,7 +311,7 @@ void RND_Renderer::ImGuiOverlay::Update() {
303311 ImGui::GetIO ().AddFocusEvent (isWindowFocused);
304312 if (isWindowFocused) {
305313 // update mouse state depending on if the window is focused
306- ImGui::GetIO ().AddMousePosEvent ((float )p.x , (float )p.y );
314+ ImGui::GetIO ().AddMousePosEvent ((float )p.x / uiScaleFactor , (float )p.y / uiScaleFactor );
307315
308316 ImGui::GetIO ().AddMouseButtonEvent (0 , GetAsyncKeyState (VK_LBUTTON) & 0x8000 );
309317 ImGui::GetIO ().AddMouseButtonEvent (1 , GetAsyncKeyState (VK_RBUTTON) & 0x8000 );
@@ -525,7 +533,7 @@ void RND_Renderer::ImGuiOverlay::DrawHelpMenu() {
525533 ImGui::SetNextWindowSize (windowWidth, ImGuiCond_Always);
526534 ImGui::PushStyleVar (ImGuiStyleVar_WindowPadding, ImVec2 (0 , 0 ));
527535
528- if (ImGui::Begin (" BetterVR Settings & Help##Settings" , nullptr , ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove)) {
536+ if (ImGui::Begin (" BetterVR Settings & Help | Long-Press Right Thumbstick To Exit Or Press B ##Settings" , nullptr , ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove)) {
529537 bool changed = false ;
530538
531539 if (ImGui::BeginTabBar (" HelpMenuTabs" )) {
@@ -611,7 +619,7 @@ void RND_Renderer::ImGuiOverlay::DrawHelpMenu() {
611619 if (performanceOverlay >= 1 ) {
612620 static const int freqOptions[] = { 30 , 60 , 72 , 80 , 90 , 120 , 144 };
613621 int currentFreq = (int )settings.performanceOverlayFrequency .load ();
614- int freqIdx = 1 ; // Default to 60
622+ int freqIdx = 5 ; // Default to 90
615623 for (int i = 0 ; i < std::size (freqOptions); i++) {
616624 if (freqOptions[i] == currentFreq) {
617625 freqIdx = i;
0 commit comments