mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-22 17:18:39 +00:00
SDL: Use scancodes for keybindings (#14964)
Co-authored-by: Lars Müller <34514239+appgurueu@users.noreply.github.com> Co-authored-by: sfan5 <sfan5@live.de> Co-authored-by: SmallJoker <SmallJoker@users.noreply.github.com>
This commit is contained in:
parent
e0378737b7
commit
cc65c8bd70
13 changed files with 509 additions and 369 deletions
|
@ -15,20 +15,26 @@ public:
|
|||
|
||||
void runTests(IGameDef *gamedef);
|
||||
|
||||
/* TODO: Re-introduce unittests after fully switching to SDL.
|
||||
void testCreateFromString();
|
||||
void testCreateFromSKeyInput();
|
||||
void testCompare();
|
||||
*/
|
||||
};
|
||||
|
||||
static TestKeycode g_test_instance;
|
||||
|
||||
void TestKeycode::runTests(IGameDef *gamedef)
|
||||
{
|
||||
/*
|
||||
TEST(testCreateFromString);
|
||||
TEST(testCreateFromSKeyInput);
|
||||
TEST(testCompare);
|
||||
*/
|
||||
}
|
||||
|
||||
#if 0
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#define UASSERTEQ_STR(one, two) UASSERT(strcmp(one, two) == 0)
|
||||
|
@ -112,3 +118,5 @@ void TestKeycode::testCompare()
|
|||
in2.Char = L';';
|
||||
UASSERT(KeyPress(in) == KeyPress(in2));
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue