BACKENDS: Add double-click time feature to support OS-configurable double-click intervals, implement it for Windows.
This commit is contained in:
parent
95a06f3091
commit
74ddbe5eaa
5 changed files with 67 additions and 2 deletions
|
@ -89,7 +89,10 @@ OSystem_SDL::OSystem_SDL()
|
|||
_logger(nullptr),
|
||||
_eventSource(nullptr),
|
||||
_eventSourceWrapper(nullptr),
|
||||
_window(nullptr) {
|
||||
_window(nullptr),
|
||||
_haveDoubleClickTime(false),
|
||||
_doubleClickTime(0)
|
||||
{
|
||||
}
|
||||
|
||||
OSystem_SDL::~OSystem_SDL() {
|
||||
|
@ -188,6 +191,15 @@ bool OSystem_SDL::hasFeature(Feature f) {
|
|||
if (f == kFeatureOpenGLForGame) return true;
|
||||
if (f == kFeatureShadersForGame) return _supportsShaders;
|
||||
#endif
|
||||
|
||||
if (f == kFeatureDoubleClickTime) {
|
||||
bool haveDoubleClickTime = _haveDoubleClickTime;
|
||||
#ifdef ENABLE_EVENTRECORDER
|
||||
g_eventRec.processHaveDoubleClickTime(haveDoubleClickTime);
|
||||
#endif
|
||||
return haveDoubleClickTime;
|
||||
}
|
||||
|
||||
return ModularGraphicsBackend::hasFeature(f);
|
||||
}
|
||||
|
||||
|
@ -762,6 +774,14 @@ Common::SaveFileManager *OSystem_SDL::getSavefileManager() {
|
|||
#endif
|
||||
}
|
||||
|
||||
uint32 OSystem_SDL::getDoubleClickTime() const {
|
||||
uint32 doubleClickTime = _doubleClickTime;
|
||||
#ifdef ENABLE_EVENTRECORDER
|
||||
g_eventRec.processDoubleClickTime(doubleClickTime);
|
||||
#endif
|
||||
return _doubleClickTime;
|
||||
}
|
||||
|
||||
//Not specified in base class
|
||||
Common::String OSystem_SDL::getDefaultIconsPath() {
|
||||
Common::String path = ConfMan.get("iconspath");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue