MAMEWorld >> Programming
View all threads Index   Threaded Mode Threaded  

Pages: 1

lxd
MAME Fan
Reged: 02/27/14
Posts: 25
Send PM


How to understand "machine.add_notifier(MACHINE_NOTIFY_PAU SE, machine_notify_delegate(FUNC(output_paus e), &machine));"?
#324589 - 04/12/14 06:16 PM


machine.add_notifier(MACHINE_NOTIFY_PAUSE, machine_notify_delegate(FUNC(output_pause), &machine));

"machine" is a object.

enum machine_notification
{
MACHINE_NOTIFY_FRAME,
MACHINE_NOTIFY_RESET,
MACHINE_NOTIFY_PAUSE,
MACHINE_NOTIFY_RESUME,
MACHINE_NOTIFY_EXIT,
MACHINE_NOTIFY_COUNT
};

typedef delegate<void ()> machine_notify_delegate;

#define FUNC(x) &x, #x

I know
FUNC(output_pause) = &output_pause,"output_pause"

How about
machine_notify_delegate(&output_pause,"output_pause",&machine)?

Is it delegate<void ()>(&output_pause,"output_pause",&machine)?



lxd
MAME Fan
Reged: 02/27/14
Posts: 25
Send PM


Re: How to understand "machine.add_notifier(MACHINE_NOTIFY_PAU SE, machine_notify_delegate(FUNC(output_paus e), &machine));"? new [Re: lxd]
#324748 - 04/15/14 09:19 PM


Yes, I have understood it now.


Pages: 1

MAMEWorld >> Programming
View all threads Index   Threaded Mode Threaded  

Extra information Permissions
Moderator:  Pi 
0 registered and 29 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 2852