cleanup while loop vars

This commit is contained in:
dborth 2009-06-02 06:47:40 +00:00
parent ead421820b
commit 2d47a47f51

View File

@ -264,6 +264,8 @@ EmulatorUpdate (void *arg)
static void *
UpdateGUI (void *arg)
{
int i;
while(1)
{
if(guiHalt)
@ -275,7 +277,7 @@ UpdateGUI (void *arg)
mainWindow->Draw();
#ifdef HW_RVL
for(int i=3; i >= 0; i--) // so that player 1's cursor appears on top!
for(i=3; i >= 0; i--) // so that player 1's cursor appears on top!
{
if(userInput[i].wpad.ir.valid)
Menu_DrawImg(userInput[i].wpad.ir.x-48, userInput[i].wpad.ir.y-48,
@ -286,7 +288,7 @@ UpdateGUI (void *arg)
Menu_Render();
for(int i=3; i >= 0; i--)
for(i=3; i >= 0; i--)
mainWindow->Update(&userInput[i]);
#ifdef HW_RVL
@ -299,10 +301,10 @@ UpdateGUI (void *arg)
if(ExitRequested || ShutdownRequested)
{
for(int a = 0; a < 255; a += 15)
for(i = 0; i < 255; i += 15)
{
mainWindow->Draw();
Menu_DrawRectangle(0,0,screenwidth,screenheight,(GXColor){0, 0, 0, a},1);
Menu_DrawRectangle(0,0,screenwidth,screenheight,(GXColor){0, 0, 0, i},1);
Menu_Render();
}
@ -874,6 +876,8 @@ static void WindowCredits(void * ptr)
static int MenuGameSelection()
{
int menu = MENU_NONE;
bool res;
int i;
GuiText titleTxt("Choose Game", 28, (GXColor){255, 255, 255, 255});
titleTxt.SetAlignment(ALIGN_LEFT, ALIGN_TOP);
@ -976,7 +980,7 @@ static int MenuGameSelection()
// update gameWindow based on arrow buttons
// set MENU_EXIT if A button pressed on a game
for(int i=0; i<PAGESIZE; i++)
for(i=0; i<PAGESIZE; i++)
{
if(gameBrowser.gameList[i]->GetState() == STATE_CLICKED)
{
@ -984,8 +988,6 @@ static int MenuGameSelection()
// check corresponding browser entry
if(browserList[browser.selIndex].isdir || IsSz())
{
bool res;
if(IsSz())
res = BrowserLoadSz(GCSettings.LoadMethod);
else
@ -1257,7 +1259,7 @@ static int MenuGame()
closeBtn.SetEffectGrow();
#ifdef HW_RVL
int i = 0;
int i, level;
char txt[3];
GuiText * batteryTxt[4];
GuiImage * batteryImg[4];
@ -1345,7 +1347,6 @@ static int MenuGame()
usleep(THREAD_SLEEP);
#ifdef HW_RVL
int level;
for(i=0; i < 4; i++)
{
if(WPAD_Probe(i, NULL) == WPAD_ERR_NONE) // controller connected
@ -2478,6 +2479,7 @@ static int MenuSettingsMappingsMap()
{
int menu = MENU_NONE;
int ret,i,j;
u32 pressed;
OptionList options;
char menuTitle[100];
@ -2596,7 +2598,7 @@ static int MenuSettingsMappingsMap()
if(ret >= 0)
{
u32 pressed = ButtonMappingWindow(); // get a button selection from user
pressed = ButtonMappingWindow(); // get a button selection from user
if (pressed > 0)
btnmap[mapMenuCtrlSNES][mapMenuCtrl][ret] = pressed; // update mapping