From 344063afb6a0ce09d777b7b8f688fe16c0942179 Mon Sep 17 00:00:00 2001 From: Ingo Paschke Date: Mon, 11 May 2026 17:14:10 +0200 Subject: [PATCH] Amiga: route non-menu messages from DoMenuScroll to ProcessMessage DoMenuScroll dropped IDCMP messages for non-owner windows -- so a resize of WIN_INVEN or close-gadget on WIN_OVER during a menu never reached the game state. Forward those to ProcessMessage; VANILLAKEY/RAWKEY stay with the menu. --- sys/amiga/amiwind.c | 4 ++-- sys/amiga/winamenu.c | 8 +++++--- sys/amiga/winproto.h | 1 + 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/sys/amiga/amiwind.c b/sys/amiga/amiwind.c index 7cb1dcc88..d259d5128 100644 --- a/sys/amiga/amiwind.c +++ b/sys/amiga/amiwind.c @@ -17,7 +17,7 @@ static struct Message *GetFMsg(struct MsgPort *); #endif static int BufferGetchar(void); -static void ProcessMessage(struct IntuiMessage *message); +void ProcessMessage(struct IntuiMessage *message); #define BufferQueueChar(ch) (KbdBuffer[KbdBuffered++] = (ch)) @@ -354,7 +354,7 @@ ConvertKey(struct IntuiMessage *message) * ahead of input demands, when the user types ahead. */ -static void +void ProcessMessage(struct IntuiMessage *message) { int c; diff --git a/sys/amiga/winamenu.c b/sys/amiga/winamenu.c index 828ccb4b7..19d439563 100644 --- a/sys/amiga/winamenu.c +++ b/sys/amiga/winamenu.c @@ -463,11 +463,13 @@ DoMenuScroll(int win, int blocking, int how, menu_item **retmip) mx = imsg->MouseX; my = imsg->MouseY; - /* Only do our window or VANILLAKEY from other windows */ - + /* Only do our window or VANILLAKEY from other windows. + * Background events (NEWSIZE on inventory, CLOSEWINDOW + * on overview, etc.) get routed to the main dispatcher + * so the game stays in sync. ProcessMessage ReplyMsgs. */ if (imsg->IDCMPWindow != w && class != VANILLAKEY && class != RAWKEY) { - ReplyMsg((struct Message *) imsg); + ProcessMessage(imsg); continue; } diff --git a/sys/amiga/winproto.h b/sys/amiga/winproto.h index 51e4f26b8..831db69a3 100644 --- a/sys/amiga/winproto.h +++ b/sys/amiga/winproto.h @@ -53,6 +53,7 @@ void SetPropInfo(struct Window *win, struct Gadget *gad, long vis, long total, struct Window *OpenShWindow(struct NewWindow *nw); void CloseShWindow(struct Window *win); int ConvertKey(struct IntuiMessage *message); +void ProcessMessage(struct IntuiMessage *message); int kbhit(void); int amikbhit(void); int WindowGetchar(void);