summaryrefslogtreecommitdiffstats
path: root/Gui
diff options
context:
space:
mode:
authorvayne <vayne@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-03-10 14:33:28 +0000
committervayne <vayne@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-03-10 14:33:28 +0000
commitccb97f109804f236bc13d25c200dbdc01c0a93cb (patch)
treec6c43afdf2f99d7a0df4adf20b8ab7f03558106b /Gui
parent217deee8775a4f7de8b2b4ed34f798919288df91 (diff)
downloadmpv-ccb97f109804f236bc13d25c200dbdc01c0a93cb.tar.bz2
mpv-ccb97f109804f236bc13d25c200dbdc01c0a93cb.tar.xz
fixed dvd chapter and title switching
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22505 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'Gui')
-rw-r--r--Gui/win32/dialogs.c6
-rw-r--r--Gui/win32/gui.c3
-rw-r--r--Gui/win32/interface.c33
3 files changed, 28 insertions, 14 deletions
diff --git a/Gui/win32/dialogs.c b/Gui/win32/dialogs.c
index 60a2d75084..6b38f8635f 100644
--- a/Gui/win32/dialogs.c
+++ b/Gui/win32/dialogs.c
@@ -143,6 +143,7 @@ int display_openfilewindow(gui_t *gui, int add)
{
if (GetFullPathName(filename, MAX_PATH, filename, &filepart))
{
+ mplSetFileName(NULL, filename, STREAMTYPE_FILE);
if(!parse_filename(filename, playtree, mconfig, 0))
gui->playlist->add_track(gui->playlist, filename, NULL, filepart, 0);
mp_msg(MSGT_GPLAYER, MSGL_V, "[GUI] Adding file: %s - path %s\n", filespec, filename);
@@ -791,6 +792,7 @@ static LRESULT CALLBACK TitleChapterWndProc(HWND hwnd, UINT iMsg, WPARAM wParam,
int i=0, j=0;
char titles[MAX_PATH] = "";
char chapters[MAX_PATH] = "";
+ gui_t *gui = (gui_t *) GetWindowLongPtr(hwnd, GWLP_USERDATA);
switch (iMsg)
{
case WM_CREATE:
@@ -859,9 +861,7 @@ static LRESULT CALLBACK TitleChapterWndProc(HWND hwnd, UINT iMsg, WPARAM wParam,
if((guiIntfStruct.DVD.current_title != 0 || guiIntfStruct.DVD.current_chapter != 0))
{
- mplGotoTheNext = 0;
- guiGetEvent(guiCEvent, (void *) guiSetStop);
- guiGetEvent(guiCEvent, (void *) guiSetPlay);
+ gui->startplay(gui);
DestroyWindow(hwnd);
}
}
diff --git a/Gui/win32/gui.c b/Gui/win32/gui.c
index bf4f2d4fab..7b1aa864bb 100644
--- a/Gui/win32/gui.c
+++ b/Gui/win32/gui.c
@@ -451,6 +451,7 @@ static LRESULT CALLBACK SubProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM l
for(i=0; i<filecount; i++)
{
DragQueryFile((HDROP) wParam, i, file, MAX_PATH);
+ mplSetFileName(NULL, file, STREAMTYPE_FILE);
if(!parse_filename(file, playtree, mconfig, 1))
gui->playlist->add_track(gui->playlist, file, NULL, NULL, 0);
}
@@ -722,6 +723,7 @@ static LRESULT CALLBACK EventProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM
{
PCOPYDATASTRUCT cdData;
cdData = (PCOPYDATASTRUCT) lParam;
+ mplSetFileName(NULL, cdData->lpData, STREAMTYPE_FILE);
if(!parse_filename(cdData->lpData, playtree, mconfig, 1))
gui->playlist->add_track(gui->playlist, cdData->lpData, NULL, NULL, 0);
gui->startplay(gui);
@@ -738,6 +740,7 @@ static LRESULT CALLBACK EventProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM
for(i=0; i<filecount; i++)
{
DragQueryFile((HDROP) wParam, i, file, MAX_PATH);
+ mplSetFileName(NULL, file, STREAMTYPE_FILE);
if(!parse_filename(file, playtree, mconfig, 1))
gui->playlist->add_track(gui->playlist, file, NULL, NULL, 0);
}
diff --git a/Gui/win32/interface.c b/Gui/win32/interface.c
index 46d2e3033e..dafdaa556b 100644
--- a/Gui/win32/interface.c
+++ b/Gui/win32/interface.c
@@ -167,10 +167,6 @@ static void guiSetEvent(int event)
guiIntfStruct.DiskChanged = 1;
mplSetFileName(NULL, dvd_device, STREAMTYPE_DVD);
- guiIntfStruct.Title = guiIntfStruct.DVD.current_title;
- guiIntfStruct.Chapter = guiIntfStruct.DVD.current_chapter;
- guiIntfStruct.Angle = guiIntfStruct.DVD.current_angle;
-
dvdname[0] = 0;
strcat(dvdname, "DVD Movie");
GetVolumeInformation(dvd_device, dvdname, MAX_PATH, NULL, NULL, NULL, NULL, 0);
@@ -281,13 +277,28 @@ static void guiSetEvent(int event)
case evDropFile:
case evLoadPlay:
{
- mplSetFileName(NULL, filename, STREAMTYPE_FILE);
- guiIntfStruct.FilenameChanged = guiIntfStruct.NewPlay = 1;
- update_playlistwindow();
- mplGotoTheNext = guiIntfStruct.Playing? 0 : 1;
- guiGetEvent(guiCEvent, (void *) guiSetStop);
- guiGetEvent(guiCEvent, (void *) guiSetPlay);
- break;
+ switch(guiIntfStruct.StreamType)
+ {
+ case STREAMTYPE_DVD:
+ {
+ guiIntfStruct.Title = guiIntfStruct.DVD.current_title;
+ guiIntfStruct.Chapter = guiIntfStruct.DVD.current_chapter;
+ guiIntfStruct.Angle = guiIntfStruct.DVD.current_angle;
+ guiIntfStruct.DiskChanged = 1;
+ guiGetEvent(guiCEvent, (void *) guiSetPlay);
+ break;
+ }
+ default:
+ {
+ guiIntfStruct.FilenameChanged = guiIntfStruct.NewPlay = 1;
+ update_playlistwindow();
+ mplGotoTheNext = guiIntfStruct.Playing? 0 : 1;
+ guiGetEvent(guiCEvent, (void *) guiSetStop);
+ guiGetEvent(guiCEvent, (void *) guiSetPlay);
+ break;
+ }
+ }
+ break;
}
case evNext:
mplNext();