Commit 84655b11 authored by nanahira's avatar nanahira

mgevent

parent d1c96c23
......@@ -2001,12 +2001,14 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) {
return true;
break;
}
#ifdef _WIN32
case CHECKBOX_ENABLE_MUSIC: {
if(!mainGame->chkEnableMusic->isChecked())
mainGame->engineMusic->stopAllSounds();
return true;
break;
}
#endif
}
break;
}
......@@ -2044,6 +2046,7 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) {
return true;
break;
}
#ifdef _WIN32
case SCROLL_VOLUME: {
mainGame->gameConf.sound_volume = (double)mainGame->scrSoundVolume->getPos() / 100;
mainGame->gameConf.music_volume = (double)mainGame->scrMusicVolume->getPos() / 100;
......@@ -2051,6 +2054,7 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) {
mainGame->engineMusic->setSoundVolume(mainGame->gameConf.music_volume);
break;
}
#endif
}
break;
}
......
......@@ -793,8 +793,10 @@ void Game::MainLoop() {
usleep(500000);
#endif
SaveConfig();
#ifdef _WIN32
if(engineMusic)
engineMusic->drop();
#endif
// device->drop();
}
void Game::BuildProjectionMatrix(irr::core::matrix4& mProjection, f32 left, f32 right, f32 bottom, f32 top, f32 znear, f32 zfar) {
......
......@@ -468,9 +468,11 @@ public:
irr::gui::IGUIButton* btnCancelOrFinish;
//soundEngine
#ifdef _WIN32
irrklang::ISoundEngine* engineSound;
irrklang::ISoundEngine* engineMusic;
irrklang::ISound* soundBGM;
#endif
};
extern Game* mainGame;
......
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