Start processing message in NewInput

(but there are no messages being delivered yet)
This commit is contained in:
deadwood 2024-03-25 14:50:47 +01:00
parent 79cb4dda5d
commit f6a3ac09fd
3 changed files with 46 additions and 4 deletions

View File

@ -6,6 +6,7 @@
#include <string.h>
#include "../include/exec/structures.h"
#include "../include/exec/proxy_structures.h"
#include "../include/exec/functions.h"
#include "../include/aros/cpu.h"
#include "../include/aros/proxy.h"
@ -249,11 +250,28 @@ MAKE_PROXY_ARG_4(OpenDevice)
struct MsgPortV0 * abiv0_CreateMsgPort(struct ExecBaseV0 *SysBaseV0)
{
bug("abiv0_CreateMsgPort: STUB\n");
return (struct MsgPortV0 *)0x6;
struct MsgPortProxy *proxy = abiv0_AllocMem(sizeof(struct MsgPortProxy), MEMF_CLEAR, SysBaseV0);
struct MsgPort *native = CreateMsgPort();
proxy->base.mp_SigBit = native->mp_SigBit;
proxy->native = native;
return (struct MsgPortV0 *)proxy;
}
MAKE_PROXY_ARG_1(CreateMsgPort)
struct MessageV0 * abiv0_GetMsg(struct MsgPortV0 *port, struct ExecBaseV0 *SysBaseV0)
{
bug("abiv0_GetMsg: STUB\n");
return NULL;
}
MAKE_PROXY_ARG_2(GetMsg)
ULONG abiv0_Wait(ULONG signalSet, struct ExecBaseV0 *SysBaseV0)
{
return Wait(signalSet);
}
MAKE_PROXY_ARG_2(Wait)
LONG abiv0_DoIO(struct IORequestV0 *IORequest, struct ExecBaseV0 *SysBaseV0)
{
bug("abiv0_DoIO: STUB\n");
@ -355,6 +373,8 @@ struct ExecBaseV0 *init_exec()
__AROS_SETVECADDRV0(abiv0SysBase, 39, execfunctable[38]); // Insert
__AROS_SETVECADDRV0(abiv0SysBase, 44, execfunctable[43]); // RemTail
__AROS_SETVECADDRV0(abiv0SysBase, 43, execfunctable[42]); // RemHead
__AROS_SETVECADDRV0(abiv0SysBase, 62, (APTR32)(IPTR)proxy_GetMsg);
__AROS_SETVECADDRV0(abiv0SysBase, 53, (APTR32)(IPTR)proxy_Wait);
return abiv0SysBase;
}

View File

@ -0,0 +1,12 @@
#ifndef ABIV0_EXEC_PROXY_STRUCTURES_H
#define ABIV0_EXEC_PROXY_STRUCTURES_H
#include "./structures.h"
struct MsgPortProxy
{
struct MsgPortV0 base;
struct MsgPort *native;
};
#endif

View File

@ -6,6 +6,7 @@
#include <string.h>
#include "../include/exec/structures.h"
#include "../include/exec/proxy_structures.h"
#include "../include/exec/functions.h"
#include "../include/aros/cpu.h"
#include "../include/aros/proxy.h"
@ -172,6 +173,10 @@ struct WindowV0 *abiv0_OpenWindowTagList(APTR /*struct NewWindowV0 **/newWindow,
proxy->base.BorderBottom = wndnative->BorderBottom;
proxy->base.Width = wndnative->Width;
proxy->base.Height = wndnative->Height;
proxy->base.MaxHeight = wndnative->MaxHeight;
proxy->base.MinHeight = wndnative->MinHeight;
proxy->base.MaxWidth = wndnative->MaxWidth;
proxy->base.MinWidth = wndnative->MinWidth;
proxy->base.GZZHeight = wndnative->GZZHeight;
proxy->base.GZZWidth = wndnative->GZZWidth;
@ -191,8 +196,13 @@ MAKE_PROXY_ARG_6(WindowLimits)
BOOL abiv0_ModifyIDCMP(struct WindowV0 *window, ULONG flags, struct LibraryV0 *IntuitionBaseV0)
{
struct WindowProxy *proxy = (struct WindowProxy *)window;
return ModifyIDCMP(proxy->native, flags);
struct WindowProxy *winproxy = (struct WindowProxy *)window;
struct MsgPortProxy *msgpproxy = (struct MsgPortProxy *)(IPTR)winproxy->base.UserPort;
if (msgpproxy != NULL)
{
winproxy->native->UserPort = msgpproxy->native;
}
return ModifyIDCMP(winproxy->native, flags);
}
MAKE_PROXY_ARG_2(ModifyIDCMP);