citra_qt: record movie record/playback path
This commit is contained in:
parent
3b459f6eb3
commit
9d056282df
|
@ -230,6 +230,8 @@ void Config::ReadValues() {
|
|||
qt_config->beginGroup("Paths");
|
||||
UISettings::values.roms_path = ReadSetting("romsPath").toString();
|
||||
UISettings::values.symbols_path = ReadSetting("symbolsPath").toString();
|
||||
UISettings::values.movie_record_path = ReadSetting("movieRecordPath").toString();
|
||||
UISettings::values.movie_playback_path = ReadSetting("moviePlaybackPath").toString();
|
||||
UISettings::values.game_dir_deprecated = ReadSetting("gameListRootDir", ".").toString();
|
||||
UISettings::values.game_dir_deprecated_deepscan =
|
||||
ReadSetting("gameListDeepScan", false).toBool();
|
||||
|
@ -461,6 +463,8 @@ void Config::SaveValues() {
|
|||
qt_config->beginGroup("Paths");
|
||||
WriteSetting("romsPath", UISettings::values.roms_path);
|
||||
WriteSetting("symbolsPath", UISettings::values.symbols_path);
|
||||
WriteSetting("movieRecordPath", UISettings::values.movie_record_path);
|
||||
WriteSetting("moviePlaybackPath", UISettings::values.movie_playback_path);
|
||||
qt_config->beginWriteArray("gamedirs");
|
||||
for (int i = 0; i < UISettings::values.game_dirs.size(); ++i) {
|
||||
qt_config->setArrayIndex(i);
|
||||
|
|
|
@ -764,15 +764,7 @@ void GMainWindow::BootGame(const QString& filename) {
|
|||
|
||||
void GMainWindow::ShutdownGame() {
|
||||
discord_rpc->Pause();
|
||||
|
||||
const bool was_recording = Core::Movie::GetInstance().IsRecordingInput();
|
||||
Core::Movie::GetInstance().Shutdown();
|
||||
if (was_recording) {
|
||||
QMessageBox::information(this, "Movie Saved", "The movie is successfully saved.");
|
||||
ui.action_Record_Movie->setEnabled(true);
|
||||
ui.action_Play_Movie->setEnabled(true);
|
||||
ui.action_Stop_Recording_Playback->setEnabled(false);
|
||||
}
|
||||
OnStopRecordingPlayback();
|
||||
emu_thread->RequestStop();
|
||||
|
||||
// Release emu threads from any breakpoints
|
||||
|
@ -1252,9 +1244,11 @@ void GMainWindow::OnCreateGraphicsSurfaceViewer() {
|
|||
|
||||
void GMainWindow::OnRecordMovie() {
|
||||
const QString path =
|
||||
QFileDialog::getSaveFileName(this, tr("Record Movie"), "", tr("Citra TAS Movie (*.ctm)"));
|
||||
QFileDialog::getSaveFileName(this, tr("Record Movie"), UISettings::values.movie_record_path,
|
||||
tr("Citra TAS Movie (*.ctm)"));
|
||||
if (path.isEmpty())
|
||||
return;
|
||||
UISettings::values.movie_record_path = QFileInfo(path).path();
|
||||
if (emulation_running) {
|
||||
Core::Movie::GetInstance().StartRecording(path.toStdString());
|
||||
} else {
|
||||
|
@ -1311,9 +1305,11 @@ bool GMainWindow::ValidateMovie(const QString& path, u64 program_id) {
|
|||
|
||||
void GMainWindow::OnPlayMovie() {
|
||||
const QString path =
|
||||
QFileDialog::getOpenFileName(this, tr("Play Movie"), "", tr("Citra TAS Movie (*.ctm)"));
|
||||
QFileDialog::getOpenFileName(this, tr("Play Movie"), UISettings::values.movie_playback_path,
|
||||
tr("Citra TAS Movie (*.ctm)"));
|
||||
if (path.isEmpty())
|
||||
return;
|
||||
UISettings::values.movie_playback_path = QFileInfo(path).path();
|
||||
|
||||
if (emulation_running) {
|
||||
if (!ValidateMovie(path))
|
||||
|
|
|
@ -63,6 +63,8 @@ struct Values {
|
|||
|
||||
QString roms_path;
|
||||
QString symbols_path;
|
||||
QString movie_record_path;
|
||||
QString movie_playback_path;
|
||||
QString game_dir_deprecated;
|
||||
bool game_dir_deprecated_deepscan;
|
||||
QList<UISettings::GameDir> game_dirs;
|
||||
|
|
Reference in New Issue