MAMEWorld >> Programming
View all threads Index   Flat Mode Flat  

Bryan Ischo
MAME Fan
Reged: 03/28/10
Posts: 358
Send PM
Re: IPT_TILT1 through IPT_TILT4 - is there any reason for these?
06/13/12 12:56 AM



> I'm currently dealing with the fact that it seems that you can no longer get the name
> of a button that was given in the port definition macro for "core" input port types
> unless you have a running machine. Which makes no sense.

In particular, this seems like pretty bad C++ style:

(from device.h, device_t definition):

public:
// getters
running_machine &machine() const { assert(m_machine != NULL); return *m_machine; }

Returning a value as a reference when it is valid for the value to be NULL (as it is before the device has had set_machine() called on it, which is true before a machine has been created and set into the device by set_machine()), but using an assert, is pretty bad.







Entire thread
Subject Posted by Posted on
* IPT_TILT1 through IPT_TILT4 - is there any reason for these? Bryan Ischo 06/12/12 09:28 PM
. * Re: IPT_TILT1 through IPT_TILT4 - is there any reason for these? R. Belmont  06/13/12 12:27 AM
. * Re: IPT_TILT1 through IPT_TILT4 - is there any reason for these? jonwil  06/19/12 09:49 AM
. * Re: IPT_TILT1 through IPT_TILT4 - is there any reason for these? SailorSat  06/27/12 06:09 PM
. * Re: IPT_TILT1 through IPT_TILT4 - is there any reason for these? R. Belmont  06/22/12 04:20 PM
. * Re: IPT_TILT1 through IPT_TILT4 - is there any reason for these? Bryan Ischo  06/13/12 12:50 AM
. * Re: IPT_TILT1 through IPT_TILT4 - is there any reason for these? Bryan Ischo  06/13/12 12:56 AM
. * Re: IPT_TILT1 through IPT_TILT4 - is there any reason for these? Olivier Galibert  06/13/12 06:34 AM
. * Re: IPT_TILT1 through IPT_TILT4 - is there any reason for these? Bryan Ischo  06/13/12 06:51 AM

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