Skip to content

show message when changing disks - #52

Open
Jamiras wants to merge 1 commit into
libretro:masterfrom
Jamiras:feature/disk_change_message
Open

show message when changing disks#52
Jamiras wants to merge 1 commit into
libretro:masterfrom
Jamiras:feature/disk_change_message

Conversation

@Jamiras

@Jamiras Jamiras commented Aug 26, 2026

Copy link
Copy Markdown

Provides feedback when using the shoulder buttons to change disks in FDS mode.

Comment thread Core/MessageManager.cpp
MessageManager::_messageManager->DisplayMessage(title, message);
} else {
MessageManager::Log("[" + title + "] " + message);
}

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copied some logic from the upstream repository to allow messages to actually be displayed instead of just logged.

https://github.com/SourMesen/Mesen/blob/e1180957b31979d4b82d613af9263fcb9442a685/Core/MessageManager.cpp#L832-L836

}
}

ReportDiskChange();

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The actual process of switching disks is to immediately eject the disk, then insert the new disk two seconds later.

//Eject disk on next frame, then insert new disk 2 seconds later

So, on button press, the "Ejected disk" message is shown and a bit is set on _currentDisk. While the bit is set, ReportDiskChange will check to see if the new disk has been inserted, then show a "Inserted disk" message and clear the bit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant