Mercurial > mplayer.hg
comparison Gui/win32/dialogs.c @ 22487:1c5ea79749ea
fixed dvd chapter and title switching
author | vayne |
---|---|
date | Sat, 10 Mar 2007 14:33:28 +0000 |
parents | c885b979fda3 |
children |
comparison
equal
deleted
inserted
replaced
22486:afe33a1c6e75 | 22487:1c5ea79749ea |
---|---|
141 mp_msg(MSGT_GPLAYER, MSGL_V, "[GUI] %s is a directory, skipping...\n", filename); | 141 mp_msg(MSGT_GPLAYER, MSGL_V, "[GUI] %s is a directory, skipping...\n", filename); |
142 else | 142 else |
143 { | 143 { |
144 if (GetFullPathName(filename, MAX_PATH, filename, &filepart)) | 144 if (GetFullPathName(filename, MAX_PATH, filename, &filepart)) |
145 { | 145 { |
146 mplSetFileName(NULL, filename, STREAMTYPE_FILE); | |
146 if(!parse_filename(filename, playtree, mconfig, 0)) | 147 if(!parse_filename(filename, playtree, mconfig, 0)) |
147 gui->playlist->add_track(gui->playlist, filename, NULL, filepart, 0); | 148 gui->playlist->add_track(gui->playlist, filename, NULL, filepart, 0); |
148 mp_msg(MSGT_GPLAYER, MSGL_V, "[GUI] Adding file: %s - path %s\n", filespec, filename); | 149 mp_msg(MSGT_GPLAYER, MSGL_V, "[GUI] Adding file: %s - path %s\n", filespec, filename); |
149 result++; | 150 result++; |
150 } | 151 } |
789 static HWND chapter; | 790 static HWND chapter; |
790 HWND wdg; | 791 HWND wdg; |
791 int i=0, j=0; | 792 int i=0, j=0; |
792 char titles[MAX_PATH] = ""; | 793 char titles[MAX_PATH] = ""; |
793 char chapters[MAX_PATH] = ""; | 794 char chapters[MAX_PATH] = ""; |
795 gui_t *gui = (gui_t *) GetWindowLongPtr(hwnd, GWLP_USERDATA); | |
794 switch (iMsg) | 796 switch (iMsg) |
795 { | 797 { |
796 case WM_CREATE: | 798 case WM_CREATE: |
797 wdg = CreateWindow("button", "Ok", | 799 wdg = CreateWindow("button", "Ok", |
798 WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, | 800 WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, |
857 guiIntfStruct.DVD.current_title = SendMessage(title, CB_GETCURSEL, 0, 0) + 1; | 859 guiIntfStruct.DVD.current_title = SendMessage(title, CB_GETCURSEL, 0, 0) + 1; |
858 guiIntfStruct.DVD.current_chapter = SendMessage(chapter, CB_GETCURSEL, 0, 0) + 1; | 860 guiIntfStruct.DVD.current_chapter = SendMessage(chapter, CB_GETCURSEL, 0, 0) + 1; |
859 | 861 |
860 if((guiIntfStruct.DVD.current_title != 0 || guiIntfStruct.DVD.current_chapter != 0)) | 862 if((guiIntfStruct.DVD.current_title != 0 || guiIntfStruct.DVD.current_chapter != 0)) |
861 { | 863 { |
862 mplGotoTheNext = 0; | 864 gui->startplay(gui); |
863 guiGetEvent(guiCEvent, (void *) guiSetStop); | |
864 guiGetEvent(guiCEvent, (void *) guiSetPlay); | |
865 DestroyWindow(hwnd); | 865 DestroyWindow(hwnd); |
866 } | 866 } |
867 } | 867 } |
868 break; | 868 break; |
869 } | 869 } |