mirror of
https://github.com/glest/glest-source.git
synced 2025-08-16 05:13:59 +02:00
- some more unicode input cleanup
This commit is contained in:
@@ -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;
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user