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:
+2
-2
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user