MAMEWorld >> Programming
Previous thread Previous  View all threads Index   Next thread Next   Flat Mode Flat  

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));"?
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)?







Entire thread
Subject Posted by Posted on
* How to understand "machine.add_notifier(MACHINE_NOTIFY_PAU SE, machine_notify_delegate(FUNC(output_paus e), &machine));"? lxd 04/12/14 06:16 PM
. * Re: How to understand "machine.add_notifier(MACHINE_NOTIFY_PAU SE, machine_notify_delegate(FUNC(output_paus e), &machine));"? lxd  04/15/14 09:19 PM

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