| | 3519 | QStringList actions; |
| | 3520 | bool handled = GetMythMainWindow()-> |
| | 3521 | TranslateKeyPress("TV Playback", e, actions, false); |
| | 3522 | if (handled) |
| | 3523 | VERBOSE(VB_IMPORTANT, |
| | 3524 | "ProcessKeypress(): " |
| | 3525 | "TranslateKeyPress() unexpectedly returned true"); |
| | 3526 | bool isJumpingToMain = has_action("ESCAPE", actions) && |
| | 3527 | GetMythMainWindow()->IsExitingToMain(); |
| | 3528 | unsigned iterations = 0; |
| | 3529 | // Set a limit on the number of iterations in case pressing escape |
| | 3530 | // repeatedly somehow gets into a loop. |
| | 3531 | const unsigned kMaxIterations = 10; |
| | 3532 | do { |
| | 3533 | ProcessKeypressInternal(actx, e); |
| | 3534 | ++iterations; |
| | 3535 | } while (isJumpingToMain && |
| | 3536 | exitPlayerTimerId == 0 && |
| | 3537 | iterations <= kMaxIterations); |
| | 3538 | } |
| | 3539 | |
| | 3540 | void TV::ProcessKeypressInternal(PlayerContext *actx, QKeyEvent *e) |
| | 3541 | { |