Qt: Implement context menu in game list

This commit is contained in:
Connor McLaughlin
2020-03-02 11:08:16 +10:00
parent 0c40903f74
commit 69f03959aa
12 changed files with 305 additions and 91 deletions

View File

@ -47,7 +47,9 @@ static int Run(int argc, char* argv[])
// boot/load state
if (boot_filename)
{
if (host_interface->BootSystemFromFile(boot_filename) && state_index.has_value())
SystemBootParameters boot_params;
boot_params.filename = boot_filename;
if (host_interface->BootSystem(boot_params) && state_index.has_value())
host_interface->LoadState(state_is_global, state_index.value());
}
else if (state_index.has_value())

View File

@ -673,7 +673,10 @@ void SDLHostInterface::DrawMainMenuBar()
}
if (ImGui::MenuItem("Start BIOS", nullptr, false, !system_enabled))
{
RunLater([this]() { BootSystemFromBIOS(); });
RunLater([this]() {
SystemBootParameters boot_params;
BootSystem(boot_params);
});
ClearImGuiFocus();
}
@ -995,7 +998,10 @@ void SDLHostInterface::DrawPoweredOffWindow()
ImGui::SetCursorPosX(button_left);
if (ImGui::Button("Start BIOS", button_size))
{
RunLater([this]() { BootSystemFromFile(nullptr); });
RunLater([this]() {
SystemBootParameters boot_params;
BootSystem(boot_params);
});
ClearImGuiFocus();
}
ImGui::NewLine();
@ -1372,7 +1378,10 @@ void SDLHostInterface::DoStartDisc()
return;
AddFormattedOSDMessage(2.0f, "Starting disc from '%s'...", path);
BootSystemFromFile(path);
SystemBootParameters boot_params;
boot_params.filename = path;
BootSystem(boot_params);
}
void SDLHostInterface::DoChangeDisc()