Patch by riccardom so desmume doesn't complain about

joystick when there's no joystick.
This commit is contained in:
yabause 2008-10-31 14:18:26 +00:00
parent de3a341782
commit a25b610c6e
1 changed files with 1 additions and 2 deletions

View File

@ -96,9 +96,9 @@ BOOL init_joy( void) {
} }
nbr_joy = SDL_NumJoysticks(); nbr_joy = SDL_NumJoysticks();
printf("Nbr of joysticks: %d\n\n", nbr_joy);
if ( nbr_joy > 0) { if ( nbr_joy > 0) {
printf("Found %d joysticks\n", nbr_joy);
open_joysticks = open_joysticks =
(SDL_Joystick**)calloc( sizeof ( SDL_Joystick *), nbr_joy); (SDL_Joystick**)calloc( sizeof ( SDL_Joystick *), nbr_joy);
@ -137,7 +137,6 @@ void set_kb_keys(const u16 kbCfg[])
void uninit_joy( void) void uninit_joy( void)
{ {
int i; int i;
printf("Disabling joystick support.\n");
if ( open_joysticks != NULL) { if ( open_joysticks != NULL) {
for (i = 0; i < SDL_NumJoysticks(); i++) { for (i = 0; i < SDL_NumJoysticks(); i++) {