equal
deleted
inserted
replaced
52 |
52 |
53 m_audioInitialized = false; |
53 m_audioInitialized = false; |
54 m_music = NULL; |
54 m_music = NULL; |
55 m_musicTrack = ""; |
55 m_musicTrack = ""; |
56 m_isPlayingMusic = false; |
56 m_isPlayingMusic = false; |
|
57 lastchannel = 0; |
57 if(SDL_NumJoysticks()) |
58 if(SDL_NumJoysticks()) |
58 addGameControllerKeys(); |
59 addGameControllerKeys(); |
59 SDL_QuitSubSystem(SDL_INIT_JOYSTICK); |
60 SDL_QuitSubSystem(SDL_INIT_JOYSTICK); |
60 |
61 |
61 m_soundMap = new QMap<QString,Mix_Chunk*>(); |
62 m_soundMap = new QMap<QString,Mix_Chunk*>(); |
172 sprintf(sdlkeys[i++][1], "%s", (prefix + ((isxb && bid < 10) ? (HWApplication::translate("binds (keys)", xb360buttons[bid]) + QString(" ")) : HWApplication::translate("binds (keys)", "Button") + QString(" %1").arg(bid + 1))).toUtf8().constData()); |
173 sprintf(sdlkeys[i++][1], "%s", (prefix + ((isxb && bid < 10) ? (HWApplication::translate("binds (keys)", xb360buttons[bid]) + QString(" ")) : HWApplication::translate("binds (keys)", "Button") + QString(" %1").arg(bid + 1))).toUtf8().constData()); |
173 } |
174 } |
174 // Close the game controller as we no longer need it |
175 // Close the game controller as we no longer need it |
175 SDL_JoystickClose(joy); |
176 SDL_JoystickClose(joy); |
176 } |
177 } |
|
178 |
|
179 if(i >= 1024) |
|
180 i = 1023; |
177 |
181 |
178 // Terminate the list |
182 // Terminate the list |
179 sdlkeys[i][0][0] = '\0'; |
183 sdlkeys[i][0][0] = '\0'; |
180 sdlkeys[i][1][0] = '\0'; |
184 sdlkeys[i][1][0] = '\0'; |
181 } |
185 } |