summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-08-27 02:33:48 +0300
committerAndrei Karas <akaras@inbox.ru>2014-08-27 02:33:48 +0300
commiteade4818db87cc41e4c014688e5ee0d15ede6912 (patch)
tree422a84ea0dc5444fad986a75b6c783f83a111aec
parent1b27066e2d98c82b0bf135188ebb57e16af669df (diff)
downloadmanaplus-eade4818db87cc41e4c014688e5ee0d15ede6912.tar.gz
manaplus-eade4818db87cc41e4c014688e5ee0d15ede6912.tar.bz2
manaplus-eade4818db87cc41e4c014688e5ee0d15ede6912.tar.xz
manaplus-eade4818db87cc41e4c014688e5ee0d15ede6912.zip
Move chat command /dumpogl into actions.
-rw-r--r--src/actions/actions.cpp11
-rw-r--r--src/actions/actions.h1
-rw-r--r--src/commands.cpp8
-rw-r--r--src/commands.h5
-rw-r--r--src/input/inputaction.h1
-rw-r--r--src/input/inputactionmap.h9
-rw-r--r--src/input/pages/other.cpp6
7 files changed, 29 insertions, 12 deletions
diff --git a/src/actions/actions.cpp b/src/actions/actions.cpp
index 343caedf7..6d62f9770 100644
--- a/src/actions/actions.cpp
+++ b/src/actions/actions.cpp
@@ -73,6 +73,9 @@
#include "gui/widgets/tabs/chattabtype.h"
#include "render/graphics.h"
+#if defined USE_OPENGL
+#include "render/normalopenglgraphics.h"
+#endif
#include "net/beinghandler.h"
#include "net/chathandler.h"
@@ -960,4 +963,12 @@ impHandler(dumpTests)
return true;
}
+impHandler0(dumpOGL)
+{
+#if defined USE_OPENGL && !defined ANDROID
+ NormalOpenGLGraphics::dumpSettings();
+#endif
+ return true;
+}
+
} // namespace Actions
diff --git a/src/actions/actions.h b/src/actions/actions.h
index 175e2d530..4f8affb95 100644
--- a/src/actions/actions.h
+++ b/src/actions/actions.h
@@ -75,6 +75,7 @@ namespace Actions
decHandler(dumpGraphics);
decHandler(dumpEnvironment);
decHandler(dumpTests);
+ decHandler(dumpOGL);
} // namespace Actions
#undef decHandler
diff --git a/src/commands.cpp b/src/commands.cpp
index f1eda21ea..3dd1477df 100644
--- a/src/commands.cpp
+++ b/src/commands.cpp
@@ -434,14 +434,6 @@ impHandler0(dumpGL)
}
#endif
-impHandler0(dumpOGL)
-{
-#if defined USE_OPENGL && !defined ANDROID
- NormalOpenGLGraphics::dumpSettings();
-#endif
- return true;
-}
-
impHandler0(debugSpawn)
{
int cnt = atoi(event.args.c_str());
diff --git a/src/commands.h b/src/commands.h
index 7c74de94f..0a499bc5e 100644
--- a/src/commands.h
+++ b/src/commands.h
@@ -54,7 +54,6 @@ namespace Commands
decHandler(hack);
decHandler(url);
decHandler(open);
- decHandler(dumpOGL);
decHandler(dumpGL);
decHandler(dumpMods);
decHandler(execute);
@@ -80,8 +79,7 @@ namespace Commands
enum
{
- COMMAND_DUMPOGL = 0,
- COMMAND_DUMPGL,
+ COMMAND_DUMPGL = 0,
COMMAND_DUMPMODS,
COMMAND_URL,
COMMAND_OPEN,
@@ -108,7 +106,6 @@ enum
static const CommandInfo commands[] =
{
- {"dumpogl", &Commands::dumpOGL, -1, false},
{"dumpgl", &Commands::dumpGL, -1, false},
{"dumpmods", &Commands::dumpMods, -1, false},
{"url", &Commands::url, -1, true},
diff --git a/src/input/inputaction.h b/src/input/inputaction.h
index bc819bf1e..d372699ef 100644
--- a/src/input/inputaction.h
+++ b/src/input/inputaction.h
@@ -401,6 +401,7 @@ namespace InputAction
DUMP_GRAPHICS,
DUMP_ENVIRONMENT,
DUMP_TESTS,
+ DUMP_OGL,
TOTAL
};
} // namespace InputAction
diff --git a/src/input/inputactionmap.h b/src/input/inputactionmap.h
index b363a7ce1..0eb445c53 100644
--- a/src/input/inputactionmap.h
+++ b/src/input/inputactionmap.h
@@ -3378,6 +3378,15 @@ static const InputActionData inputActionData[InputAction::TOTAL] = {
InputAction::NO_VALUE, 50,
InputCondition::INGAME,
"dumpt",
+ false},
+ {"keyDumpOGL",
+ InputType::UNKNOWN, InputAction::NO_VALUE,
+ InputType::UNKNOWN, InputAction::NO_VALUE,
+ Input::GRP_DEFAULT,
+ &Actions::dumpOGL,
+ InputAction::NO_VALUE, 50,
+ InputCondition::INGAME,
+ "dumpogl",
false}
};
diff --git a/src/input/pages/other.cpp b/src/input/pages/other.cpp
index e91bd40b4..338f947c4 100644
--- a/src/input/pages/other.cpp
+++ b/src/input/pages/other.cpp
@@ -310,6 +310,12 @@ SetupActionData setupActionDataOther[] =
"",
},
{
+ // TRANSLATORS: input action name
+ N_("Dump OpenGL state into log"),
+ InputAction::DUMP_OGL,
+ "",
+ },
+ {
"",
InputAction::NO_VALUE,
""