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.
This commit is contained in:
Ingo Paschke
2026-05-11 20:51:06 +02:00
parent 8dbbbc2fef
commit 344063afb6
3 changed files with 8 additions and 5 deletions
+2 -2
View File
@@ -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;
+5 -3
View File
@@ -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;
}
+1
View File
@@ -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);