From 86df1e876ade4720d5c8ab53f8b54ca26ab7a26d Mon Sep 17 00:00:00 2001 From: Marcus Comstedt Date: Sat, 13 Mar 2004 14:00:44 +0000 Subject: Features. svn-id: r13246 --- backends/dc/dc.h | 9 +++++++++ backends/dc/dcmain.cpp | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) (limited to 'backends/dc') diff --git a/backends/dc/dc.h b/backends/dc/dc.h index 1425c5759b..8eafdc1a76 100644 --- a/backends/dc/dc.h +++ b/backends/dc/dc.h @@ -31,6 +31,15 @@ class OSystem_Dreamcast : public OSystem { OSystem_Dreamcast(); + // Determine whether the backend supports the specified feature. + bool hasFeature(Feature f); + + // En-/disable the specified feature. + void setFeatureState(Feature f, bool enable); + + // Query the state of the specified feature. For example, test whether + bool getFeatureState(Feature f); + // Retrieve a list of all graphics modes supported by this backend. const GraphicsMode *getSupportedGraphicsModes() const; diff --git a/backends/dc/dcmain.cpp b/backends/dc/dcmain.cpp index 82ab1b666b..26a964dcf4 100644 --- a/backends/dc/dcmain.cpp +++ b/backends/dc/dcmain.cpp @@ -143,6 +143,47 @@ void OSystem_Dreamcast::deleteMutex(MutexRef mutex) } +/* Features */ +bool OSystem_Dreamcast::hasFeature(Feature f) +{ + switch(f) { + case kFeatureAspectRatioCorrection: + case kFeatureVirtualKeyboard: + return true; + default: + return false; + } +} + +void OSystem_Dreamcast::setFeatureState(Feature f, bool enable) +{ + switch(f) { + case kFeatureAspectRatioCorrection: + /* FIXME */ + break; + case kFeatureVirtualKeyboard: + /* FIXME */ + break; + default: + break; + } +} + +bool OSystem_Dreamcast::getFeatureState(Feature f) +{ + switch(f) { + case kFeatureAspectRatioCorrection: + /* FIXME */ + return false; + case kFeatureVirtualKeyboard: + /* FIXME */ + return false; + default: + return false; + } +} + + void dc_init_hardware() { #ifndef NOSERIAL -- cgit v1.2.3