cleanup while loop vars

This commit is contained in:
dborth 2009-06-02 06:47:03 +00:00
parent f5563ce001
commit bfbcc57380

View File

@ -249,6 +249,8 @@ EmulatorUpdate (void *arg)
static void *
UpdateGUI (void *arg)
{
int i;
while(1)
{
if(guiHalt)
@ -260,7 +262,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,
@ -271,7 +273,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
@ -284,10 +286,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();
}
@ -861,6 +863,8 @@ static void WindowCredits(void * ptr)
static int MenuGameSelection()
{
int menu = MENU_NONE;
int i;
bool res;
GuiText titleTxt("Choose Game", 28, (GXColor){255, 255, 255, 255});
titleTxt.SetAlignment(ALIGN_LEFT, ALIGN_TOP);
@ -963,7 +967,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)
{
@ -971,8 +975,6 @@ static int MenuGameSelection()
// check corresponding browser entry
if(browserList[browser.selIndex].isdir || IsSz())
{
bool res;
if(IsSz())
res = BrowserLoadSz(GCSettings.LoadMethod);
else
@ -1244,7 +1246,7 @@ static int MenuGame()
closeBtn.SetEffectGrow();
#ifdef HW_RVL
int i = 0;
int i, level;
char txt[3];
GuiText * batteryTxt[4];
GuiImage * batteryImg[4];
@ -1332,7 +1334,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
@ -1447,7 +1448,7 @@ static int MenuGame()
static int MenuGameSaves(int action)
{
int menu = MENU_NONE;
int ret;
int ret, result;
int i, n, len, len2;
int j = 0;
SaveList saves;
@ -1627,7 +1628,7 @@ static int MenuGameSaves(int action)
// load or save game
if(ret > -3)
{
int result = 0;
result = 0;
if(action == 0) // load
{
@ -2427,6 +2428,7 @@ static int MenuSettingsMappingsMap()
{
int menu = MENU_NONE;
int ret,i,j;
u32 pressed;
OptionList options;
char menuTitle[100];
@ -2529,7 +2531,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[mapMenuCtrlNES][mapMenuCtrl][ret] = pressed; // update mapping