Making sure tape stops at end when playing (Apple1 for example), patch by Robbbert (no whatsnew)

This commit is contained in:
Miodrag Milanovic 2012-02-15 11:34:49 +00:00
parent 5e880d2887
commit e50e22bd14

View File

@ -384,4 +384,17 @@ void cassette_image_device::call_display()
/* draw the cassette */ /* draw the cassette */
ui_draw_text_box(&device().machine().render().ui_container(), buf, JUSTIFY_LEFT, x, y, UI_BACKGROUND_COLOR); ui_draw_text_box(&device().machine().render().ui_container(), buf, JUSTIFY_LEFT, x, y, UI_BACKGROUND_COLOR);
// make sure tape stops at end when playing
if ((m_state & CASSETTE_MASK_UISTATE) == CASSETTE_PLAY)
{
if ( m_cassette )
{
if (position > length)
{
m_state = (cassette_state)(( m_state & ~CASSETTE_MASK_UISTATE ) | CASSETTE_STOPPED);
position = length;
}
}
}
} }