- some more unicode input cleanup

This commit is contained in:
Mark Vejvoda
2011-06-26 02:21:45 +00:00
parent 4b6bc7a4a7
commit 675750eda7
5 changed files with 57 additions and 40 deletions

View File

@@ -1596,6 +1596,21 @@ void showCursor(bool b) {
SDL_ShowCursor(b == true ? SDL_ENABLE : SDL_DISABLE);
}
//bool isKeyDown(SDLKey key) {
// const Uint8* keystate = SDL_GetKeyState(0);
//
// if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] key = %d\n",__FILE__,__FUNCTION__,__LINE__,key);
//
// if(key >= 0) {
// if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] keystate[key] = %d\n",__FILE__,__FUNCTION__,__LINE__,keystate[key]);
//
// return (keystate[key] != 0);
// }
// if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] returning false\n",__FILE__,__FUNCTION__,__LINE__);
// return false;
//
//}
bool isKeyDown(int virtualKey) {
char key = static_cast<char> (virtualKey);
const Uint8* keystate = SDL_GetKeyState(0);
@@ -1647,7 +1662,6 @@ bool isKeyDown(int virtualKey) {
return false;
}
string replaceAll(string& context, const string& from, const string& to) {
size_t lookHere = 0;
size_t foundHere = 0;

View File

@@ -577,6 +577,7 @@ MouseButton Window::getMouseButton(int sdlButton) {
}
}
/*
char Window::getRawKey(SDL_keysym keysym) {
char result = 0;
// Because Control messes up unicode character
@@ -941,6 +942,7 @@ char Window::getKey(SDL_keysym keysym,bool skipSpecialKeys) {
return result;
}
*/
bool isKeyPressed(SDLKey compareKey, SDL_KeyboardEvent input) {
Uint16 c = 0;