mirror of
https://github.com/dborth/vbagx.git
synced 2024-12-27 03:01:50 +01:00
code tidy
This commit is contained in:
parent
e35145ec94
commit
03dea791a1
@ -249,11 +249,9 @@ int main(int argc, char *argv[])
|
||||
#endif
|
||||
|
||||
InitDeviceThread();
|
||||
VIDEO_Init();
|
||||
SetupPads();
|
||||
|
||||
InitializeVideo();
|
||||
ResetVideo_Menu (); // change to menu video mode
|
||||
SetupPads();
|
||||
|
||||
#ifdef HW_RVL
|
||||
// Wii Power/Reset buttons
|
||||
|
@ -110,15 +110,6 @@ vbgetback (void *arg)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* InitVideoThread
|
||||
***************************************************************************/
|
||||
void
|
||||
InitVideoThread ()
|
||||
{
|
||||
LWP_CreateThread (&vbthread, vbgetback, NULL, vbstack, TSTACK, 100);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* copy_to_xfb
|
||||
*
|
||||
@ -137,7 +128,6 @@ copy_to_xfb (u32 arg)
|
||||
FrameTimer++;
|
||||
}
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
* Scaler Support Functions
|
||||
****************************************************************************/
|
||||
@ -261,29 +251,6 @@ static inline void draw_cursor(Mtx v)
|
||||
}
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* StartGX
|
||||
*
|
||||
* Initialises GX and sets it up for use
|
||||
***************************************************************************/
|
||||
static void StartGX ()
|
||||
{
|
||||
GXColor background = { 0, 0, 0, 0xff };
|
||||
|
||||
/*** Clear out FIFO area ***/
|
||||
memset (gp_fifo, 0, DEFAULT_FIFO_SIZE);
|
||||
|
||||
/*** Initialise GX ***/
|
||||
GX_Init (&gp_fifo, DEFAULT_FIFO_SIZE);
|
||||
GX_SetCopyClear (background, 0x00ffffff);
|
||||
|
||||
GX_SetDispCopyGamma (GX_GM_1_0);
|
||||
GX_SetCullMode (GX_CULL_NONE);
|
||||
|
||||
GX_CopyDisp (xfb[whichfb], GX_TRUE); // reset xfb
|
||||
GX_Flush();
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* StopGX
|
||||
*
|
||||
@ -420,10 +387,21 @@ static void SetupVideoMode(GXRModeObj * mode)
|
||||
void
|
||||
InitializeVideo ()
|
||||
{
|
||||
VIDEO_Init();
|
||||
GXRModeObj *rmode = FindVideoMode();
|
||||
SetupVideoMode(rmode);
|
||||
StartGX ();
|
||||
InitVideoThread ();
|
||||
|
||||
LWP_CreateThread (&vbthread, vbgetback, NULL, vbstack, TSTACK, 68);
|
||||
|
||||
// Initialise GX
|
||||
GXColor background = { 0, 0, 0, 0xff };
|
||||
memset (gp_fifo, 0, DEFAULT_FIFO_SIZE);
|
||||
GX_Init (&gp_fifo, DEFAULT_FIFO_SIZE);
|
||||
GX_SetCopyClear (background, 0x00ffffff);
|
||||
GX_SetDispCopyGamma (GX_GM_1_0);
|
||||
GX_SetCullMode (GX_CULL_NONE);
|
||||
GX_CopyDisp (xfb[whichfb], GX_TRUE); // reset xfb
|
||||
GX_Flush();
|
||||
|
||||
#ifdef HW_RVL
|
||||
pointer[0] = new GuiImageData(player1_point_png);
|
||||
|
Loading…
Reference in New Issue
Block a user