mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 13:50:03 +00:00 
			
		
		
		
	core/movie: Add MovieFinished mode
Also mentioned in Laws of TAS.
This commit is contained in:
		
							parent
							
								
									e188f86582
								
							
						
					
					
						commit
						1780f8b5b8
					
				
					 5 changed files with 35 additions and 24 deletions
				
			
		|  | @ -1892,7 +1892,8 @@ void GMainWindow::OnCloseMovie(bool shutting_down) { | |||
|             OnPauseGame(); | ||||
|         } | ||||
| 
 | ||||
|         const bool was_recording = Core::Movie::GetInstance().IsRecordingInput(); | ||||
|         const bool was_recording = | ||||
|             Core::Movie::GetInstance().GetPlayMode() == Core::Movie::PlayMode::Recording; | ||||
|         Core::Movie::GetInstance().Shutdown(); | ||||
|         if (was_recording) { | ||||
|             QMessageBox::information(this, tr("Movie Saved"), | ||||
|  | @ -1986,14 +1987,19 @@ void GMainWindow::UpdateStatusBar() { | |||
|     // Update movie status
 | ||||
|     const u64 current = Core::Movie::GetInstance().GetCurrentInputIndex(); | ||||
|     const u64 total = Core::Movie::GetInstance().GetTotalInputCount(); | ||||
|     if (Core::Movie::GetInstance().IsRecordingInput()) { | ||||
|     const auto play_mode = Core::Movie::GetInstance().GetPlayMode(); | ||||
|     if (play_mode == Core::Movie::PlayMode::Recording) { | ||||
|         message_label->setText(tr("Recording %1").arg(current)); | ||||
|         message_label->setVisible(true); | ||||
|         message_label_used_for_movie = true; | ||||
|     } else if (Core::Movie::GetInstance().IsPlayingInput()) { | ||||
|     } else if (play_mode == Core::Movie::PlayMode::Playing) { | ||||
|         message_label->setText(tr("Playing %1 / %2").arg(current).arg(total)); | ||||
|         message_label->setVisible(true); | ||||
|         message_label_used_for_movie = true; | ||||
|     } else if (play_mode == Core::Movie::PlayMode::MovieFinished) { | ||||
|         message_label->setText(tr("Movie Finished")); | ||||
|         message_label->setVisible(true); | ||||
|         message_label_used_for_movie = true; | ||||
|     } else if (message_label_used_for_movie) { // Clear the label if movie was just closed
 | ||||
|         message_label->setText(QString{}); | ||||
|         message_label->setVisible(false); | ||||
|  | @ -2291,7 +2297,6 @@ void GMainWindow::OnLanguageChanged(const QString& locale) { | |||
| 
 | ||||
| void GMainWindow::OnMoviePlaybackCompleted() { | ||||
|     QMessageBox::information(this, tr("Playback Completed"), tr("Movie playback completed.")); | ||||
|     ui->action_Close_Movie->setEnabled(false); | ||||
| } | ||||
| 
 | ||||
| void GMainWindow::UpdateWindowTitle() { | ||||
|  |  | |||
|  | @ -29,7 +29,7 @@ MoviePlayDialog::MoviePlayDialog(QWidget* parent, GameList* game_list_) | |||
|     if (Core::System::GetInstance().IsPoweredOn()) { | ||||
|         QString note_text; | ||||
|         note_text = tr("Current running game will be stopped."); | ||||
|         if (Core::Movie::GetInstance().IsRecordingInput()) { | ||||
|         if (Core::Movie::GetInstance().GetPlayMode() == Core::Movie::PlayMode::Recording) { | ||||
|             note_text.append(tr("<br>Current recording will be discarded.")); | ||||
|         } | ||||
|         ui->note2Label->setText(note_text); | ||||
|  |  | |||
|  | @ -25,7 +25,7 @@ MovieRecordDialog::MovieRecordDialog(QWidget* parent) | |||
|     QString note_text; | ||||
|     if (Core::System::GetInstance().IsPoweredOn()) { | ||||
|         note_text = tr("Current running game will be restarted."); | ||||
|         if (Core::Movie::GetInstance().IsRecordingInput()) { | ||||
|         if (Core::Movie::GetInstance().GetPlayMode() == Core::Movie::PlayMode::Recording) { | ||||
|             note_text.append(tr("<br>Current recording will be discarded.")); | ||||
|         } | ||||
|     } else { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue