comparison gui/win32/interface.c @ 34126:72624e80fbce

Fix bug with option sub_window in the Win32 GUI. Enabling this option didn't work so far. Determine if we need a video window by using the same logic as in the X11/GTK GUI, and hide the subwindow accordingly. This also fixes the probably misunderstood use of GUI_SET_AUDIO in the Win32 GUI.
author ib
date Tue, 18 Oct 2011 12:45:24 +0000
parents 178c5660c090
children 98f6d11e2ff3
comparison
equal deleted inserted replaced
34125:a3c7ac76fac1 34126:72624e80fbce
500 dvd_title = 0; 500 dvd_title = 0;
501 force_fps = 0; 501 force_fps = 0;
502 if(!mygui->playlist->tracks) return 0; 502 if(!mygui->playlist->tracks) return 0;
503 uiSetFileName(NULL, mygui->playlist->tracks[mygui->playlist->current]->filename, STREAMTYPE_FILE); 503 uiSetFileName(NULL, mygui->playlist->tracks[mygui->playlist->current]->filename, STREAMTYPE_FILE);
504 guiInfo.Track = mygui->playlist->current + 1; 504 guiInfo.Track = mygui->playlist->current + 1;
505 guiInfo.VideoWindow = 1;
505 if(gtkAONorm) greplace(&af_cfg.list, "volnorm", "volnorm"); 506 if(gtkAONorm) greplace(&af_cfg.list, "volnorm", "volnorm");
506 if(gtkAOExtraStereo) 507 if(gtkAOExtraStereo)
507 { 508 {
508 char *name = malloc(12 + 20 + 1); 509 char *name = malloc(12 + 20 + 1);
509 snprintf(name, 12 + 20, "extrastereo=%f", gtkAOExtraStereoMul); 510 snprintf(name, 12 + 20, "extrastereo=%f", gtkAOExtraStereoMul);
534 } 535 }
535 break; 536 break;
536 } 537 }
537 case GUI_SET_AUDIO: 538 case GUI_SET_AUDIO:
538 { 539 {
539 guiInfo.VideoWindow = (data && !guiInfo.sh_video); 540 if (data && !guiInfo.sh_video) guiInfo.VideoWindow = 0;
540 // NOTE: This type doesn't mean (and never meant) that we have 541 if(IsWindowVisible(mygui->subwindow) && !guiInfo.VideoWindow)
541 // *just* audio, so there probably should be a check before
542 // hiding (see gui/interface.c).
543 if(IsWindowVisible(mygui->subwindow))
544 ShowWindow(mygui->subwindow, SW_HIDE); 542 ShowWindow(mygui->subwindow, SW_HIDE);
545 break; 543 break;
546 } 544 }
547 case GUI_SET_CONTEXT: 545 case GUI_SET_CONTEXT:
548 guiInfo.mpcontext = data; 546 guiInfo.mpcontext = data;