citra_qt: Rebuilt movie frontend

This is completely rebuilt, in order to allow setting author, displaying movie metadata, and toggling read-only mode.

The UX is changed to more closely match other emulators' behaviour. Now you can only record/play from start/reset (In the future, we might want to introduce 'record from savestate')

Also fixed a critical bug where movie file can be corrupted when ending the recording while game is still running.
This commit is contained in:
zhupengfei 2020-07-06 21:44:17 +08:00
parent 5a42a80f40
commit 113e0c7331
No known key found for this signature in database
GPG key ID: DD129E108BD09378
14 changed files with 541 additions and 151 deletions

View file

@ -722,17 +722,17 @@ void GameList::RefreshGameDirectory() {
}
}
QString GameList::FindGameByProgramID(u64 program_id) {
return FindGameByProgramID(item_model->invisibleRootItem(), program_id);
QString GameList::FindGameByProgramID(u64 program_id, int role) {
return FindGameByProgramID(item_model->invisibleRootItem(), program_id, role);
}
QString GameList::FindGameByProgramID(QStandardItem* current_item, u64 program_id) {
QString GameList::FindGameByProgramID(QStandardItem* current_item, u64 program_id, int role) {
if (current_item->type() == static_cast<int>(GameListItemType::Game) &&
current_item->data(GameListItemPath::ProgramIdRole).toULongLong() == program_id) {
return current_item->data(GameListItemPath::FullPathRole).toString();
return current_item->data(role).toString();
} else if (current_item->hasChildren()) {
for (int child_id = 0; child_id < current_item->rowCount(); child_id++) {
QString path = FindGameByProgramID(current_item->child(child_id, 0), program_id);
QString path = FindGameByProgramID(current_item->child(child_id, 0), program_id, role);
if (!path.isEmpty())
return path;
}