summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-01-08 11:39:49 +0300
committerAndrei Karas <akaras@inbox.ru>2014-01-08 11:39:49 +0300
commit7e89857e908f3e04fb9da9d3ffcc4cfed118d5ad (patch)
tree393b8f228e3df776fb06f00c9c18df15376b366d /src
parent276a5f9f7ef2f1fd5fad7339db2d2a9154ce9870 (diff)
downloadmanaplus-7e89857e908f3e04fb9da9d3ffcc4cfed118d5ad.tar.gz
manaplus-7e89857e908f3e04fb9da9d3ffcc4cfed118d5ad.tar.bz2
manaplus-7e89857e908f3e04fb9da9d3ffcc4cfed118d5ad.tar.xz
manaplus-7e89857e908f3e04fb9da9d3ffcc4cfed118d5ad.zip
fix named input actions in gui before logging into game.
Diffstat (limited to 'src')
-rw-r--r--src/client.cpp4
-rw-r--r--src/game.cpp3
-rw-r--r--src/input/inputmanager.cpp2
3 files changed, 6 insertions, 3 deletions
diff --git a/src/client.cpp b/src/client.cpp
index 2eae9565f..7c7b1e016 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -413,6 +413,10 @@ void Client::gameInit()
Joystick::init();
createWindows();
+ keyboard.update();
+ if (joystick)
+ joystick->update();
+
// Initialize default server
mCurrentServer.hostname = mOptions.serverName;
mCurrentServer.port = mOptions.serverPort;
diff --git a/src/game.cpp b/src/game.cpp
index d17407b51..eada32f45 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -807,9 +807,6 @@ void Game::handleMove()
&& chatWindow && !chatWindow->isInputFocused()
&& !InventoryWindow::isAnyInputFocused() && !quitDialog)
{
- // Get the state of the keyboard keys
- keyboard.refreshActiveKeys();
-
// Ignore input if either "ignore" key is pressed
// Stops the character moving about if the user's window manager
// uses "ignore+arrow key" to switch virtual desktops.
diff --git a/src/input/inputmanager.cpp b/src/input/inputmanager.cpp
index c0d3a1d0f..2bc0786fb 100644
--- a/src/input/inputmanager.cpp
+++ b/src/input/inputmanager.cpp
@@ -524,6 +524,7 @@ bool InputManager::handleEvent(const SDL_Event &event)
{
case SDL_KEYDOWN:
{
+ keyboard.refreshActiveKeys();
updateConditionMask();
if (handleAssignKey(event, INPUT_KEYBOARD))
return true;
@@ -551,6 +552,7 @@ bool InputManager::handleEvent(const SDL_Event &event)
}
case SDL_KEYUP:
{
+ keyboard.refreshActiveKeys();
updateConditionMask();
keyboard.handleDeActicateKey(event);
break;