mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-22 12:12:16 +00:00
Adding the new kFeatureDisableKeyFiltering OSystem feature.
This feature is used by agi's prediction dialog and is a hint to the backend to temporarily switch off any keyboard mapping, used in devices with limited keyboard input. Also, supply some comments to the newly added event & feature. svn-id: r27069
This commit is contained in:
parent
cd6f145577
commit
5df28554ac
@ -57,6 +57,12 @@ enum EventType {
|
||||
|
||||
EVENT_QUIT = 10,
|
||||
EVENT_SCREEN_CHANGED = 11,
|
||||
/** The backend requests the agi engine's predictive dialog to be shown.
|
||||
* TODO: Fingolfin suggests that it would be of better value to expand
|
||||
* on this notion by generalizing its use. For example the backend could
|
||||
* use events to ask for the save game dialog or to pause the engine.
|
||||
* An associated enumerated type can accomplish this.
|
||||
**/
|
||||
EVENT_PREDICTIVE_DIALOG = 12
|
||||
};
|
||||
|
||||
|
@ -125,7 +125,7 @@ public:
|
||||
kFeatureAutoComputeDirtyRects,
|
||||
|
||||
/**
|
||||
* This flags determines either cursor can have its own palette or not
|
||||
* This flag determines either cursor can have its own palette or not
|
||||
* It is currently used only by some Macintosh versions of Humongous
|
||||
* Entertainment games. If backend doesn't implement this feature then
|
||||
* engine switches to b/w version of cursors.
|
||||
@ -142,7 +142,22 @@ public:
|
||||
/**
|
||||
* Set to true to iconify the window.
|
||||
*/
|
||||
kFeatureIconifyWindow
|
||||
kFeatureIconifyWindow,
|
||||
|
||||
/**
|
||||
* This feature, set to true, is a hint toward the backend to disable all
|
||||
* key filtering/mapping, in cases where it would be beneficial to do so.
|
||||
* As an example case, this is used in the agi engine's predictive dialog.
|
||||
* When the dialog is displayed this feature is set so that backends with
|
||||
* phone-like keypad temporarily unmap all user actions which leads to
|
||||
* comfortable word entry. Conversely, when the dialog exits the feature
|
||||
* is set to false.
|
||||
* TODO: Fingolfin suggests that the way the feature is used can be
|
||||
* generalized in this sense: Have a keyboard mapping feature, which the
|
||||
* engine queries for to assign keys to actions ("Here's my default key
|
||||
* map for these actions, what do you want them set to?").
|
||||
*/
|
||||
kFeatureDisableKeyFiltering
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -120,6 +120,7 @@ bool AgiEngine::predictiveDialog(void) {
|
||||
AgiBlock tmpwindow;
|
||||
|
||||
_predictiveDialogRunning = true;
|
||||
_system->setFeatureState(OSystem::kFeatureDisableKeyFiltering, true);
|
||||
|
||||
// FIXME: Move this to a more appropriate place.
|
||||
initAsciiToNumTable();
|
||||
@ -405,6 +406,7 @@ processkey:
|
||||
_gfx->doUpdate();
|
||||
}
|
||||
|
||||
_system->setFeatureState(OSystem::kFeatureDisableKeyFiltering, false);
|
||||
_predictiveDialogRunning = false;
|
||||
|
||||
return rc;
|
||||
|
Loading…
x
Reference in New Issue
Block a user