|
From: Tapio V. <aa...@us...> - 2010-10-24 18:35:22
|
Module: performous
Branch: master
Commit: e2e810e51177d4600b00e5ca6eb08d794c06ac5e
Author: Tapio Vierros <tap...@gm...>
Date: Sun Oct 24 21:34:45 2010 +0300
Screenshot spammer utility.
---
game/main.cc | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/game/main.cc b/game/main.cc
index 1ce92ff..d2f68f2 100644
--- a/game/main.cc
+++ b/game/main.cc
@@ -159,12 +159,24 @@ void mainLoop(std::string const& songlist) {
// Main loop
boost::xtime time = now();
unsigned frames = 0;
+ #if 0
+ // Screenshot spammer utility
+ boost::xtime shottimer = now();
while (!sm.isFinished()) {
+ const std::string shotmsg = "";
+ if (now() - shottimer > 2.0) {
+ g_take_screenshot = true;
+ shottimer = now();
+ }
+ #else
+ while (!sm.isFinished()) {
+ const std::string shotmsg = _("Screenshot taken!");
+ #endif
if( g_take_screenshot ) {
fs::path filename;
try {
window.screenshot();
- sm.flashMessage(_("Screenshot taken!"));
+ sm.flashMessage(shotmsg);
} catch (std::exception& e) {
std::cerr << "ERROR: " << e.what() << std::endl;
sm.flashMessage(_("Screenshot failed!"));
|