Skip to content

Commit

Permalink
IOS: Adds a getter for the touchpad mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Vincent Bénony committed Jan 6, 2016
1 parent e82a46c commit 452968e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
9 changes: 9 additions & 0 deletions backends/platform/iphone/osys_main.cpp
Expand Up @@ -83,6 +83,10 @@ OSystem_IPHONE::~OSystem_IPHONE() {
_mouseBuffer.free();
}

bool OSystem_IPHONE::touchpadModeEnabled() const {
return _touchpadModeEnabled;
}

int OSystem_IPHONE::timerHandler(int t) {
DefaultTimerManager *tm = (DefaultTimerManager *)g_system->getTimerManager();
tm->handler();
Expand Down Expand Up @@ -288,6 +292,11 @@ void OSystem_IPHONE::logMessage(LogMessageType::Type type, const char *message)
fflush(output);
}

bool iphone_touchpadModeEnabled() {
OSystem_IPHONE *sys = (OSystem_IPHONE *) g_system;
return sys && sys->touchpadModeEnabled();
}

void iphone_main(int argc, char *argv[]) {

//OSystem_IPHONE::migrateApp();
Expand Down
2 changes: 2 additions & 0 deletions backends/platform/iphone/osys_main.h
Expand Up @@ -131,6 +131,8 @@ class OSystem_IPHONE : public EventsBaseBackend, public PaletteManager {
virtual int16 getHeight();
virtual int16 getWidth();

bool touchpadModeEnabled() const;

#ifdef USE_RGB_COLOR
virtual Graphics::PixelFormat getScreenFormat() const { return _framebuffer.format; }
virtual Common::List<Graphics::PixelFormat> getSupportedFormats() const;
Expand Down

0 comments on commit 452968e

Please sign in to comment.