From 3485ae2d8ca994fc5f83a6f41a70373dabd733e8 Mon Sep 17 00:00:00 2001 From: hikerstk Date: Thu, 28 Feb 2013 11:51:19 +0000 Subject: [PATCH] Fixed screen shot handling on windows. git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@12534 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- src/input/input_manager.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/input/input_manager.cpp b/src/input/input_manager.cpp index f2c3bc015..df50e9971 100644 --- a/src/input/input_manager.cpp +++ b/src/input/input_manager.cpp @@ -159,8 +159,11 @@ void InputManager::handleStaticAction(int key, int value) kart->flyDown(); break; } + case KEY_SNAPSHOT: case KEY_PRINT: - if (value != 0) + // on windows we don't get a press event, only release. So + // save on release only (to avoid saving twice on other platforms) + if (value ==0 ) irr_driver->requestScreenshot(); break;