ui: Allow clicking snapshot Create button without name

This commit is contained in:
Matt Borgerson 2023-06-03 22:22:24 -07:00 committed by mborgerson
parent f62bfc95e3
commit d7cbda5081

View File

@ -944,8 +944,8 @@ void MainMenuSnapshotsView::Draw()
}
ImGui::SameLine();
if (ImGui::Button(snapshot_with_create_name_exists ? "Save" : "Create") && !m_create_buf.empty()) {
xemu_snapshots_save(m_create_buf.c_str(), NULL);
if (ImGui::Button(snapshot_with_create_name_exists ? "Save" : "Create")) {
xemu_snapshots_save(m_create_buf.empty() ? NULL : m_create_buf.c_str(), NULL);
m_create_buf.clear();
}