Turns out those 'redundant' NULL checks were there for a reason. Balls. No whatsnew.

This commit is contained in:
Ryan Holtz 2010-08-27 12:11:31 +00:00
parent af0b52857b
commit 44bbd47830

View File

@ -141,24 +141,36 @@ READ8_DEVICE_HANDLER_TRAMPOLINE(ins8154, ins8154_r)
switch (offset) switch (offset)
{ {
case 0x20: case 0x20:
val = devcb_call_read8(&m_in_a_func, 0); if(m_in_a_func.read != NULL)
{
val = devcb_call_read8(&m_in_a_func, 0);
}
m_in_a = val; m_in_a = val;
break; break;
case 0x21: case 0x21:
val = devcb_call_read8(&m_in_b_func, 0); if(m_in_b_func.read != NULL)
{
val = devcb_call_read8(&m_in_b_func, 0);
}
m_in_b = val; m_in_b = val;
break; break;
default: default:
if (offset < 0x08) if (offset < 0x08)
{ {
val = (devcb_call_read8(&m_in_a_func, 0) << (8 - offset)) & 0x80; if(m_in_a_func.read != NULL)
{
val = (devcb_call_read8(&m_in_a_func, 0) << (8 - offset)) & 0x80;
}
m_in_a = val; m_in_a = val;
} }
else else
{ {
val = (devcb_call_read8(&m_in_b_func, 0) << (8 - (offset >> 4))) & 0x80; if(m_in_b_func.read != NULL)
{
val = (devcb_call_read8(&m_in_b_func, 0) << (8 - (offset >> 4))) & 0x80;
}
m_in_b = val; m_in_b = val;
} }
break; break;