diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
index 90d079d..2d331f8 100644
a
|
b
|
void SurfaceSdlGraphicsManager::toggleFullScreen() {
|
2464 | 2464 | } |
2465 | 2465 | |
2466 | 2466 | bool SurfaceSdlGraphicsManager::notifyEvent(const Common::Event &event) { |
| 2467 | static bool allowFullscreen = true; |
| 2468 | |
2467 | 2469 | switch ((int)event.type) { |
2468 | 2470 | case Common::EVENT_KEYDOWN: |
| 2471 | warning("SDL key down"); |
2469 | 2472 | // Alt-Return and Alt-Enter toggle full screen mode |
2470 | 2473 | if (event.kbd.hasFlags(Common::KBD_ALT) && |
| 2474 | allowFullscreen && |
2471 | 2475 | (event.kbd.keycode == Common::KEYCODE_RETURN || |
2472 | 2476 | event.kbd.keycode == (Common::KeyCode)SDLK_KP_ENTER)) { |
| 2477 | warning("################ TOGGLE FULLSCREEN #################"); |
2473 | 2478 | toggleFullScreen(); |
| 2479 | allowFullscreen = false; |
2474 | 2480 | return true; |
2475 | 2481 | } |
2476 | 2482 | |
… |
… |
bool SurfaceSdlGraphicsManager::notifyEvent(const Common::Event &event) {
|
2499 | 2505 | if (handleScalerHotkeys(event.kbd.keycode)) |
2500 | 2506 | return true; |
2501 | 2507 | } |
| 2508 | break; |
2502 | 2509 | |
2503 | 2510 | case Common::EVENT_KEYUP: |
| 2511 | if ((event.kbd.keycode == Common::KEYCODE_RETURN || |
| 2512 | event.kbd.keycode == (Common::KeyCode)SDLK_KP_ENTER)) { |
| 2513 | warning("Enter key up"); |
| 2514 | allowFullscreen = true; |
| 2515 | } |
2504 | 2516 | return isScalerHotkey(event); |
2505 | 2517 | |
2506 | 2518 | default: |