From 6f563da51719ed152c477ee0098416264bfc9a51 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 15 Dec 2015 20:08:25 +0300 Subject: Add support for sending screenshot to js side in nacl. --- src/game.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') diff --git a/src/game.cpp b/src/game.cpp index a8a13e0dc..a00caadfa 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -122,6 +122,10 @@ #include "utils/sdlcheckutils.h" #include "utils/timer.h" +#ifdef __native_client__ +#include "utils/naclmessages.h" +#endif // __native_client__ + #include "listeners/errorlistener.h" #ifdef TMWA_SUPPORT @@ -557,6 +561,9 @@ bool Game::saveScreenshot(SDL_Surface *const screenshot) const std::string fileNameStr = filename.str(); const bool success = ImageWriter::writePNG(screenshot, fileNameStr); +#ifdef __native_client__ + naclPostMessage("copy-from-persistent", fileNameStr); +#endif if (success) { if (localChatTab) -- cgit v1.2.3-70-g09d2