mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-25 12:05:53 +00:00
ANDROID: Add kVirtControls to OSystem_Android
This commit is contained in:
parent
35bfb79da8
commit
97a698a554
@ -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:
|
||||
|
@ -140,6 +140,7 @@ private:
|
||||
bool _show_mouse;
|
||||
bool _use_mouse_palette;
|
||||
|
||||
bool _virtcontrols_on;
|
||||
int _virt_arrowkeys_pressed;
|
||||
|
||||
int _graphicsMode;
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -312,6 +312,7 @@ public:
|
||||
|
||||
//ResidualVM specific
|
||||
kFeatureOpenGL,
|
||||
kFeatureVirtControls,
|
||||
|
||||
/**
|
||||
* The presence of this feature indicates whether the displayLogFile()
|
||||
|
Loading…
x
Reference in New Issue
Block a user