diff --git a/HBC/META.XML b/HBC/META.XML index 541b2cad..69d9a586 100644 --- a/HBC/META.XML +++ b/HBC/META.XML @@ -2,8 +2,8 @@ USB Loader GX USB Loader GX Team - 1.0 r952 - 201009182328 + 1.0 r953 + 201009190727 Loads games from USB-devices USB Loader GX is a libwiigui based USB iso loader with a wii-like GUI. You can install games to your HDDs and boot them with shorter loading times. The interactive GUI is completely controllable with WiiMote, Classic Controller or GC Controller. diff --git a/gui.pnproj b/gui.pnproj index cfe7df13..0cb6dc9d 100644 --- a/gui.pnproj +++ b/gui.pnproj @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/source/main.cpp b/source/main.cpp index 32db79a4..cf9008ea 100644 --- a/source/main.cpp +++ b/source/main.cpp @@ -55,27 +55,17 @@ extern "C" #include "wad/nandtitle.h" extern bool geckoinit; -extern bool textVideoInit; extern char headlessID[8]; NandTitle titles; - -/* Constants */ -#define CONSOLE_XCOORD 260 -#define CONSOLE_YCOORD 115 -#define CONSOLE_WIDTH 340 -#define CONSOLE_HEIGHT 218 - PartList partitions; -u8 dbvideo = 0; int main( int argc, char *argv[] ) { MEM2_init( 48 ); setlocale( LC_ALL, "en.UTF-8" ); geckoinit = InitGecko(); - InitVideo(); //TODO: some sort of magic is done in the CFG_Load() ( maybe stff with CONF_ ). if videoinit is after cfg load, my full screen is used. - //with videoinit before CFG load, i get black box around my picture + InitVideo(); __exception_setreload( 20 ); printf( "\tStarting up\n" ); @@ -115,6 +105,7 @@ int main( int argc, char *argv[] ) gettextCleanUp(); printf( "\tLoading configuration..." ); CFG_Load(); + VIDEO_SetWidescreen(CFG.widescreen); printf( "done\n" ); SDCard_deInit();// unmount SD for reloading IOS @@ -137,7 +128,7 @@ int main( int argc, char *argv[] ) printf( "\tWaiting for USB:\n" ); if ( MountWBFS() < 0 ) { - printf( "ERROR: No WBFS drive mounted.\n" ); + printf( "ERROR: No WBFS drive mounted.\n" ); sleep( 5 ); exit( 0 ); } diff --git a/source/menu.cpp b/source/menu.cpp index 481d5143..ba36d4ad 100644 --- a/source/menu.cpp +++ b/source/menu.cpp @@ -68,7 +68,6 @@ extern u8 shutdown; extern u8 reset; extern s32 gameSelected, gameStart; extern u8 boothomebrew; -extern u8 dbvideo; /**************************************************************************** @@ -355,9 +354,6 @@ int MainMenu( int menu ) StopGX(); gettextCleanUp(); - if ( dbvideo ) - InitVideodebug (); - if ( mountMethod == 3 ) { struct discHdr *header = gameList[gameSelected]; diff --git a/source/video.cpp b/source/video.cpp index 65215ec9..160605e6 100644 --- a/source/video.cpp +++ b/source/video.cpp @@ -138,13 +138,6 @@ InitVideo () VIDEO_Init(); vmode = VIDEO_GetPreferredMode( NULL ); // get default video mode - // widescreen fix - if ( CFG.widescreen ) - { - vmode->viWidth = VI_MAX_WIDTH_PAL - 12; - vmode->viXOrigin = ( ( VI_MAX_WIDTH_PAL - vmode->viWidth ) / 2 ) + 2; - } - VIDEO_Configure ( vmode ); screenheight = 480; @@ -172,31 +165,21 @@ InitVideo () // A console is always useful while debugging console_init ( xfb[0], 80, 100, 500, 350, vmode->fbWidth * 2 ); } -static unsigned int *xfbDB = NULL; -void InitVideodebug () +void VIDEO_SetWidescreen(bool widescreen) { - VIDEO_Init(); - GXRModeObj *vmode = VIDEO_GetPreferredMode( NULL ); // get default video mode + if ( widescreen ) + { + // widescreen fix + vmode->viWidth = VI_MAX_WIDTH_PAL - 12; + vmode->viXOrigin = ( ( VI_MAX_WIDTH_PAL - vmode->viWidth ) / 2 ) + 2; + } + else + { + VIDEO_GetPreferredMode( NULL ); + } - // widescreen fix VIDEO_Configure ( vmode ); - - // Allocate the video buffers - xfbDB = ( u32 * ) MEM_K0_TO_K1 ( SYS_AllocateFramebuffer ( vmode ) ); - - // A console is always useful while debugging - console_init ( xfbDB, 20, 64, vmode->fbWidth, vmode->xfbHeight, vmode->fbWidth * 2 ); - - // Clear framebuffers etc. - VIDEO_ClearFrameBuffer ( vmode, xfbDB, COLOR_BLACK ); - VIDEO_SetNextFramebuffer ( xfbDB ); - - VIDEO_SetBlack ( FALSE ); - VIDEO_Flush (); - VIDEO_WaitVSync (); - if ( vmode->viTVMode & VI_NON_INTERLACE ) - VIDEO_WaitVSync (); } /**************************************************************************** * StopGX @@ -219,7 +202,6 @@ void StopGX() ***************************************************************************/ void Menu_Render() { - whichfb ^= 1; // flip framebuffer GX_SetZMode( GX_TRUE, GX_LEQUAL, GX_TRUE ); GX_SetColorUpdate( GX_TRUE ); diff --git a/source/video.h b/source/video.h index 8322b1df..2ebd7282 100644 --- a/source/video.h +++ b/source/video.h @@ -22,6 +22,7 @@ void Menu_DrawTPLImg( f32 xpos, f32 ypos, f32 zpos, f32 width, f32 height, GXTex f32 degrees, f32 scaleX, f32 scaleY, u8 alpha, int XX1, int YY1, int XX2, int YY2, int XX3, int YY3, int XX4, int YY4 ); void Menu_DrawRectangle( f32 x, f32 y, f32 width, f32 height, GXColor color, u8 filled ); s32 TakeScreenshot( const char *path ); +void VIDEO_SetWidescreen(bool widescreen); extern int screenheight; extern int screenwidth;