Fix running ScummVM in plugin-mode

svn-id: r16360
This commit is contained in:
Max Horn 2004-12-28 20:29:42 +00:00
parent 49393c0f41
commit b15d92e470
5 changed files with 14 additions and 2 deletions

View file

@ -196,6 +196,8 @@ void DynamicPlugin::unloadPlugin() {
#pragma mark -
DECLARE_SINGLETON(PluginManager);
PluginManager::PluginManager() {
}

View file

@ -24,6 +24,8 @@
#include "common/config-manager.h"
DECLARE_SINGLETON(Common::ConfigManager);
#if defined(UNIX)
#ifdef MACOSX
#define DEFAULT_CONFIG_FILE "Library/Preferences/ScummVM Preferences"

View file

@ -55,8 +55,12 @@ protected:
~Singleton<T>() { }
};
template <class T>
T* Singleton<T>::_singleton=0;
//TODO: The following poses a problem when building ScummVM with plugins...
//template <class T>
//T* Singleton<T>::_singleton=0;
#define DECLARE_SINGLETON(T) T* Common::Singleton<T>::_singleton=0
} // End of namespace Common

View file

@ -28,6 +28,8 @@
//#define NEW_FONT_CODE
DECLARE_SINGLETON(GUI::NewGui);
namespace GUI {

View file

@ -57,6 +57,8 @@ static const TrackFormat TRACK_FORMATS[] = {
};
DECLARE_SINGLETON(AudioCDManager);
AudioCDManager::AudioCDManager() {
memset(&_cd, 0, sizeof(_cd));
memset(_cached_tracks, 0, sizeof(_cached_tracks));