Moonlight-XboxOG latest
Moonlight Xbox OG is a port of the Moonlight Game Streaming client to the original Xbox console.
splash_layout.h
Go to the documentation of this file.
1
5#pragma once
6
7// nxdk includes
8#include <hal/video.h>
9
10namespace splash {
11
15 struct SplashLayout {
17 int x;
19 int y;
21 int width;
23 int height;
24 };
25
32 float get_framebuffer_aspect_ratio(const VIDEO_MODE &videoMode);
33
44 float get_display_aspect_ratio(const VIDEO_MODE &videoMode, unsigned long encoderSettings);
45
58 int calculate_display_width(int screenHeight, const VIDEO_MODE &videoMode, unsigned long encoderSettings);
59
67 float get_logo_width_aspect_correction(const VIDEO_MODE &videoMode, unsigned long encoderSettings);
68
81 int screenWidth,
82 int screenHeight,
83 int logoWidth,
84 int logoHeight,
85 const VIDEO_MODE &videoMode,
86 unsigned long encoderSettings
87 );
88
89} // namespace splash
SplashLayout calculate_logo_destination(int screenWidth, int screenHeight, int logoWidth, int logoHeight, const VIDEO_MODE &videoMode, unsigned long encoderSettings)
Calculate the centered destination rectangle for the splash logo.
Definition splash_layout.cpp:51
float get_framebuffer_aspect_ratio(const VIDEO_MODE &videoMode)
Return the framebuffer aspect ratio for a video mode.
Definition splash_layout.cpp:30
float get_logo_width_aspect_correction(const VIDEO_MODE &videoMode, unsigned long encoderSettings)
Return the width correction factor applied before scaling the logo.
Definition splash_layout.cpp:47
float get_display_aspect_ratio(const VIDEO_MODE &videoMode, unsigned long encoderSettings)
Return the display aspect ratio after encoder corrections.
Definition splash_layout.cpp:34
int calculate_display_width(int screenHeight, const VIDEO_MODE &videoMode, unsigned long encoderSettings)
Calculate the logical display width for square-pixel UI layout.
Definition splash_layout.cpp:43
Rectangle used for splash image placement.
Definition splash_layout.h:15
int width
Width of the scaled splash logo in destination pixels.
Definition splash_layout.h:21
int y
Vertical offset from the top edge of the destination surface.
Definition splash_layout.h:19
int x
Horizontal offset from the left edge of the destination surface.
Definition splash_layout.h:17
int height
Height of the scaled splash logo in destination pixels.
Definition splash_layout.h:23