mirror of
https://github.com/dborth/vbagx.git
synced 2025-01-14 19:49:06 +01:00
static xfb to reduce mem frag
This commit is contained in:
parent
a5dd37fd9d
commit
49450b8fff
@ -372,12 +372,6 @@ static void SetupVideoMode(GXRModeObj * mode)
|
|||||||
VIDEO_Configure (mode);
|
VIDEO_Configure (mode);
|
||||||
VIDEO_Flush();
|
VIDEO_Flush();
|
||||||
|
|
||||||
// Allocate the video buffers
|
|
||||||
if(xfb[0]) free(MEM_K1_TO_K0(xfb[0]));
|
|
||||||
if(xfb[1]) free(MEM_K1_TO_K0(xfb[1]));
|
|
||||||
xfb[0] = (u32 *) MEM_K0_TO_K1 (SYS_AllocateFramebuffer (mode));
|
|
||||||
xfb[1] = (u32 *) MEM_K0_TO_K1 (SYS_AllocateFramebuffer (mode));
|
|
||||||
|
|
||||||
// Clear framebuffers etc.
|
// Clear framebuffers etc.
|
||||||
VIDEO_ClearFrameBuffer (mode, xfb[0], COLOR_BLACK);
|
VIDEO_ClearFrameBuffer (mode, xfb[0], COLOR_BLACK);
|
||||||
VIDEO_ClearFrameBuffer (mode, xfb[1], COLOR_BLACK);
|
VIDEO_ClearFrameBuffer (mode, xfb[1], COLOR_BLACK);
|
||||||
@ -408,6 +402,11 @@ void
|
|||||||
InitializeVideo ()
|
InitializeVideo ()
|
||||||
{
|
{
|
||||||
VIDEO_Init();
|
VIDEO_Init();
|
||||||
|
|
||||||
|
// Allocate the video buffers
|
||||||
|
xfb[0] = (u32 *) MEM_K0_TO_K1 (memalign(32, 640*574*2));
|
||||||
|
xfb[1] = (u32 *) MEM_K0_TO_K1 (memalign(32, 640*574*2));
|
||||||
|
|
||||||
GXRModeObj *rmode = FindVideoMode();
|
GXRModeObj *rmode = FindVideoMode();
|
||||||
SetupVideoMode(rmode);
|
SetupVideoMode(rmode);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user