mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
DolphinWX: Fix booting from DVD
OnBootDrive used the "drives" member std::vector for drive paths, but since PR #4363, this vector is not populated anymore, so we were accessing it out of bounds. Actually, drives was not needed in the first place, since we can get the wxMenu from the event, and from there, get the label directly.
This commit is contained in:
@ -733,7 +733,8 @@ void CFrame::StartGame(const std::string& filename)
|
||||
|
||||
void CFrame::OnBootDrive(wxCommandEvent& event)
|
||||
{
|
||||
BootGame(drives[event.GetId() - IDM_DRIVE1]);
|
||||
const auto* menu = static_cast<wxMenu*>(event.GetEventObject());
|
||||
BootGame(WxStrToStr(menu->GetLabelText(event.GetId())));
|
||||
}
|
||||
|
||||
void CFrame::OnRefresh(wxCommandEvent& WXUNUSED(event))
|
||||
|
Reference in New Issue
Block a user