From eddd0cd19bc1699d59480bc5c240c518160fc4f1 Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Wed, 17 Mar 2010 17:24:12 +0000 Subject: [PATCH] Attempt for bugfix to resume from msgbox --- source/glest_game/main/program.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/source/glest_game/main/program.cpp b/source/glest_game/main/program.cpp index d6bb1bace..5cb4bc76c 100644 --- a/source/glest_game/main/program.cpp +++ b/source/glest_game/main/program.cpp @@ -346,11 +346,19 @@ void Program::showMessage(const char *msg) { //if(Socket::enableDebugText) printf("In [%s::%s %d]\n",__FILE__,__FUNCTION__,__LINE__); - showCursor(true); +#ifndef WIN32 + int sdl_CursorState = SDL_ShowCursor(SDL_QUERY); + if(sdl_CursorState == SDL_DISABLE) { + showCursor(true); + } +#endif //SDL_WM_ToggleFullScreen(SDL_GetVideoSurface()); ShowMessageProgramState *showMsg = new ShowMessageProgramState(this, msg); - this->programState = showMsg; + //this->programState = showMsg; + + this->programState = NULL; + setState(showMsg); //if(Socket::enableDebugText) printf("In [%s::%s %d]\n",__FILE__,__FUNCTION__,__LINE__); @@ -365,6 +373,10 @@ void Program::showMessage(const char *msg) { //if(Socket::enableDebugText) printf("In [%s::%s %d]\n",__FILE__,__FUNCTION__,__LINE__); +#ifndef WIN32 + showCursor((sdl_CursorState == SDL_ENABLE)); +#endif + //MainWindow *mainWindow= new MainWindow(this); init(this->window); setState(originalState);