Mercurial > mplayer.hg
comparison libvo/vo_sdl.c @ 357:681979d4031a
- small bugfixes
author | atmosfear |
---|---|
date | Wed, 11 Apr 2001 20:11:21 +0000 |
parents | 70833462dee9 |
children | 020ca66964e4 |
comparison
equal
deleted
inserted
replaced
356:c39058295939 | 357:681979d4031a |
---|---|
349 static uint32_t | 349 static uint32_t |
350 init(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint32_t fullscreen, char *title, uint32_t format) | 350 init(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint32_t fullscreen, char *title, uint32_t format) |
351 //static int sdl_setup (int width, int height) | 351 //static int sdl_setup (int width, int height) |
352 { | 352 { |
353 struct sdl_priv_s *priv = &sdl_priv; | 353 struct sdl_priv_s *priv = &sdl_priv; |
354 unsigned int sdl_format, mode; | 354 unsigned int sdl_format; |
355 | 355 |
356 | 356 |
357 switch(format){ | 357 switch(format){ |
358 case IMGFMT_YV12: | 358 case IMGFMT_YV12: |
359 sdl_format=SDL_YV12_OVERLAY; | 359 sdl_format=SDL_YV12_OVERLAY; |
387 // printf("SDL: Width: %i Height: %i D_Width %i D_Height: %i\n", width, height, d_width, d_height); | 387 // printf("SDL: Width: %i Height: %i D_Width %i D_Height: %i\n", width, height, d_width, d_height); |
388 switch(fullscreen){ | 388 switch(fullscreen){ |
389 case 0x01: | 389 case 0x01: |
390 case 0x05: | 390 case 0x05: |
391 printf("SDL: setting zoomed fullscreen without modeswitching\n"); | 391 printf("SDL: setting zoomed fullscreen without modeswitching\n"); |
392 //priv->fullmodes[mode]->w | |
393 /*priv->fullmode++; | |
394 if (priv->fullmode > (findArrayEnd(priv->fullmodes) - 1)) priv->fullmode = 0; | |
395 set_fullmode(priv->fullmode);*/ | |
396 priv->windowsize.w = d_width; | 392 priv->windowsize.w = d_width; |
397 priv->windowsize.h = d_height; | 393 priv->windowsize.h = d_height; |
398 if(priv->surface = SDL_SetVideoMode (d_width, d_height, priv->bpp, priv->sdlfullflags)) | 394 if(priv->surface = SDL_SetVideoMode (d_width, d_height, priv->bpp, priv->sdlfullflags)) |
399 SDL_ShowCursor(0); | 395 SDL_ShowCursor(0); |
400 break; | 396 break; |
581 | 577 |
582 /* graphics mode selection shortcuts */ | 578 /* graphics mode selection shortcuts */ |
583 case SDL_KEYUP: | 579 case SDL_KEYUP: |
584 keypressed = event.key.keysym.sym; | 580 keypressed = event.key.keysym.sym; |
585 | 581 |
586 /* c key pressed. plus cycles through available fullscreenmodes, if we have some */ | 582 /* c key pressed. c cycles through available fullscreenmodes, if we have some */ |
587 if ( ((keypressed == SDLK_c)) && (priv->fullmodes) ) { | 583 if ( ((keypressed == SDLK_c)) && (priv->fullmodes) ) { |
588 /* select next fullscreen mode */ | 584 /* select next fullscreen mode */ |
589 priv->fullmode++; | 585 priv->fullmode++; |
590 if (priv->fullmode > (findArrayEnd(priv->fullmodes) - 1)) priv->fullmode = 0; | 586 if (priv->fullmode > (findArrayEnd(priv->fullmodes) - 1)) priv->fullmode = 0; |
591 set_fullmode(priv->fullmode); | 587 set_fullmode(priv->fullmode); |