diff options
Diffstat (limited to 'source/gameengine/Ketsji/KX_GameActuator.cpp')
-rw-r--r-- | source/gameengine/Ketsji/KX_GameActuator.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source/gameengine/Ketsji/KX_GameActuator.cpp b/source/gameengine/Ketsji/KX_GameActuator.cpp index a23af680104..f1bd253f8b3 100644 --- a/source/gameengine/Ketsji/KX_GameActuator.cpp +++ b/source/gameengine/Ketsji/KX_GameActuator.cpp @@ -41,6 +41,7 @@ #include "KX_Scene.h" #include "KX_KetsjiEngine.h" #include "KX_PythonInit.h" /* for config load/saving */ +#include "RAS_ICanvas.h" #include <stdio.h> #include <stdlib.h> @@ -204,6 +205,17 @@ bool KX_GameActuator::Update() break; #endif // WITH_PYTHON } + case KX_GAME_SCREENSHOT: + { + RAS_ICanvas *canvas = m_ketsjiengine->GetCanvas(); + if (canvas) { + canvas->MakeScreenShot(m_filename); + } + else { + printf("KX_GAME_SCREENSHOT error: Rasterizer not available"); + } + break; + } default: ; /* do nothing? this is an internal error !!! */ } |