holding down return crashed the chat-function

https://forum.megaglest.org/index.php?topic=9702.0
This commit is contained in:
titiger
2015-06-14 21:00:05 +02:00
parent d323d58027
commit edf9922dca

View File

@@ -1204,7 +1204,7 @@ void MenuStateMasterserver::keyDown(SDL_KeyboardEvent key) {
//printf("keyDown key [%d] chatManager.getText() [%s]\n",key,chatManager.getText().c_str());
MutexSafeWrapper safeMutexIRCPtr(mutexIRCClient,string(extractFileFromDirectoryPath(__FILE__).c_str()) + "_" + intToStr(__LINE__));
//if (key == vkReturn && ircClient != NULL) {
if(isKeyPressed(SDLK_RETURN,key) == true && ircClient != NULL) {
if(isKeyPressed(SDLK_RETURN,key,false) == true && ircClient != NULL) {
ircClient->SendIRCCmdMessage(IRC_CHANNEL, chatManager.getText());
}
}