Mercurial > fife-parpg
comparison engine/core/controller/engine.cpp @ 83:46de6c7e22e5
increased felt responsiveness by first processing events and then drawing the screen
author | spq@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Fri, 18 Jul 2008 14:44:56 +0000 |
parents | 18c2a21ac0ad |
children | d2f1e81fbe2c |
comparison
equal
deleted
inserted
replaced
82:b5bb869665fd | 83:46de6c7e22e5 |
---|---|
284 void Engine::initializePumping() { | 284 void Engine::initializePumping() { |
285 m_eventmanager->processEvents(); | 285 m_eventmanager->processEvents(); |
286 } | 286 } |
287 | 287 |
288 void Engine::pump() { | 288 void Engine::pump() { |
289 m_eventmanager->processEvents(); | |
289 m_renderbackend->startFrame(); | 290 m_renderbackend->startFrame(); |
290 m_timemanager->update(); | 291 m_timemanager->update(); |
291 m_model->update(); | 292 m_model->update(); |
292 m_view->update(); | 293 m_view->update(); |
293 m_guimanager->turn(); | 294 m_guimanager->turn(); |
294 m_cursor->draw(); | 295 m_cursor->draw(); |
295 m_renderbackend->endFrame(); | 296 m_renderbackend->endFrame(); |
296 SDL_Delay(1); | |
297 m_eventmanager->processEvents(); | |
298 } | 297 } |
299 | 298 |
300 void Engine::finalizePumping() { | 299 void Engine::finalizePumping() { |
301 // nothing here at the moment.. | 300 // nothing here at the moment.. |
302 } | 301 } |