[Change] Initialize the joystick before sound.
This commit is contained in:
parent
0244ff470e
commit
d11385b452
@ -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));
|
||||
|
||||
|
@ -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())
|
||||
@ -208,6 +199,15 @@ int main(int argc, char** argv) {
|
||||
}
|
||||
}
|
||||
|
||||
/* 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())
|
||||
WARN("Error initializing AI");
|
||||
|
Loading…
Reference in New Issue
Block a user