Commit c03312cc authored by Michael Niedermayer's avatar Michael Niedermayer

remove code duplication

Originally committed as revision 7386 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent fccb19e3
...@@ -2142,26 +2142,13 @@ static void stream_cycle_channel(VideoState *is, int codec_type) ...@@ -2142,26 +2142,13 @@ static void stream_cycle_channel(VideoState *is, int codec_type)
static void toggle_full_screen(void) static void toggle_full_screen(void)
{ {
int w, h, flags;
is_full_screen = !is_full_screen; is_full_screen = !is_full_screen;
if (!fs_screen_width) { if (!fs_screen_width) {
/* use default SDL method */ /* use default SDL method */
SDL_WM_ToggleFullScreen(screen); SDL_WM_ToggleFullScreen(screen);
} else { } else {
/* use the recorded resolution */ /* use the recorded resolution */
flags = SDL_HWSURFACE|SDL_ASYNCBLIT|SDL_HWACCEL; video_open(cur_stream);
if (is_full_screen) {
w = fs_screen_width;
h = fs_screen_height;
flags |= SDL_FULLSCREEN;
} else {
w = screen_width;
h = screen_height;
flags |= SDL_RESIZABLE;
}
screen = SDL_SetVideoMode(w, h, 0, flags);
cur_stream->width = w;
cur_stream->height = h;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment