This commit is contained in:
AlexVinS
2014-07-03 19:57:21 +04:00
parent 57f82f2bed
commit 8a488aeb86
4 changed files with 12 additions and 25 deletions
-7
View File
@@ -1227,13 +1227,6 @@ void handleQuit()
if(client)
endGame();
// if(mainGUIThread)
// {
// GH.terminate = true;
// if(mainGUIThread->get_id() != boost::this_thread::get_id()) mainGUIThread->join();
// delete mainGUIThread;
// mainGUIThread = nullptr;
// }
delete console;
console = nullptr;
boost::this_thread::sleep(boost::posix_time::milliseconds(750));
-2
View File
@@ -1528,8 +1528,6 @@ bool CPlayerInterface::ctrlPressed() const
void CPlayerInterface::update()
{
// if(duringMovement)
// return;
// Updating GUI requires locking pim mutex (that protects screen and GUI state).
// When ending the game, the pim mutex might be hold by other thread,
// that will notify us about the ending game by setting terminate_cond flag.
+12 -15
View File
@@ -409,23 +409,21 @@ void CGuiHandler::fakeMouseMove()
void CGuiHandler::renderFrame()
{
if(!terminate)
{
if(curInt)
curInt->update(); // calls a update and drawing process of the loaded game interface object at the moment
if(curInt)
curInt->update(); // calls a update and drawing process of the loaded game interface object at the moment
// draw the mouse cursor and update the screen
CCS->curh->render();
// draw the mouse cursor and update the screen
CCS->curh->render();
#ifndef VCMI_SDL1
if(0 != SDL_RenderCopy(mainRenderer, screenTexture, nullptr, nullptr))
logGlobal->errorStream() << __FUNCTION__ << " SDL_RenderCopy " << SDL_GetError();
#ifndef VCMI_SDL1
if(0 != SDL_RenderCopy(mainRenderer, screenTexture, nullptr, nullptr))
logGlobal->errorStream() << __FUNCTION__ << " SDL_RenderCopy " << SDL_GetError();
SDL_RenderPresent(mainRenderer);
#endif
mainFPSmng->framerateDelay(); // holds a constant FPS
}
SDL_RenderPresent(mainRenderer);
#endif
mainFPSmng->framerateDelay(); // holds a constant FPS
}
@@ -434,7 +432,6 @@ CGuiHandler::CGuiHandler()
{
curInt = nullptr;
current = nullptr;
terminate = false;
statusbar = nullptr;
// Creates the FPS manager and sets the framerate to 48 which is doubled the value of the original Heroes 3 FPS rate
-1
View File
@@ -76,7 +76,6 @@ public:
Point lastClick;
unsigned lastClickTime;
bool terminate;
CGuiHandler();
~CGuiHandler();