Browse Source

Remove mainLoopTickEventIteration

pull/580/head
Andreas Leroux 4 years ago
parent
commit
5540d06175
  1. 12
      src/Magnum/Platform/Sdl2Application.cpp
  2. 10
      src/Magnum/Platform/Sdl2Application.h

12
src/Magnum/Platform/Sdl2Application.cpp

@ -985,14 +985,6 @@ bool Sdl2Application::mainLoopEventIteration() {
return !(_flags & Flag::Exit); return !(_flags & Flag::Exit);
} }
bool Sdl2Application::mainLoopTickEventIteration() {
if(!(_flags & Flag::NoTickEvent)) {
tickEvent();
return true;
}
return false;
}
bool Sdl2Application::mainLoopDrawEventIteration() { bool Sdl2Application::mainLoopDrawEventIteration() {
if(_flags & Flag::Redraw) { if(_flags & Flag::Redraw) {
_flags &= ~Flag::Redraw; _flags &= ~Flag::Redraw;
@ -1021,8 +1013,8 @@ bool Sdl2Application::mainLoopIteration() {
if (!mainLoopEventIteration()) if (!mainLoopEventIteration())
return false; return false;
/* call tickEvent() if implemented */ /* Tick event */
mainLoopTickEventIteration(); if(!(_flags & Flag::NoTickEvent)) tickEvent();
/* drawEvent() was called */ /* drawEvent() was called */
if (mainLoopDrawEventIteration()) { if (mainLoopDrawEventIteration()) {

10
src/Magnum/Platform/Sdl2Application.h

@ -571,7 +571,7 @@ class Sdl2Application {
* @return @cpp false @ce if @ref exit() was called and the application * @return @cpp false @ce if @ref exit() was called and the application
* should exit, @cpp true @ce otherwise * should exit, @cpp true @ce otherwise
* *
* Calls @ref mainLoopEventIteration(), @ref mainLoopTickEventIteration() and * Calls @ref mainLoopEventIteration(), @ref tickEvent() (if implemented) and
* @ref mainLoopDrawEventIteration() managing the delays between them. * @ref mainLoopDrawEventIteration() managing the delays between them.
* Called internally from @ref exec(). If you want to have better * Called internally from @ref exec(). If you want to have better
* control over how the main loop behaves, you can call this function * control over how the main loop behaves, you can call this function
@ -590,14 +590,6 @@ class Sdl2Application {
*/ */
bool mainLoopEventIteration(); bool mainLoopEventIteration();
/**
* @brief Calls @ref tickEvent() if implemented
* @return @cpp true @ce if @ref tickEvent() was called, @cpp false @ce otherwise
*
* Called internally from @ref mainLoopIteration().
*/
bool mainLoopTickEventIteration();
/** /**
* @brief Calls @ref drawEvent() if @ref Flag::Redraw is set and unset it. * @brief Calls @ref drawEvent() if @ref Flag::Redraw is set and unset it.
* @return @cpp true @ce if @ref drawEvent() was called, @cpp false @ce otherwise * @return @cpp true @ce if @ref drawEvent() was called, @cpp false @ce otherwise

Loading…
Cancel
Save