mirror of
https://github.com/vcmi/vcmi.git
synced 2026-06-19 22:57:37 +02:00
Cleanup
This commit is contained in:
@@ -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));
|
||||
|
||||
@@ -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
@@ -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
|
||||
|
||||
@@ -76,7 +76,6 @@ public:
|
||||
|
||||
Point lastClick;
|
||||
unsigned lastClickTime;
|
||||
bool terminate;
|
||||
|
||||
CGuiHandler();
|
||||
~CGuiHandler();
|
||||
|
||||
Reference in New Issue
Block a user