Skip to content

Commit

Permalink
Add configuration option for aspect ratio 16:10
Browse files Browse the repository at this point in the history
  • Loading branch information
drhelius committed Dec 17, 2024
1 parent aa8c05f commit 1731d30
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions platforms/shared/desktop/gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,9 @@ static void main_window(void)
case 2:
ratio = 16.0f / 9.0f;
break;
case 3:
ratio = 16.0f / 10.0f;
break;
default:
ratio = (float)runtime.screen_width / (float)runtime.screen_height;
}
Expand Down
4 changes: 2 additions & 2 deletions platforms/shared/desktop/gui_menus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ static void menu_video(void)

if (ImGui::MenuItem("Resize Window to Content"))
{
if (!config_debug.debug && (config_video.ratio != 3))
if (!config_debug.debug)
{
application_trigger_fit_to_content(gui_main_window_width, gui_main_window_height + gui_main_menu_height);
}
Expand All @@ -287,7 +287,7 @@ static void menu_video(void)
if (ImGui::BeginMenu("Aspect Ratio"))
{
ImGui::PushItemWidth(160.0f);
ImGui::Combo("##ratio", &config_video.ratio, "Square Pixels (1:1 PAR)\0Standard (4:3 DAR)\0Wide (16:9 DAR)\0\0");
ImGui::Combo("##ratio", &config_video.ratio, "Square Pixels (1:1 PAR)\0Standard (4:3 DAR)\0Wide (16:9 DAR)\0Wide (16:10 DAR)\0\0");
ImGui::PopItemWidth();
ImGui::EndMenu();
}
Expand Down

0 comments on commit 1731d30

Please sign in to comment.