mirror of
https://github.com/citra-emu/citra-nightly.git
synced 2024-12-25 17:55:38 +00:00
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");
|
qt_config->beginGroup("Paths");
|
||||||
UISettings::values.roms_path = ReadSetting("romsPath").toString();
|
UISettings::values.roms_path = ReadSetting("romsPath").toString();
|
||||||
UISettings::values.symbols_path = ReadSetting("symbolsPath").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 = ReadSetting("gameListRootDir", ".").toString();
|
||||||
UISettings::values.game_dir_deprecated_deepscan =
|
UISettings::values.game_dir_deprecated_deepscan =
|
||||||
ReadSetting("gameListDeepScan", false).toBool();
|
ReadSetting("gameListDeepScan", false).toBool();
|
||||||
|
@ -461,6 +463,8 @@ void Config::SaveValues() {
|
||||||
qt_config->beginGroup("Paths");
|
qt_config->beginGroup("Paths");
|
||||||
WriteSetting("romsPath", UISettings::values.roms_path);
|
WriteSetting("romsPath", UISettings::values.roms_path);
|
||||||
WriteSetting("symbolsPath", UISettings::values.symbols_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");
|
qt_config->beginWriteArray("gamedirs");
|
||||||
for (int i = 0; i < UISettings::values.game_dirs.size(); ++i) {
|
for (int i = 0; i < UISettings::values.game_dirs.size(); ++i) {
|
||||||
qt_config->setArrayIndex(i);
|
qt_config->setArrayIndex(i);
|
||||||
|
|
|
@ -764,15 +764,7 @@ void GMainWindow::BootGame(const QString& filename) {
|
||||||
|
|
||||||
void GMainWindow::ShutdownGame() {
|
void GMainWindow::ShutdownGame() {
|
||||||
discord_rpc->Pause();
|
discord_rpc->Pause();
|
||||||
|
OnStopRecordingPlayback();
|
||||||
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);
|
|
||||||
}
|
|
||||||
emu_thread->RequestStop();
|
emu_thread->RequestStop();
|
||||||
|
|
||||||
// Release emu threads from any breakpoints
|
// Release emu threads from any breakpoints
|
||||||
|
@ -1252,9 +1244,11 @@ void GMainWindow::OnCreateGraphicsSurfaceViewer() {
|
||||||
|
|
||||||
void GMainWindow::OnRecordMovie() {
|
void GMainWindow::OnRecordMovie() {
|
||||||
const QString path =
|
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())
|
if (path.isEmpty())
|
||||||
return;
|
return;
|
||||||
|
UISettings::values.movie_record_path = QFileInfo(path).path();
|
||||||
if (emulation_running) {
|
if (emulation_running) {
|
||||||
Core::Movie::GetInstance().StartRecording(path.toStdString());
|
Core::Movie::GetInstance().StartRecording(path.toStdString());
|
||||||
} else {
|
} else {
|
||||||
|
@ -1311,9 +1305,11 @@ bool GMainWindow::ValidateMovie(const QString& path, u64 program_id) {
|
||||||
|
|
||||||
void GMainWindow::OnPlayMovie() {
|
void GMainWindow::OnPlayMovie() {
|
||||||
const QString path =
|
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())
|
if (path.isEmpty())
|
||||||
return;
|
return;
|
||||||
|
UISettings::values.movie_playback_path = QFileInfo(path).path();
|
||||||
|
|
||||||
if (emulation_running) {
|
if (emulation_running) {
|
||||||
if (!ValidateMovie(path))
|
if (!ValidateMovie(path))
|
||||||
|
|
|
@ -63,6 +63,8 @@ struct Values {
|
||||||
|
|
||||||
QString roms_path;
|
QString roms_path;
|
||||||
QString symbols_path;
|
QString symbols_path;
|
||||||
|
QString movie_record_path;
|
||||||
|
QString movie_playback_path;
|
||||||
QString game_dir_deprecated;
|
QString game_dir_deprecated;
|
||||||
bool game_dir_deprecated_deepscan;
|
bool game_dir_deprecated_deepscan;
|
||||||
QList<UISettings::GameDir> game_dirs;
|
QList<UISettings::GameDir> game_dirs;
|
||||||
|
|
Loading…
Reference in a new issue