small cleaning in the use of cursor::manager:

- add some initialisation in it (SDL_ShowCursor(SDL_ENABLE) and a
  reset of cursor);

- initialise the manager right after the video

- start to use cursor after the manager (and not before)
This commit is contained in:
Ali El Gariani 2007-06-22 15:54:26 +00:00
parent fc4c279d0d
commit 9ed457f6f7
2 changed files with 7 additions and 4 deletions

View file

@ -138,7 +138,10 @@ namespace cursor
{
manager::manager()
{}
{
SDL_ShowCursor(SDL_ENABLE);
set();
}
manager::~manager()
{

View file

@ -391,8 +391,6 @@ bool game_controller::init_video()
return false;
}
cursor::set(cursor::WAIT);
return true;
}
@ -1916,6 +1914,9 @@ static int play_game(int argc, char** argv)
return 0;
}
const cursor::manager cursor_manager;
cursor::set(cursor::WAIT);
loadscreen::global_loadscreen = new loadscreen(game.disp().video());
loadscreen::global_loadscreen->clear_screen();
@ -1939,7 +1940,6 @@ static int play_game(int argc, char** argv)
return 0;
}
const cursor::manager cursor_manager;
#if defined(_X11) && !defined(__APPLE__)
SDL_EventState(SDL_SYSWMEVENT, SDL_ENABLE);
#endif