[MPlayer-cvslog] r35073 - in trunk/gui/win32: dialogs.h gui.c
ib
subversion at mplayerhq.hu
Sat Aug 11 15:02:58 CEST 2012
Author: ib
Date: Sat Aug 11 15:02:58 2012
New Revision: 35073
Log:
Fix bug with definition of IDPLAYDISK in Win32 GUI.
Numeric identifiers starting from IDPLAYDISK are used for CDROM/DVD
drive menu entries and there must be enough identifier for all drives
available. Introduce IDPLAYDISK_LIMIT for a range of such identifiers.
Additionally, add a check when creating menu entries and rework the
condition for checking the play command for reasons of clarity.
Reported by Stephen Sheldon, sfsheldo gmail com.
Modified:
trunk/gui/win32/dialogs.h
trunk/gui/win32/gui.c
Modified: trunk/gui/win32/dialogs.h
==============================================================================
--- trunk/gui/win32/dialogs.h Fri Aug 10 23:12:02 2012 (r35072)
+++ trunk/gui/win32/dialogs.h Sat Aug 11 15:02:58 2012 (r35073)
@@ -104,7 +104,6 @@
#define IDFILE_SAVE 72
#define IDHELP_ABOUT 73
#define IDSUBTITLE_OPEN 74
-#define IDPLAYDISK 75
#define ID_CONSOLE 76
#define ID_EQ0 77
#define ID_EQ1 78
@@ -121,6 +120,9 @@
#define ID_MUTE 89
#define ID_FULLSCREEN 90
#define ID_IDLE 91
+/* support for 64 drives */
+#define IDPLAYDISK 100
+#define IDPLAYDISK_LIMIT 164
/* gtk emulation */
#define GTK_MB_FATAL 0x1
Modified: trunk/gui/win32/gui.c
==============================================================================
--- trunk/gui/win32/gui.c Fri Aug 10 23:12:02 2012 (r35072)
+++ trunk/gui/win32/gui.c Sat Aug 11 15:02:58 2012 (r35073)
@@ -887,7 +887,7 @@ static LRESULT CALLBACK EventProc(HWND h
strcat(menuitem, volname);
}
AppendMenu(gui->diskmenu, flags, IDPLAYDISK + cdromdrive, menuitem);
- cdromdrive++;
+ if (++cdromdrive == IDPLAYDISK_LIMIT - IDPLAYDISK) break;
}
pos += strlen(device + pos) + 1;
}
@@ -1029,7 +1029,7 @@ static LRESULT CALLBACK EventProc(HWND h
handlemsg(hWnd, evAbout);
break;
}
- if((IDPLAYDISK <= LOWORD(wParam)) && (LOWORD(wParam) < (IDPLAYDISK + 100)))
+ if(LOWORD(wParam) >= IDPLAYDISK && LOWORD(wParam) < IDPLAYDISK_LIMIT)
{
char device[MAX_PATH];
char searchpath[MAX_PATH];
More information about the MPlayer-cvslog
mailing list