ANDROID: Add kVirtControls to OSystem_Android

This commit is contained in:
Dries Harnie 2013-05-23 20:54:07 +02:00
parent 35bfb79da8
commit 97a698a554
4 changed files with 12 additions and 3 deletions

View File

@ -134,6 +134,7 @@ OSystem_Android::OSystem_Android(int audio_sample_rate, int audio_buffer_size) :
_show_mouse(false),
_show_overlay(false),
_virt_arrowkeys_pressed(false),
_virtcontrols_on(false),
_enable_zoning(false),
_mixer(0),
_shake_offset(0),
@ -409,6 +410,7 @@ bool OSystem_Android::hasFeature(Feature f) {
f == kFeatureAspectRatioCorrection ||
f == kFeatureCursorPalette ||
f == kFeatureVirtualKeyboard ||
f == kFeatureVirtControls ||
#ifdef USE_OPENGL
f == kFeatureOpenGL ||
#endif
@ -431,6 +433,9 @@ void OSystem_Android::setFeatureState(Feature f, bool enable) {
_virtkeybd_on = enable;
showVirtualKeyboard(enable);
break;
case kFeatureVirtControls:
_virtcontrols_on = enable;
break;
case kFeatureCursorPalette:
_use_mouse_palette = enable;
if (!enable)
@ -449,6 +454,8 @@ bool OSystem_Android::getFeatureState(Feature f) {
return _ar_correction;
case kFeatureVirtualKeyboard:
return _virtkeybd_on;
case kFeatureVirtControls:
return _virtcontrols_on;
case kFeatureCursorPalette:
return _use_mouse_palette;
default:

View File

@ -140,6 +140,7 @@ private:
bool _show_mouse;
bool _use_mouse_palette;
bool _virtcontrols_on;
int _virt_arrowkeys_pressed;
int _graphicsMode;

View File

@ -748,7 +748,7 @@ void OSystem_Android::pushEvent(int type, int arg1, int arg2, int arg3,
return;
}
if (_show_mouse) {
if (!_virtcontrols_on) {
e.type = Common::EVENT_MOUSEMOVE;
if (_touchpad_mode) {
@ -881,7 +881,7 @@ void OSystem_Android::pushEvent(int type, int arg1, int arg2, int arg3,
switch (arg2) {
case JACTION_DOWN:
case JACTION_MULTIPLE:
if (!_show_mouse) {
if (_virtcontrols_on) {
checkVirtArrowKeys(arg1, arg2, arg3, arg4, arg5, arg6);
}
return;
@ -894,7 +894,7 @@ void OSystem_Android::pushEvent(int type, int arg1, int arg2, int arg3,
if (arg1 > _fingersDown)
_fingersDown = arg1;
if (!_show_mouse) {
if (_virtcontrols_on) {
checkVirtArrowKeys(arg1, arg2, arg3, arg4, arg5, arg6);
}

View File

@ -312,6 +312,7 @@ public:
//ResidualVM specific
kFeatureOpenGL,
kFeatureVirtControls,
/**
* The presence of this feature indicates whether the displayLogFile()