#include <revolution/gx.h>
void GXAdjustForOverscan(
const GXRenderModeObj* rmin,
GXRenderModeObj* rmout,
u16 hor,
u16 ver );
| rmin | A pointer to the copy source GXRenderModeObj. |
|---|---|
| rmout | A pointer to the GXRenderModeObj that will contain the adjusted version. This needs to be allocated in advance, but it does not need to be initialized. This may be the same object as rmin. |
| hor | The number of pixels to be deleted from each side of the screen. |
| ver | The number of pixels to be deleted from the top and bottom of the screen (each). |
None.
This function takes a given render mode and returns a version that is reduced in size to account for overscan. The number of pixels specified by hor is subtracted from each side of the screen, and the number of pixels specified by ver is subtracted from both the top and the bottom of the screen. The active screen area is centered within what the render mode specified before the adjustment.
The following algorithm is used to adjust the EFB and XFB heights:
output EFB height = input EFB height - ver * 2 * input EFB height / input XFB height
if (input xFBmode == VI_XFBMODE_SF && input viTVmode is not progressive scan)
output XFB height = input XFB height - ver
else
ouptut XFB height = input XFB height - ver * 2
Due to the wide possibilities of how a render mode may be configured, this function may not work in all cases. For instance, if you use Y-scaling to create a size difference between the EFB and XFB, this function may not do the right thing. In such cases, you should configure the desired render mode manually (or else call the GXAdjustForOverscan function and then adjust the results).
2006/03/01 Initial version.
CONFIDENTIAL