| 54 | } |
| 55 | |
| 56 | Rect ResolveRect(RectKind kind, int viewportWidth, int viewportHeight, const AspectSettings& aspect) |
| 57 | { |
| 58 | switch (kind) |
| 59 | { |
| 60 | case RectKind::Logical2DViewport: |
| 61 | return Logical2DRect(aspect); |
| 62 | case RectKind::Safe4x3: |
| 63 | return CenterRatioRect(kRatio4x3, viewportWidth, viewportHeight); |
| 64 | case RectKind::Safe16x9: |
| 65 | case RectKind::HudSafe16x9: |
| 66 | case RectKind::TitleSafe16x9: |
| 67 | return CenterRatioRect(kRatio16x9, viewportWidth, viewportHeight); |
| 68 | case RectKind::Safe21x9: |
| 69 | case RectKind::HudSafe21x9: |
| 70 | return CenterRatioRect(kRatio21x9, viewportWidth, viewportHeight); |
| 71 | case RectKind::PhysicalViewport: |
| 72 | default: |
| 73 | return PhysicalViewportRect(); |
| 74 | } |
| 75 | } |
| 76 | |
| 77 | const char* RectKindName(RectKind kind) |
| 78 | { |