[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;
|
return -1;
|
||||||
}
|
}
|
||||||
LOG("Using joystick %d - %s", indjoystick, SDL_JoystickName(indjoystick));
|
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_JoystickNumAxes(joystick), SDL_JoystickNumButtons(joystick),
|
||||||
SDL_JoystickNumBalls(joystick), SDL_JoystickNumHats(joystick));
|
SDL_JoystickNumBalls(joystick), SDL_JoystickNumHats(joystick));
|
||||||
|
|
||||||
|
@ -179,15 +179,6 @@ int main(int argc, char** argv) {
|
|||||||
loadscreen_render(0., "Initializing subsystems...");
|
loadscreen_render(0., "Initializing subsystems...");
|
||||||
time = SDL_GetTicks();
|
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. */
|
/* Input. */
|
||||||
if((indjoystick >= 0) || (namjoystick != NULL)) {
|
if((indjoystick >= 0) || (namjoystick != NULL)) {
|
||||||
if(joystick_init())
|
if(joystick_init())
|
||||||
@ -207,6 +198,15 @@ int main(int argc, char** argv) {
|
|||||||
input_setDefault();
|
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. */
|
/* Misc. */
|
||||||
if(ai_init())
|
if(ai_init())
|
||||||
|
Loading…
Reference in New Issue
Block a user