REDIVIVUS

Proposals / #926

Mac DIALOG_HandleEscapeKeyEvent: __fastcc void (D2UIMouseMsgStrc * pMsg, BOOL bRunCancelCallback)

applied · by KierTaylor · submitted 2026-11-02, applied 2026-11-02

Ghidra vmac 111 · 3c6740e

Mac body: ECX is the UI message (writes +0x18 = 1, +0x1c = 0, then passes it to the message-done call); EDX (ESI) is a flag: when non-zero it calls the active dialog's cancel callback at +0x60; no stack arguments, RET / tail JMP. INPUT_DialogConfirm tail-jumps here with ECX = message, EDX = 1 (0x000a48cc/0x000a48ce). Windows twin DIALOG_HandleEscapeKeyEvent 0x004b7570 takes (int32_t nParam, D2UIMouseMsgStrc * pMsg); the Mac order puts the message first.

Changes 1, applied together

  1. Set prototype mac 0x000a4bc8

    signatureundefined DIALOG_HandleEscapeKeyEvent(void)→void DIALOG_HandleEscapeKeyEvent(D2UIMouseMsgStrc * pMsg, BOOL bRunCancelCallback)
    conventionunknown→__fastcc