mirror of
https://github.com/holub/mame
synced 2025-05-22 13:48:55 +03:00
Making sure tape stops at end when playing (Apple1 for example), patch by Robbbert (no whatsnew)
This commit is contained in:
parent
5e880d2887
commit
e50e22bd14
@ -384,4 +384,17 @@ void cassette_image_device::call_display()
|
||||
|
||||
/* draw the cassette */
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user