Commit 13d9a944 authored by mercury233's avatar mercury233

fix no sound device

parent de12984c
......@@ -640,6 +640,13 @@ bool Game::Initialize() {
}
engineSound = irrklang::createIrrKlangDevice();
engineMusic = irrklang::createIrrKlangDevice();
if(!engineSound || !engineMusic) {
chkEnableSound->setChecked(false);
chkEnableSound->setEnabled(false);
chkEnableMusic->setChecked(false);
chkEnableMusic->setEnabled(false);
chkMusicMode->setEnabled(false);
}
hideChat = false;
hideChatTimer = 0;
return true;
......@@ -743,7 +750,8 @@ void Game::MainLoop() {
usleep(500000);
#endif
SaveConfig();
engineMusic->drop();
if(engineMusic)
engineMusic->drop();
// device->drop();
}
void Game::BuildProjectionMatrix(irr::core::matrix4& mProjection, f32 left, f32 right, f32 bottom, f32 top, f32 znear, f32 zfar) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment