]> git.sesse.net Git - vlc/commitdiff
WinCE: emulate GetMenuState() function
authorPierre Ynard <linkfanel@yahoo.fr>
Tue, 12 Jan 2010 13:47:44 +0000 (14:47 +0100)
committerPierre Ynard <linkfanel@yahoo.fr>
Tue, 12 Jan 2010 13:47:44 +0000 (14:47 +0100)
This fixes video_output plugins on WinCE. Note that GetMenuState() is
considered as "superseded" by GetMenuItemInfo(), so it might be better
to just drop the former altogether.

modules/video_output/msw/events.c

index 36e10a34f4e05faa32f6295b9f09d141a048d8fb..f93a9210ec1294c55ba50a0ac0e8f3ca497032d8 100644 (file)
 #ifdef UNDER_CE
 #include <aygshell.h>
     //WINSHELLAPI BOOL WINAPI SHFullScreen(HWND hwndRequester, DWORD dwState);
+
+UINT GetMenuState(HMENU hMenu, UINT id, UINT flags)
+{
+    MENUITEMINFO info;
+    if (!GetMenuItemInfo(hMenu, id, (flags & MF_BYPOSITION) != 0, &info))
+        return -1;
+    /* XXX Submenu handling is missing... */
+    return info.fState;
+}
 #endif
 
 /*#if defined(UNDER_CE) && !defined(__PLUGIN__) --FIXME*/