[Scummvm-cvs-logs] scummvm master -> 472f722556e33381af1d44cde93aa2e75ce2e169

somaen einarjohants at gmail.com
Tue Jan 22 16:45:11 CET 2013


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
472f722556 WINTERMUTE: Store MasterVolume in % instead of 0-255 to ConfMan.


Commit: 472f722556e33381af1d44cde93aa2e75ce2e169
    https://github.com/scummvm/scummvm/commit/472f722556e33381af1d44cde93aa2e75ce2e169
Author: Einar Johan Trøan Sømåen (einarjohants at gmail.com)
Date: 2013-01-22T07:43:31-08:00

Commit Message:
WINTERMUTE: Store MasterVolume in % instead of 0-255 to ConfMan.

Changed paths:
    engines/wintermute/base/sound/base_sound_manager.cpp



diff --git a/engines/wintermute/base/sound/base_sound_manager.cpp b/engines/wintermute/base/sound/base_sound_manager.cpp
index 432e0a6..7e4a70a 100644
--- a/engines/wintermute/base/sound/base_sound_manager.cpp
+++ b/engines/wintermute/base/sound/base_sound_manager.cpp
@@ -73,7 +73,7 @@ bool BaseSoundMgr::cleanup() {
 //////////////////////////////////////////////////////////////////////////
 void BaseSoundMgr::saveSettings() {
 	if (_soundAvailable) {
-		ConfMan.setInt("master_volume", _volumeMaster);
+		ConfMan.setInt("master_volume_percent", _volumeMasterPercent);
 	}
 }
 
@@ -84,7 +84,8 @@ bool BaseSoundMgr::initialize() {
 	if (!g_system->getMixer()->isReady()) {
 		return STATUS_FAILED;
 	}
-	_volumeMaster = (ConfMan.hasKey("master_volume") ? ConfMan.getInt("master_volume") : 255);
+	byte volumeMasterPercent = (ConfMan.hasKey("master_volume_percent") ? ConfMan.getInt("master_volume_percent") : 100);
+	setMasterVolumePercent(volumeMasterPercent);
 	_soundAvailable = true;
 
 	return STATUS_OK;






More information about the Scummvm-git-logs mailing list