summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-12-15 20:08:25 +0300
committerAndrei Karas <akaras@inbox.ru>2015-12-15 20:08:25 +0300
commit6f563da51719ed152c477ee0098416264bfc9a51 (patch)
tree52963f68beeb1afa044ca4e54b98e195914e96a5 /src/game.cpp
parent86e889a1eee087d3808bbe6c5cfdf1d7cd4698bd (diff)
downloadManaVerse-6f563da51719ed152c477ee0098416264bfc9a51.tar.gz
ManaVerse-6f563da51719ed152c477ee0098416264bfc9a51.tar.bz2
ManaVerse-6f563da51719ed152c477ee0098416264bfc9a51.tar.xz
ManaVerse-6f563da51719ed152c477ee0098416264bfc9a51.zip
Add support for sending screenshot to js side in nacl.
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp7
1 files changed, 7 insertions, 0 deletions
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)