mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2025-10-30 08:01:01 +00:00
Make djui_hud_get_screen_width() more readable
This commit is contained in:
parent
9901c89a33
commit
8eefbccc81
1 changed files with 8 additions and 3 deletions
|
|
@ -176,9 +176,14 @@ u32 djui_hud_get_screen_width(void) {
|
|||
windowWidth -= (GFX_DIMENSIONS_FROM_LEFT_EDGE(0) + GFX_DIMENSIONS_FROM_RIGHT_EDGE(0));
|
||||
}
|
||||
|
||||
return (sResolution == RESOLUTION_N64)
|
||||
? ((use_forced_4by3() ? (4.0f / 3.0f) : GFX_DIMENSIONS_ASPECT_RATIO) * SCREEN_HEIGHT)
|
||||
: (windowWidth / djui_gfx_get_scale());
|
||||
if (sResolution == RESOLUTION_N64) {
|
||||
f32 aspect = use_forced_4by3()
|
||||
? (4.0f / 3.0f)
|
||||
: GFX_DIMENSIONS_ASPECT_RATIO;
|
||||
return (aspect) * SCREEN_HEIGHT;
|
||||
} else {
|
||||
return (windowWidth / djui_gfx_get_scale());
|
||||
}
|
||||
}
|
||||
|
||||
u32 djui_hud_get_screen_height(void) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue