summaryrefslogtreecommitdiff
path: root/src/player.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/player.cc')
-rw-r--r--src/player.cc18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/player.cc b/src/player.cc
index e42b332..ad8cdc4 100644
--- a/src/player.cc
+++ b/src/player.cc
@@ -39,6 +39,9 @@
/*
* $Log$
+ * Revision 1.29 2005/07/25 16:09:47 deva
+ * *** empty log message ***
+ *
* Revision 1.28 2005/07/25 15:56:27 deva
* *** empty log message ***
*
@@ -114,15 +117,19 @@ void Player::reinitSDL()
void Player::deinitSDL()
{
+ printf("Deinit SDL...");
SDL_FreeYUVOverlay(overlay);
SDL_Quit();
+ printf("done!\n");
}
void Player::initSDL()
{
+ printf("Init SDL...");
if(SDL_Init(SDL_INIT_VIDEO) < 0) {
info->error("Unable to init SDL: %s.", SDL_GetError());
noErrors = false;
+ printf("failed!\n");
return;
}
@@ -135,6 +142,7 @@ void Player::initSDL()
info->error("Unable to set %dx%d video: %s.",
720, 576, SDL_GetError());
noErrors = false;
+ printf("failed!\n");
return;
}
@@ -145,8 +153,10 @@ void Player::initSDL()
if(!overlay) {
info->error("Unable to create SDL overlay: %s.", SDL_GetError());
noErrors = false;
+ printf("failed!\n");
return;
}
+ printf("done!\n");
}
void Player::player()
@@ -177,8 +187,10 @@ void Player::player()
sem_post(&play_sem);
if(doresize) {
- doresize = false;
+ width = new_width;
+ height = new_height;
reinitSDL();
+ doresize = false;
}
if(!SDL_WaitEvent(&event)) break; // FIXME: Gracefully exit...
@@ -266,8 +278,8 @@ void Player::stop()
void Player::resize(int w, int h)
{
- width = w;
- height = h;
+ new_width = w;
+ new_height = h;
doresize = true;
}