mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-05 00:36:57 +00:00
Fixed Engine::hasFeature to use proper types (i.e., MetaEngine::MetaEngineFeature instead of int)
svn-id: r34731
This commit is contained in:
parent
b178332e3e
commit
84229ee79c
@ -103,8 +103,7 @@ MainMenuDialog::MainMenuDialog(Engine *engine)
|
||||
new GUI::ButtonWidget(this, "globalmain_about", "About", kAboutCmd, 'A');
|
||||
|
||||
_rtlButton = new GUI::ButtonWidget(this, "globalmain_rtl", "Return to Launcher", kRTLCmd, 'R');
|
||||
// '0' corresponds to the kSupportsRTL MetaEngineFeature
|
||||
_rtlButton->setEnabled(_engine->hasFeature(0));
|
||||
_rtlButton->setEnabled(_engine->hasFeature(MetaEngine::kSupportsRTL));
|
||||
|
||||
|
||||
new GUI::ButtonWidget(this, "globalmain_quit", "Quit", kQuitCmd, 'Q');
|
||||
|
@ -250,13 +250,13 @@ void Engine::quitGame() {
|
||||
_eventMan->pushEvent(event);
|
||||
}
|
||||
|
||||
bool Engine::hasFeature(int f) {
|
||||
bool Engine::hasFeature(MetaEngine::MetaEngineFeature f) {
|
||||
// TODO: In each engine, keep a ref to the corresponding MetaEngine?
|
||||
const EnginePlugin *plugin = 0;
|
||||
Common::String gameid = ConfMan.get("gameid");
|
||||
gameid.toLowercase();
|
||||
EngineMan.findGame(gameid, &plugin);
|
||||
|
||||
return ( (*plugin)->hasFeature((MetaEngine::MetaEngineFeature)f) );
|
||||
assert(plugin);
|
||||
return ( (*plugin)->hasFeature(f) );
|
||||
}
|
||||
|
||||
|
@ -30,6 +30,8 @@
|
||||
#include "common/fs.h"
|
||||
#include "common/str.h"
|
||||
|
||||
#include "engines/metaengine.h"
|
||||
|
||||
class OSystem;
|
||||
|
||||
namespace Audio {
|
||||
@ -177,7 +179,7 @@ public:
|
||||
/**
|
||||
* Determine whether the engine supports the specified MetaEngine feature.
|
||||
*/
|
||||
bool hasFeature(int f);
|
||||
bool hasFeature(MetaEngine::MetaEngineFeature f);
|
||||
|
||||
public:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user