Quit game with 'Action key' on WinCE Smartphones

svn-id: r17246
This commit is contained in:
Nicolas Bacca 2005-03-26 14:09:21 +00:00
parent 06ed39e031
commit 8c37cd52a6

View File

@ -28,6 +28,10 @@
#include "common/system.h"
#ifdef _WIN32_WCE
extern bool isSmartphone(void);
#endif
namespace Simon {
int SimonEngine::runScript() {
@ -1297,6 +1301,16 @@ void SimonEngine::o_inventory_descriptions() {
void SimonEngine::o_quit_if_user_presses_y() {
for (;;) {
delay(1);
#ifdef _WIN32_WCE
if (isSmartphone()) {
if (_key_pressed) {
if (_key_pressed == 13)
shutdown();
else
break;
}
}
#endif
if (_key_pressed == 'f' && _language == 20) // Hebrew
shutdown();
if (_key_pressed == 's' && _language == 5) // Spanish