eventSdlKeyDown

Give the real SDL_KEYDOWN to the Window/Program states.
This fixes issues with group keys and SDL2.
This commit is contained in:
titiger
2015-10-30 01:04:01 +01:00
parent b83fab237b
commit dbee447a9a
9 changed files with 63 additions and 44 deletions

View File

@@ -1129,6 +1129,13 @@ bool MainWindow::eventTextInput(std::string text) {
return result;
}
bool MainWindow::eventSdlKeyDown(SDL_KeyboardEvent key) {
if(program == NULL) {
throw megaglest_runtime_error("In [MainWindow::eventKeyDown] ERROR, program == NULL!");
}
return program->sdlKeyDown(key);
}
void MainWindow::eventKeyDown(SDL_KeyboardEvent key) {
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] [%d]\n",__FILE__,__FUNCTION__,__LINE__,key.keysym.sym);