Welcome! Log In Create A New Profile

Advanced

LIBWiiGUI Unload

Posted by pokeglobe 
LIBWiiGUI Unload
October 25, 2009 10:52PM
I am trying to make a game disk loader/movie loader. But it wont load (Due to GUI)
the raw console based code worked fine. It compiles fine.

This is my attempt at unloading the GUI.
		int i;


		for(i = 0; i < 255; i += 15)
				{
				mainWindow->Draw();
				Menu_DrawRectangle(0,0,screenwidth,screenheight,(GXColor){0, 0, 0, i},1);
				Menu_Render();
				}
		    bgMusic->Stop();
			HaltGui();
	        mainWindow->Remove(&w);
			HaltGui();

	        bgMusic->Stop();
	        delete bgMusic;
	        delete bgImg;
	        delete mainWindow;

	        delete pointer[0];
	        delete pointer[1];
	        delete pointer[2];
	        delete pointer[3];

		printf("\t\nLaunching Game...\n");//Just to test GUI unload...
	        boot_game();
All it does it start the DVD Drive,Shows Launching Game... And turns into a fuzzed out green. (FROZEN)
not the green screen that pops up when it boots but a noise green.
Re: LIBWiiGUI Unload
October 25, 2009 11:50PM
it would help to see the rest of the code. but this is almost exactly the same as how i exit libwiigui. i think you are forgetting to exit the gui thread though. im not sure how you have everything set up, but I have this
ExitGUIThreads();
while(ExitRequested != 2) usleep(THREAD_SLEEP);
right before stopping the bg music

you can check out my source for it [code.google.com]

ps. check your PM



Edited 1 time(s). Last edit at 10/25/2009 11:54PM by giantpune.
Re: LIBWiiGUI Unload
October 26, 2009 12:00AM
I'll try it out thanks!

EDIT: While compiling: ExitGUIThreads();
c:/devkitPro/examples/OLD/DvD_Loader_GX/source/menu.cpp: In function 'int MenuSettings()':
c:/devkitPro/examples/OLD/DvD_Loader_GX/source/menu.cpp:629: error: 'ExitGUIThreads' was not declared in this scope

For the full source: it's just libwiiGUI's template. (with awesome pics)
The DVD loader works fine if I call it before the GUI loads.
Edit 2: I skimmed what you said the first time.
I am using the default LibwiiGUI template. (1.04)



Edited 2 time(s). Last edit at 10/26/2009 12:31AM by pokeglobe.
Re: LIBWiiGUI Unload
October 26, 2009 12:52AM
usually you want to have the gui exit at the same place. just make it exit from the switch in the end of menu.cpp and after that start the dvd or whatever. if you want to use exitguithreads() in any file besides menu.cpp just make sure to put it in menu.h and include menu.h in the file you want to use it. also make sure it isn't set to static. and probably declare the exitrequest variable extern.



Edited 2 time(s). Last edit at 10/26/2009 12:55AM by giantpune.
Sorry, only registered users may post in this forum.

Click here to login