reverting some things related to alt+enter
real reason is false behaviour of static bool isUnprintableChar(). More tests needed.
This commit is contained in:
parent
4a85b17794
commit
6c2f722f30
|
@ -4037,7 +4037,7 @@ void MenuStateCustomGame::setupUIFromGameSettings(const GameSettings &gameSettin
|
|||
listBoxMap.setSelectedItem(formatString(scenarioInfo.mapName));
|
||||
}
|
||||
else {
|
||||
printf("gameSettings.getMapFilter()=%d \n",gameSettings.getMapFilter());
|
||||
//printf("gameSettings.getMapFilter()=%d \n",gameSettings.getMapFilter());
|
||||
if(gameSettings.getMapFilter() == 0) {
|
||||
listBoxMapFilter.setSelectedItemIndex(0);
|
||||
}
|
||||
|
|
|
@ -106,10 +106,6 @@ private:
|
|||
static bool isFullScreen;
|
||||
static SDL_keysym keystate;
|
||||
static bool tryVSynch;
|
||||
static int64 lastToggle;
|
||||
|
||||
static void setLastToggle(int64 lastToggle) {Window::lastToggle = lastToggle;}
|
||||
static int64 getLastToggle() {return Window::lastToggle;}
|
||||
|
||||
static void setLastMouseEvent(int64 lastMouseEvent) {Window::lastMouseEvent = lastMouseEvent;}
|
||||
static int64 getLastMouseEvent() {return Window::lastMouseEvent;}
|
||||
|
|
|
@ -48,7 +48,6 @@ MouseState Window::mouseState;
|
|||
bool Window::isKeyPressedDown = false;
|
||||
bool Window::isFullScreen = false;
|
||||
SDL_keysym Window::keystate;
|
||||
int64 Window::lastToggle = -1000;
|
||||
|
||||
bool Window::isActive = false;
|
||||
#ifdef WIN32
|
||||
|
@ -145,7 +144,6 @@ Window::Window() {
|
|||
Window::isActive = true;
|
||||
|
||||
lastMouseEvent = 0;
|
||||
lastToggle = -1000;
|
||||
mousePos = Vec2i(0);
|
||||
mouseState.clear();
|
||||
|
||||
|
@ -175,7 +173,6 @@ Window::Window(SDL_Window *sdlWindow) {
|
|||
Window::isActive = true;
|
||||
|
||||
lastMouseEvent = 0;
|
||||
lastToggle = -1000;
|
||||
mousePos = Vec2i(0);
|
||||
mouseState.clear();
|
||||
|
||||
|
@ -350,7 +347,7 @@ bool Window::handleEvent() {
|
|||
// // also prevent ` and/or ~ appearing in console every time it's toggled.
|
||||
SDL_Keymod mod = SDL_GetModState();
|
||||
if (!isUnprintableChar(event.key.keysym,mod)) {
|
||||
//printf("In SDL_KEYDOWN key SKIP [%d]\n",event.key.keysym.sym);
|
||||
printf("In SDL_KEYDOWN key SKIP [%d]\n",event.key.keysym.sym);
|
||||
break;
|
||||
}
|
||||
codeLocation = "i";
|
||||
|
@ -368,12 +365,7 @@ bool Window::handleEvent() {
|
|||
// handle ALT+Return
|
||||
if( (keyName == "Return" || keyName == "Enter")
|
||||
&& (event.key.keysym.mod & (KMOD_LALT | KMOD_RALT))) {
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s %d] SDLK_RETURN pressed.\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||
|
||||
if(Chrono::getCurMillis()-getLastToggle()>1000){
|
||||
toggleFullscreen();
|
||||
setLastToggle(Chrono::getCurMillis());
|
||||
}
|
||||
toggleFullscreen();
|
||||
keyDownConsumed=true;
|
||||
}
|
||||
#ifdef WIN32
|
||||
|
|
Loading…
Reference in New Issue