comparison gui/win32/interface.c @ 34052:9f19a87d2062

Remove gui() instruction GUI_SET_FILE. Move the preparation part to GUI_PREPARE and the part resetting variable guiInfo.sh_video to GUI_END_FILE.
author ib
date Tue, 27 Sep 2011 14:15:42 +0000
parents dd0e5dc6ebbf
children 418e04046d98
comparison
equal deleted inserted replaced
34051:1be07d02d453 34052:9f19a87d2062
444 444
445 switch (what) 445 switch (what)
446 { 446 {
447 case GUI_PREPARE: 447 case GUI_PREPARE:
448 { 448 {
449 gui(GUI_SET_FILE, 0); 449 audio_id = -1;
450 video_id = -1;
451 dvdsub_id = -1;
452 vobsub_id = -1;
453 stream_cache_size = -1;
454 autosync = 0;
455 dvd_title = 0;
456 force_fps = 0;
457 if(!mygui->playlist->tracks) return 0;
458 filename = guiInfo.Filename = mygui->playlist->tracks[mygui->playlist->current]->filename;
459 guiInfo.Track = mygui->playlist->current + 1;
460 if(gtkAONorm) greplace(&af_cfg.list, "volnorm", "volnorm");
461 if(gtkAOExtraStereo)
462 {
463 char *name = malloc(12 + 20 + 1);
464 snprintf(name, 12 + 20, "extrastereo=%f", gtkAOExtraStereoMul);
465 name[12 + 20] = 0;
466 greplace(&af_cfg.list, "extrastereo", name);
467 free(name);
468 }
469 if(gtkCacheOn) stream_cache_size = gtkCacheSize;
470 if(gtkAutoSyncOn) autosync = gtkAutoSync;
450 guiInfo.NewPlay = 0; 471 guiInfo.NewPlay = 0;
451 switch(guiInfo.StreamType) 472 switch(guiInfo.StreamType)
452 { 473 {
453 case STREAMTYPE_PLAYLIST: 474 case STREAMTYPE_PLAYLIST:
454 break; 475 break;
592 default: 613 default:
593 break; 614 break;
594 } 615 }
595 break; 616 break;
596 } 617 }
597 case GUI_SET_FILE:
598 {
599 audio_id = -1;
600 video_id = -1;
601 dvdsub_id = -1;
602 vobsub_id = -1;
603 stream_cache_size = -1;
604 autosync = 0;
605 dvd_title = 0;
606 force_fps = 0;
607 if(!mygui->playlist->tracks) return 0;
608 filename = guiInfo.Filename = mygui->playlist->tracks[mygui->playlist->current]->filename;
609 guiInfo.Track = mygui->playlist->current + 1;
610 if(gtkAONorm) greplace(&af_cfg.list, "volnorm", "volnorm");
611 if(gtkAOExtraStereo)
612 {
613 char *name = malloc(12 + 20 + 1);
614 snprintf(name, 12 + 20, "extrastereo=%f", gtkAOExtraStereoMul);
615 name[12 + 20] = 0;
616 greplace(&af_cfg.list, "extrastereo", name);
617 free(name);
618 }
619 if(gtkCacheOn) stream_cache_size = gtkCacheSize;
620 if(gtkAutoSyncOn) autosync = gtkAutoSync;
621 break;
622 }
623 case GUI_HANDLE_EVENTS: 618 case GUI_HANDLE_EVENTS:
624 break; 619 break;
625 case GUI_SET_MIXER: 620 case GUI_SET_MIXER:
626 { 621 {
627 if(audio_out) 622 if(audio_out)