Changeset 3698 for pjproject/trunk/pjmedia/src/pjmedia-videodev/sdl_dev.c
- Timestamp:
- Aug 15, 2011 10:06:40 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/src/pjmedia-videodev/sdl_dev.c
r3696 r3698 541 541 #if SDL_VERSION_ATLEAST(1,3,0) 542 542 if (!strm->window) { 543 Uint32 flags = SDL_WINDOW_SHOWN | SDL_WINDOW_RESIZABLE; 543 Uint32 flags = SDL_WINDOW_SHOWN | /*SDL_WINDOW_RESIZABLE*/ 544 SDL_WINDOW_BORDERLESS; 544 545 545 546 # if PJMEDIA_VIDEO_DEV_SDL_HAS_OPENGL … … 691 692 strm->status = PJ_SUCCESS; 692 693 if (strm->new_fmt || strm->new_disp_size) { 693 if (strm->new_disp_size) 694 694 if (strm->new_disp_size) { 695 pj_memcpy(&strm->param.disp_size, strm->new_disp_size, 695 696 sizeof(strm->param.disp_size)); 697 #if SDL_VERSION_ATLEAST(1,3,0) 698 if (strm->scr_tex) { 699 strm->dstrect.x = strm->dstrect.y = 0; 700 strm->dstrect.w = (Uint16)strm->param.disp_size.w; 701 strm->dstrect.h = (Uint16)strm->param.disp_size.h; 702 SDL_RenderSetViewport(strm->renderer, &strm->dstrect); 703 strm->new_fmt = NULL; 704 strm->new_disp_size = NULL; 705 return; 706 } 707 #endif 708 } 696 709 697 710 /* Re-initialize SDL */ … … 755 768 SDL_UpdateTexture(stream->scr_tex, NULL, frame->buf, stream->pitch); 756 769 SDL_RenderClear(stream->renderer); 757 SDL_RenderCopy(stream->renderer, stream->scr_tex, NULL, NULL); 770 SDL_RenderCopy(stream->renderer, stream->scr_tex, 771 &stream->rect, &stream->dstrect); 758 772 SDL_RenderPresent(stream->renderer); 759 773 }
Note: See TracChangeset
for help on using the changeset viewer.