mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-27 21:54:15 +00:00
CRAB: Add Debug Output for Keymaps
Now keymap being used can known by typing "what keymap" in the debugger console.
This commit is contained in:
parent
e2618f71cb
commit
0a7ba01e8e
@ -21,11 +21,15 @@
|
||||
|
||||
#include "crab/crab.h"
|
||||
#include "crab/console.h"
|
||||
#include "crab/input/input.h"
|
||||
|
||||
namespace Crab {
|
||||
|
||||
using namespace pyrodactyl::input;
|
||||
|
||||
Console::Console() : GUI::Debugger() {
|
||||
registerCmd("draw", WRAP_METHOD(Console, cmdDraw));
|
||||
registerCmd("what", WRAP_METHOD(Console, cmdWhat));
|
||||
}
|
||||
|
||||
Console::~Console() {
|
||||
@ -53,4 +57,32 @@ bool Console::cmdDraw(int argc, const char **argv) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Console::cmdWhat(int argc, const char **argv) {
|
||||
if (argc > 1) {
|
||||
for (int i = 1; i < argc; i++) {
|
||||
if (!scumm_stricmp(argv[i], "keymap")) {
|
||||
switch (g_engine->_inputManager->getKeyBindingMode()) {
|
||||
case KBM_NONE:
|
||||
debugPrintf("KBM_NONE\n");
|
||||
break;
|
||||
|
||||
case KBM_GAME:
|
||||
debugPrintf("KBM_GAME\n");
|
||||
break;
|
||||
|
||||
case KBM_UI:
|
||||
debugPrintf("KBM_UI\n");
|
||||
break;
|
||||
|
||||
default:
|
||||
debugPrintf("Unknown KBM\n");
|
||||
break;
|
||||
}
|
||||
} else
|
||||
debugPrintf("Valid parameters are 'keymap'\n");
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
} // End of namespace Crab
|
||||
|
@ -29,6 +29,7 @@ namespace Crab {
|
||||
class Console : public GUI::Debugger {
|
||||
private:
|
||||
bool cmdDraw(int argc, const char **argv);
|
||||
bool cmdWhat(int argc, const char **argv);
|
||||
|
||||
public:
|
||||
Console();
|
||||
|
Loading…
x
Reference in New Issue
Block a user