Fixed some memory leaks and uses of uninitialized values
This commit is contained in:
parent
48156cb4bf
commit
0cc326bcc9
12 changed files with 28 additions and 21 deletions
|
|
@ -97,14 +97,6 @@ void MainProgram::update() {
|
|||
|
||||
deltaTime.update_time_since();
|
||||
deltaTime.update_time_point();
|
||||
|
||||
toolbar.update();
|
||||
|
||||
if(input.key(InputManager::KEY_NOGUI).pressed)
|
||||
drawGui = !drawGui;
|
||||
|
||||
if(input.key(InputManager::KEY_FULLSCREEN).pressed)
|
||||
input.toggleFullscreen = true;
|
||||
|
||||
for(auto& w : worlds) {
|
||||
if(w == world)
|
||||
|
|
@ -113,6 +105,14 @@ void MainProgram::update() {
|
|||
w->unfocus_update();
|
||||
}
|
||||
|
||||
toolbar.update(); // GUI should be setup after the world data has been fully updated for this frame, so that the GUI reflects the current state of the world data
|
||||
|
||||
if(input.key(InputManager::KEY_NOGUI).pressed)
|
||||
drawGui = !drawGui;
|
||||
|
||||
if(input.key(InputManager::KEY_FULLSCREEN).pressed)
|
||||
input.toggleFullscreen = true;
|
||||
|
||||
NetLibrary::update();
|
||||
|
||||
if(tabSetToOpen) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue