diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-12-15 20:08:25 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-12-15 20:08:25 +0300 |
commit | 6f563da51719ed152c477ee0098416264bfc9a51 (patch) | |
tree | 52963f68beeb1afa044ca4e54b98e195914e96a5 | |
parent | 86e889a1eee087d3808bbe6c5cfdf1d7cd4698bd (diff) | |
download | mv-6f563da51719ed152c477ee0098416264bfc9a51.tar.gz mv-6f563da51719ed152c477ee0098416264bfc9a51.tar.bz2 mv-6f563da51719ed152c477ee0098416264bfc9a51.tar.xz mv-6f563da51719ed152c477ee0098416264bfc9a51.zip |
Add support for sending screenshot to js side in nacl.
-rw-r--r-- | src/game.cpp | 7 |
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) |