summaryrefslogtreecommitdiff
path: root/src/actions
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-08-26 23:48:31 +0300
committerAndrei Karas <akaras@inbox.ru>2014-08-26 23:48:31 +0300
commit1b496351f779d4a897cd882a9928a18bab5ba622 (patch)
tree0076bfd5ffb3d3f623e5898dcf929181b313e743 /src/actions
parent84edefedf8e3688f618f0dde8169d6ee18624e6e (diff)
downloadplus-1b496351f779d4a897cd882a9928a18bab5ba622.tar.gz
plus-1b496351f779d4a897cd882a9928a18bab5ba622.tar.bz2
plus-1b496351f779d4a897cd882a9928a18bab5ba622.tar.xz
plus-1b496351f779d4a897cd882a9928a18bab5ba622.zip
Move chat command /dumpg into actions.
Diffstat (limited to 'src/actions')
-rw-r--r--src/actions/actions.cpp41
-rw-r--r--src/actions/actions.h1
2 files changed, 42 insertions, 0 deletions
diff --git a/src/actions/actions.cpp b/src/actions/actions.cpp
index d803de671..397b0225d 100644
--- a/src/actions/actions.cpp
+++ b/src/actions/actions.cpp
@@ -891,4 +891,45 @@ impHandler0(error)
exit(1);
}
+impHandler(dumpGraphics)
+{
+ std::string str = strprintf("%s,%s,%dX%dX%d,", PACKAGE_OS, SMALL_VERSION,
+ mainGraphics->getWidth(), mainGraphics->getHeight(),
+ mainGraphics->getBpp());
+
+ if (mainGraphics->getFullScreen())
+ str.append("F");
+ else
+ str.append("W");
+ if (mainGraphics->getHWAccel())
+ str.append("H");
+ else
+ str.append("S");
+
+ if (mainGraphics->getDoubleBuffer())
+ str.append("D");
+ else
+ str.append("_");
+
+#if defined USE_OPENGL
+ str.append(strprintf(",%d", mainGraphics->getOpenGL()));
+#else
+ str.append(",0");
+#endif
+
+ str.append(strprintf(",%f,", static_cast<double>(settings.guiAlpha)))
+ .append(config.getBoolValue("adjustPerfomance") ? "1" : "0")
+ .append(config.getBoolValue("alphaCache") ? "1" : "0")
+ .append(config.getBoolValue("enableMapReduce") ? "1" : "0")
+ .append(config.getBoolValue("beingopacity") ? "1" : "0")
+ .append(",")
+ .append(config.getBoolValue("enableAlphaFix") ? "1" : "0")
+ .append(config.getBoolValue("disableAdvBeingCaching") ? "1" : "0")
+ .append(config.getBoolValue("disableBeingCaching") ? "1" : "0")
+ .append(config.getBoolValue("particleeffects") ? "1" : "0")
+ .append(strprintf(",%d-%d", fps, config.getIntValue("fpslimit")));
+ outStringNormal(event.tab, str, str);
+ return true;
+}
+
} // namespace Actions
diff --git a/src/actions/actions.h b/src/actions/actions.h
index b773f9992..d1225a424 100644
--- a/src/actions/actions.h
+++ b/src/actions/actions.h
@@ -72,6 +72,7 @@ namespace Actions
decHandler(serverIgnoreAll);
decHandler(serverUnIgnoreAll);
decHandler(error) __attribute__ ((noreturn));
+ decHandler(dumpGraphics);
} // namespace Actions
#undef decHandler