Fixed invalid use of sprintf.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@344 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Maarten ter Huurne 2008-08-27 09:54:11 +00:00
parent 411b81088b
commit 8876637c9f
1 changed files with 3 additions and 13 deletions

View File

@ -623,11 +623,7 @@ void ConfigBox::GetButtons(wxCommandEvent& event)
SLEEP(10); SLEEP(10);
} }
if(succeed) sprintf(format, "%d", succeed ? pressed : -1);
sprintf(format, "%d", pressed);
else
sprintf(format, "-1", pressed);
SetButtonText(ID, format); SetButtonText(ID, format);
if(SDL_JoystickOpened(joysticks[controller].ID)) if(SDL_JoystickOpened(joysticks[controller].ID))
@ -686,10 +682,7 @@ void ConfigBox::GetHats(int ID)
SLEEP(10); SLEEP(10);
} }
if(succeed) sprintf(format, "%d", succeed ? pressed : -1);
sprintf(format, "%d", pressed);
else
sprintf(format, "-1", pressed);
SetButtonText(ID, format); SetButtonText(ID, format);
if(SDL_JoystickOpened(joysticks[controller].ID)) if(SDL_JoystickOpened(joysticks[controller].ID))
@ -751,10 +744,7 @@ void ConfigBox::GetAxis(wxCommandEvent& event)
SLEEP(10); SLEEP(10);
} }
if(succeed) sprintf(format, "%d", succeed ? pressed : -1);
sprintf(format, "%d", pressed);
else
sprintf(format, "-1", pressed);
SetButtonText(ID, format); SetButtonText(ID, format);
if(SDL_JoystickOpened(joysticks[controller].ID)) if(SDL_JoystickOpened(joysticks[controller].ID))