]> git.lizzy.rs Git - dragonfireclient.git/commit
Client & ClientEnvirnment: don't create fake events (#5676)
authorLoïc Blot <nerzhul@users.noreply.github.com>
Sat, 29 Apr 2017 15:25:25 +0000 (17:25 +0200)
committerGitHub <noreply@github.com>
Sat, 29 Apr 2017 15:25:25 +0000 (17:25 +0200)
commit3db66b453152c3610b858aa1650e1ab3f545a430
treed1d625c50f8c350ff1f52b7ed446bd0ed2ea4e6b
parentf727f54192644f6427ac1b2c86df8c64c7c5fdf0
Client & ClientEnvirnment: don't create fake events (#5676)

Instead of create fake events on the stack on each loop call (Game::run), verify is queue is empty or not and handle event directly if there is.

This prevents fake ClientEvent creation & memory allocations

Same fix is also applied on ClientEnvironment, & rename getClientEvent to getClientEnvEvent to match ClientEnvEvent object
src/client.cpp
src/client.h
src/clientenvironment.cpp
src/clientenvironment.h
src/game.cpp