# HG changeset patch # User vayne # Date 1172795612 0 # Node ID 8ab800c12f85dad6f7465fb251e7d53fd8d771ed # Parent c7b920227b006a38ce67524bd8ad8b66233cd004 simplify and modify fullscreen switching to avoid improper aspects diff -r c7b920227b00 -r 8ab800c12f85 Gui/win32/interface.c --- a/Gui/win32/interface.c Fri Mar 02 00:29:06 2007 +0000 +++ b/Gui/win32/interface.c Fri Mar 02 00:33:32 2007 +0000 @@ -431,6 +431,30 @@ free((void **) &guiIntfStruct.Subtitlename); } +void mplFullScreen( void ) +{ + if(!guiIntfStruct.sh_video) return; + + if(sub_window) + { + if(!fullscreen && IsWindowVisible(mygui->subwindow) && !IsIconic(mygui->subwindow)) + GetWindowRect(mygui->subwindow, &old_rect); + + if(fullscreen) + { + fullscreen = 0; + style = WS_OVERLAPPEDWINDOW | WS_SIZEBOX; + } else { + fullscreen = 1; + style = WS_VISIBLE | WS_POPUP; + } + SetWindowLong(mygui->subwindow, GWL_STYLE, style); + update_subwindow(); + } + video_out->control(VOCTRL_FULLSCREEN, 0); + if(sub_window) ShowWindow(mygui->subwindow, SW_SHOW); +} + static DWORD WINAPI GuiThread(void) { MSG msg; @@ -643,31 +667,8 @@ switch((int) arg) { case MP_CMD_GUI_FULLSCREEN: - { - if(!guiIntfStruct.sh_video) break; - - if(!sub_window) - { - video_out->control(VOCTRL_FULLSCREEN, 0); - break; - } - - if(!fullscreen && IsWindowVisible(mygui->subwindow) && !IsIconic(mygui->subwindow)) - GetWindowRect(mygui->subwindow, &old_rect); - - if(fullscreen) - { - fullscreen = 0; - style = WS_OVERLAPPEDWINDOW | WS_SIZEBOX; - } else { - fullscreen = 1; - style = WS_VISIBLE | WS_POPUP; - } - SetWindowLong(mygui->subwindow, GWL_STYLE, style); - mpcodecs_config_vo(guiIntfStruct.sh_video, guiIntfStruct.MovieWidth, - guiIntfStruct.MovieHeight, 0); + mplFullScreen(); break; - } case MP_CMD_QUIT: { mygui->uninit(mygui);