mirror of
https://github.com/GRRLIB/GRRLIB.git
synced 2024-12-23 02:39:19 +00:00
The GRRLIB code should now be able to compile for GameCube.
This commit is contained in:
parent
080dd9b7fd
commit
f1a3e81770
2 changed files with 14 additions and 4 deletions
|
@ -72,7 +72,8 @@ int GRRLIB_Init (void) {
|
|||
break;
|
||||
}
|
||||
|
||||
// 16:9 and 4:3 Screen Adjustment
|
||||
#if defined(HW_RVL)
|
||||
// 16:9 and 4:3 Screen Adjustment for Wii
|
||||
if (CONF_GetAspectRatio() == CONF_ASPECT_16_9) {
|
||||
rmode->viWidth = 678;
|
||||
rmode->viXOrigin = (VI_MAX_WIDTH_NTSC - 678)/2; // This probably needs to consider PAL
|
||||
|
@ -80,6 +81,11 @@ int GRRLIB_Init (void) {
|
|||
rmode->viWidth = 672;
|
||||
rmode->viXOrigin = (VI_MAX_WIDTH_NTSC - 672)/2;
|
||||
}
|
||||
#else
|
||||
// GameCube
|
||||
rmode->viWidth = 672;
|
||||
rmode->viXOrigin = (VI_MAX_WIDTH_NTSC - 672)/2;
|
||||
#endif
|
||||
|
||||
// --
|
||||
VIDEO_Configure(rmode);
|
||||
|
@ -181,8 +187,12 @@ int GRRLIB_Init (void) {
|
|||
*/
|
||||
void GRRLIB_Exit (void) {
|
||||
static bool done = false;
|
||||
if (done || !is_setup) return;
|
||||
else done = true;
|
||||
if (done || !is_setup) {
|
||||
return;
|
||||
}
|
||||
else {
|
||||
done = true;
|
||||
}
|
||||
|
||||
// Allow write access to the full screen
|
||||
GX_SetClipMode( GX_CLIP_DISABLE );
|
||||
|
|
|
@ -60,6 +60,6 @@ void GRRLIB_FreeTexture (GRRLIB_texImg *tex) {
|
|||
*/
|
||||
INLINE
|
||||
void GRRLIB_ClearTex(GRRLIB_texImg* tex) {
|
||||
bzero(tex->data, (tex->h * tex->w) << 2);
|
||||
memset(tex->data, 0, (tex->h * tex->w) << 2);
|
||||
GRRLIB_FlushTex(tex);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue