[Change] Initialize the joystick before sound.

This commit is contained in:
Allanis 2014-04-09 21:07:15 +01:00
parent 0244ff470e
commit d11385b452
2 changed files with 10 additions and 10 deletions

View File

@ -55,7 +55,7 @@ int joystick_use(int indjoystick) {
return -1;
}
LOG("Using joystick %d - %s", indjoystick, SDL_JoystickName(indjoystick));
DEBUG("\t\tWith %d axes, %d buttons, %d balls, and %d hats",
DEBUG("\t\tWith %d axes, %d buttons, %d balls, and %d hats\n",
SDL_JoystickNumAxes(joystick), SDL_JoystickNumButtons(joystick),
SDL_JoystickNumBalls(joystick), SDL_JoystickNumHats(joystick));

View File

@ -179,15 +179,6 @@ int main(int argc, char** argv) {
loadscreen_render(0., "Initializing subsystems...");
time = SDL_GetTicks();
/* OpenAL sound. */
if(nosound) {
LOG("Sound is disabled!");
sound_disabled = 1;
music_disabled = 1;
}
if(sound_init()) WARN("Problem setting up sound!");
music_choose("load");
/* Input. */
if((indjoystick >= 0) || (namjoystick != NULL)) {
if(joystick_init())
@ -207,6 +198,15 @@ int main(int argc, char** argv) {
input_setDefault();
}
}
/* OpenAL sound. */
if(nosound) {
LOG("Sound is disabled!");
sound_disabled = 1;
music_disabled = 1;
}
if(sound_init()) WARN("Problem setting up sound!");
music_choose("load");
/* Misc. */
if(ai_init())