#include "supertux/console.hpp"
#include "supertux/constants.hpp"
#include "supertux/gameconfig.hpp"
+#include "supertux/game_session.hpp"
#include "supertux/globals.hpp"
#include "supertux/main.hpp"
#include "supertux/menu/menu_storage.hpp"
assert(!m_screen_stack.empty());
static Uint32 fps_ticks = SDL_GetTicks();
- static int frame_count = 0;
m_screen_stack.back()->draw(context);
m_menu_manager->draw(context);
/* Calculate frames per second */
if (g_config->show_fps)
{
+ static int frame_count = 0;
++frame_count;
if (SDL_GetTicks() - fps_ticks >= 500)
event.window.data2);
m_menu_manager->on_window_resize();
break;
+
+ case SDL_WINDOWEVENT_FOCUS_LOST:
+ if(GameSession::current() != NULL &&
+ GameSession::current()->is_active())
+ {
+ GameSession::current()->toggle_pause();
+ }
+ break;
}
break;