WINTERMUTE: Use ConfMan instead of registry.

This commit is contained in:
Einar Johan Trøan Sømåen 2012-07-29 15:03:54 +02:00
parent da0ba41903
commit 1f5288d8c1
2 changed files with 4 additions and 3 deletions

View File

@ -38,6 +38,7 @@
#include "common/system.h"
#include "engines/wintermute/graphics/transparent_surface.h"
#include "common/queue.h"
#include "common/config-manager.h"
namespace WinterMute {
@ -153,7 +154,7 @@ bool BaseRenderOSystem::initRenderer(int width, int height, bool windowed) {
_ratioX = (float)(_realWidth - _borderLeft - _borderRight) / (float)_width;
_ratioY = (float)(_realHeight - _borderTop - _borderBottom) / (float)_height;
//_windowed = BaseEngine::instance().getRegistry()->readBool("Video", "Windowed", true); TODO
_windowed = !ConfMan.getBool("fullscreen");
Graphics::PixelFormat format(4, 8, 8, 8, 8, 24, 16, 8, 0);
g_system->beginGFXTransaction();

View File

@ -72,7 +72,7 @@ bool BaseSoundMgr::cleanup() {
//////////////////////////////////////////////////////////////////////////
void BaseSoundMgr::saveSettings() {
if (_soundAvailable) {
BaseEngine::instance().getRegistry()->writeInt("Audio", "MasterVolume", _volumeMaster);
ConfMan.setInt("master_volume", _volumeMaster);
}
}
@ -83,7 +83,7 @@ bool BaseSoundMgr::initialize() {
if (!g_system->getMixer()->isReady()) {
return STATUS_FAILED;
}
_volumeMaster = BaseEngine::instance().getRegistry()->readInt("Audio", "MasterVolume", 255);
_volumeMaster = (ConfMan.hasKey("master_volume") ? ConfMan.getInt("master_volume") : 255);
_soundAvailable = true;
return STATUS_OK;