summaryrefslogtreecommitdiff
path: root/src/client.cpp
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2012-02-18 22:47:30 +0100
committerThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2012-02-18 23:24:03 +0100
commit20afba1adc84dd0e859605250c5a44a111045c2b (patch)
tree304f34e96403215a8e1d9a3cf880a6a28f5a4721 /src/client.cpp
parent6fd1246735010bccd0d75e9e7969431b963b7858 (diff)
downloadmana-20afba1adc84dd0e859605250c5a44a111045c2b.tar.gz
mana-20afba1adc84dd0e859605250c5a44a111045c2b.tar.bz2
mana-20afba1adc84dd0e859605250c5a44a111045c2b.tar.xz
mana-20afba1adc84dd0e859605250c5a44a111045c2b.zip
Added notification sound on receiving whisper
One of the sound channels is reserved for notification sounds, of which the volume can be configured separately. Currently, the only notification sound that is played is for receiving whispers. That can be extended later. The newmessage.ogg sound used currently is the one for receiving a message with the Psi instant messenger. Parts of this patch are based on the new message notification in ManaPlus. Reviewed-by: Erik Schilling
Diffstat (limited to 'src/client.cpp')
-rw-r--r--src/client.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client.cpp b/src/client.cpp
index 5a9cc726..28affce6 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -380,6 +380,7 @@ Client::Client(const Options &options):
sound.init();
sound.setSfxVolume(config.getIntValue("sfxVolume"));
+ sound.setNotificationsVolume(config.getIntValue("notificationsVolume"));
sound.setMusicVolume(config.getIntValue("musicVolume"));
}
catch (const char *err)
@@ -541,7 +542,7 @@ int Client::exec()
lastTickTime = tick_time;
// Update the screen when application is active, delay otherwise.
- if (SDL_GetAppState() & SDL_APPACTIVE)
+ if (isActive())
{
frame_count++;
gui->draw();