From 10627dccfa51eefccc6aa2a468f3a2fa246e88b6 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sat, 16 Jul 2011 16:23:34 +1000 Subject: CGE: Fix the selection of menu items to call appropriate dispatch method --- engines/cge/vmenu.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'engines/cge/vmenu.cpp') diff --git a/engines/cge/vmenu.cpp b/engines/cge/vmenu.cpp index f802916657..0c0e1fb855 100644 --- a/engines/cge/vmenu.cpp +++ b/engines/cge/vmenu.cpp @@ -127,6 +127,7 @@ Vmenu::~Vmenu() { _addr = NULL; } +#define CALL_MEMBER_FN(object,ptrToMember) ((object).*(ptrToMember)) void Vmenu::touch(uint16 mask, int x, int y) { uint16 h = FONT_HIG + TEXT_LS; @@ -150,8 +151,9 @@ void Vmenu::touch(uint16 mask, int x, int y) { if (ok && (mask & L_UP)) { _items = 0; SNPOST_(SNKILL, -1, 0, this); - //_menu[_recent = n].Proc(); - warning("Missing call to proc()"); + _recent = n; + assert(_menu[n].Proc); + CALL_MEMBER_FN(*_vm, _menu[n].Proc)(); } } } -- cgit v1.2.3