Commit c5390a91 authored by mercury233's avatar mercury233

Merge branch 'sound' into test

parents 85b8431d 13d9a944
...@@ -658,6 +658,13 @@ bool Game::Initialize() { ...@@ -658,6 +658,13 @@ bool Game::Initialize() {
} }
engineSound = irrklang::createIrrKlangDevice(); engineSound = irrklang::createIrrKlangDevice();
engineMusic = 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; hideChat = false;
hideChatTimer = 0; hideChatTimer = 0;
return true; return true;
...@@ -761,7 +768,8 @@ void Game::MainLoop() { ...@@ -761,7 +768,8 @@ void Game::MainLoop() {
usleep(500000); usleep(500000);
#endif #endif
SaveConfig(); SaveConfig();
engineMusic->drop(); if(engineMusic)
engineMusic->drop();
// device->drop(); // device->drop();
} }
void Game::BuildProjectionMatrix(irr::core::matrix4& mProjection, f32 left, f32 right, f32 bottom, f32 top, f32 znear, f32 zfar) { 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