From d94e861a784af9c5fc5223f0857fd3d6d83ab5fa Mon Sep 17 00:00:00 2001 From: Tokman5 Date: Thu, 12 Jan 2023 18:30:39 +0900 Subject: [PATCH] GS: Add video folder and support additional arguments for video dumping --- pcsx2-qt/MainWindow.cpp | 4 +- pcsx2-qt/Settings/GraphicsSettingsWidget.cpp | 30 +++- pcsx2-qt/Settings/GraphicsSettingsWidget.h | 3 +- pcsx2-qt/Settings/GraphicsSettingsWidget.ui | 177 ++++++++++++++----- pcsx2/Config.h | 7 +- pcsx2/Frontend/FullscreenUI.cpp | 3 +- pcsx2/Frontend/HostSettings.cpp | 10 +- pcsx2/GS/GS.cpp | 4 +- pcsx2/GS/GS.h | 3 +- pcsx2/GS/GSCapture.cpp | 33 +++- pcsx2/GS/Renderers/Common/GSRenderer.cpp | 21 ++- pcsx2/Pcsx2Config.cpp | 12 +- 12 files changed, 243 insertions(+), 64 deletions(-) diff --git a/pcsx2-qt/MainWindow.cpp b/pcsx2-qt/MainWindow.cpp index 9117342303..21fce6b06a 100644 --- a/pcsx2-qt/MainWindow.cpp +++ b/pcsx2-qt/MainWindow.cpp @@ -1,5 +1,5 @@ /* PCSX2 - PS2 Emulator for PCs - * Copyright (C) 2002-2022 PCSX2 Dev Team + * Copyright (C) 2002-2023 PCSX2 Dev Team * * PCSX2 is free software: you can redistribute it and/or modify it under the terms * of the GNU Lesser General Public License as published by the Free Software Found- @@ -966,7 +966,7 @@ void MainWindow::onToolsVideoCaptureToggled(bool checked) Host::GetStringSettingValue("EmuCore/GS", "VideoCaptureContainer", Pcsx2Config::GSOptions::DEFAULT_VIDEO_CAPTURE_CONTAINER))); const QString filter(tr("%1 Files (*.%2)").arg(container.toUpper()).arg(container)); - QString path(QStringLiteral("%1.%2").arg(QString::fromStdString(GSGetBaseSnapshotFilename())).arg(container)); + QString path(QStringLiteral("%1.%2").arg(QString::fromStdString(GSGetBaseVideoFilename())).arg(container)); path = QFileDialog::getSaveFileName(this, tr("Video Capture"), path, filter); if (path.isEmpty()) { diff --git a/pcsx2-qt/Settings/GraphicsSettingsWidget.cpp b/pcsx2-qt/Settings/GraphicsSettingsWidget.cpp index 293ba70444..86ce44ecd9 100644 --- a/pcsx2-qt/Settings/GraphicsSettingsWidget.cpp +++ b/pcsx2-qt/Settings/GraphicsSettingsWidget.cpp @@ -1,5 +1,5 @@ /* PCSX2 - PS2 Emulator for PCs - * Copyright (C) 2002-2022 PCSX2 Dev Team + * Copyright (C) 2002-2023 PCSX2 Dev Team * * PCSX2 is free software: you can redistribute it and/or modify it under the terms * of the GNU Lesser General Public License as published by the Free Software Found- @@ -321,13 +321,21 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsDialog* dialog, QWidget* m_ui.videoCaptureContainer->addItem(name.toUpper(), name); } + SettingWidgetBinder::BindWidgetToFolderSetting(sif, m_ui.videoDumpingDirectory, m_ui.videoDumpingDirectoryBrowse, m_ui.videoDumpingDirectoryOpen, m_ui.videoDumpingDirectoryReset, + "Folders", "Videos", Path::Combine(EmuFolders::DataRoot, "videos")); + SettingWidgetBinder::BindWidgetToStringSetting(sif, m_ui.videoCaptureContainer, "EmuCore/GS", "VideoCaptureContainer"); connect(m_ui.videoCaptureContainer, &QComboBox::currentIndexChanged, this, &GraphicsSettingsWidget::onVideoCaptureContainerChanged); SettingWidgetBinder::BindWidgetToIntSetting( sif, m_ui.videoCaptureBitrate, "EmuCore/GS", "VideoCaptureBitrate", Pcsx2Config::GSOptions::DEFAULT_VIDEO_CAPTURE_BITRATE); + SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.enableVideoCaptureArguments, "EmuCore/GS", "EnableVideoCaptureParameters", false); + SettingWidgetBinder::BindWidgetToStringSetting(sif, m_ui.videoCaptureArguments, "EmuCore/GS", "VideoCaptureParameters"); + connect(m_ui.enableVideoCaptureArguments, &QCheckBox::stateChanged, this, &GraphicsSettingsWidget::onEnableVideoCaptureArgumentsChanged); + onVideoCaptureContainerChanged(); + onEnableVideoCaptureArgumentsChanged(); } // Display tab @@ -417,8 +425,8 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsDialog* dialog, QWidget* tr("Control the number of Auto-CRC fixes and hacks applied to games.")); dialog->registerWidgetHelp(m_ui.blending, tr("Blending Accuracy"), tr("Basic (Recommended)"), - tr("Control the accuracy level of the GS blending unit emulation. " - "The higher the setting, the more blending is emulated in the shader accurately, and the higher the speed penalty will be. " + tr("Control the accuracy level of the GS blending unit emulation.
" + "The higher the setting, the more blending is emulated in the shader accurately, and the higher the speed penalty will be.
" "Do note that Direct3D's blending is reduced in capability compared to OpenGL/Vulkan")); dialog->registerWidgetHelp(m_ui.texturePreloading, tr("Texture Preloading"), tr("Full (Hash Cache)"), @@ -605,6 +613,16 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsDialog* dialog, QWidget* tr("Checked"), tr("Displays warnings when settings are enabled which may break games.")); } + // Recording tab + { + dialog->registerWidgetHelp(m_ui.enableVideoCaptureArguments, tr("Enable Extra Arguments"), tr("Unchecked"), tr("")); + + dialog->registerWidgetHelp(m_ui.videoCaptureArguments, tr("Extra Arguments"), tr("Leave It Blank"), + tr("Parameters passed to selected video codec.
" + "You must use '=' to separate key from value and ':' to separate two pairs from each other.
" + "For example: \"crf = 21 : preset = veryfast\"")); + } + // Advanced tab { dialog->registerWidgetHelp(m_ui.overrideTextureBarriers, tr("Override Texture Barriers"), tr("Automatic (Default)"), tr("")); @@ -741,6 +759,12 @@ void GraphicsSettingsWidget::onVideoCaptureContainerChanged() m_dialog->getSettingsInterface(), m_ui.videoCaptureCodec, "EmuCore/GS", "VideoCaptureCodec"); } +void GraphicsSettingsWidget::onEnableVideoCaptureArgumentsChanged() +{ + const bool enabled = m_dialog->getEffectiveBoolValue("EmuCore/GS", "EnableVideoCaptureParameters", false); + m_ui.videoCaptureArguments->setEnabled(enabled); +} + void GraphicsSettingsWidget::onGpuPaletteConversionChanged(int state) { const bool enabled = state == Qt::CheckState::PartiallyChecked ? Host::GetBaseBoolSettingValue("EmuCore/GS", "paltex", false) : state; diff --git a/pcsx2-qt/Settings/GraphicsSettingsWidget.h b/pcsx2-qt/Settings/GraphicsSettingsWidget.h index 9d9d298313..39f97c2517 100644 --- a/pcsx2-qt/Settings/GraphicsSettingsWidget.h +++ b/pcsx2-qt/Settings/GraphicsSettingsWidget.h @@ -1,5 +1,5 @@ /* PCSX2 - PS2 Emulator for PCs - * Copyright (C) 2002-2022 PCSX2 Dev Team + * Copyright (C) 2002-2023 PCSX2 Dev Team * * PCSX2 is free software: you can redistribute it and/or modify it under the terms * of the GNU Lesser General Public License as published by the Free Software Found- @@ -44,6 +44,7 @@ private Q_SLOTS: void onFullscreenModeChanged(int index); void onShadeBoostChanged(); void onVideoCaptureContainerChanged(); + void onEnableVideoCaptureArgumentsChanged(); private: GSRendererType getEffectiveRenderer() const; diff --git a/pcsx2-qt/Settings/GraphicsSettingsWidget.ui b/pcsx2-qt/Settings/GraphicsSettingsWidget.ui index 3872dc5c28..93ec5e5a93 100644 --- a/pcsx2-qt/Settings/GraphicsSettingsWidget.ui +++ b/pcsx2-qt/Settings/GraphicsSettingsWidget.ui @@ -1649,6 +1649,143 @@ + + + Recording + + + + + + Video Dumping Directory + + + + + + + + + + + + Browse... + + + + + + + Open... + + + + + + + Reset + + + + + + + + + + + + Capture Options + + + + + + Video Codec: + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + Container: + + + + + + + + + + Bitrate: + + + + + + + kbps + + + 100 + + + 100000 + + + 100 + + + + + + + + + Enable Extra Arguments + + + + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + Advanced @@ -1742,46 +1879,6 @@ - - - - Video Capture Codec: - - - - - - - - - - - - - - - Bitrate: - - - - - - - kbps - - - 100 - - - 100000 - - - 100 - - - - - diff --git a/pcsx2/Config.h b/pcsx2/Config.h index 669e6dd6fd..a88090bdf4 100644 --- a/pcsx2/Config.h +++ b/pcsx2/Config.h @@ -1,5 +1,5 @@ /* PCSX2 - PS2 Emulator for PCs - * Copyright (C) 2002-2021 PCSX2 Dev Team + * Copyright (C) 2002-2023 PCSX2 Dev Team * * PCSX2 is free software: you can redistribute it and/or modify it under the terms * of the GNU Lesser General Public License as published by the Free Software Found- @@ -679,7 +679,8 @@ struct Pcsx2Config DumpPaletteTextures : 1, LoadTextureReplacements : 1, LoadTextureReplacementsAsync : 1, - PrecacheTextureReplacements : 1; + PrecacheTextureReplacements : 1, + EnableVideoCaptureParameters : 1; }; }; @@ -755,6 +756,7 @@ struct Pcsx2Config std::string VideoCaptureContainer{DEFAULT_VIDEO_CAPTURE_CONTAINER}; std::string VideoCaptureCodec; int VideoCaptureBitrate{DEFAULT_VIDEO_CAPTURE_BITRATE}; + std::string VideoCaptureParameters; std::string Adapter; std::string HWDumpDirectory; @@ -1309,6 +1311,7 @@ namespace EmuFolders extern std::string GameSettings; extern std::string Textures; extern std::string InputProfiles; + extern std::string Videos; // Assumes that AppRoot and DataRoot have been initialized. void SetDefaults(SettingsInterface& si); diff --git a/pcsx2/Frontend/FullscreenUI.cpp b/pcsx2/Frontend/FullscreenUI.cpp index 83c2ebba2c..685483c3fa 100644 --- a/pcsx2/Frontend/FullscreenUI.cpp +++ b/pcsx2/Frontend/FullscreenUI.cpp @@ -1,5 +1,5 @@ /* PCSX2 - PS2 Emulator for PCs - * Copyright (C) 2002-2022 PCSX2 Dev Team + * Copyright (C) 2002-2023 PCSX2 Dev Team * * PCSX2 is free software: you can redistribute it and/or modify it under the terms * of the GNU Lesser General Public License as published by the Free Software Found- @@ -4065,6 +4065,7 @@ void FullscreenUI::DrawFoldersSettingsPage() DrawFolderSetting(bsi, ICON_FA_TV " Widescreen Cheats Directory", "Folders", "CheatsWS", EmuFolders::CheatsWS); DrawFolderSetting(bsi, ICON_FA_MAGIC " No-Interlace Cheats Directory", "Folders", "CheatsNI", EmuFolders::CheatsNI); DrawFolderSetting(bsi, ICON_FA_SLIDERS_H "Texture Replacements Directory", "Folders", "Textures", EmuFolders::Textures); + DrawFolderSetting(bsi, ICON_FA_SLIDERS_H "Video Dumping Directory", "Folders", "Videos", EmuFolders::Videos); EndMenuButtons(); } diff --git a/pcsx2/Frontend/HostSettings.cpp b/pcsx2/Frontend/HostSettings.cpp index c99fce06cf..eac5ae2243 100644 --- a/pcsx2/Frontend/HostSettings.cpp +++ b/pcsx2/Frontend/HostSettings.cpp @@ -1,5 +1,5 @@ /* PCSX2 - PS2 Emulator for PCs - * Copyright (C) 2002-2021 PCSX2 Dev Team + * Copyright (C) 2002-2023 PCSX2 Dev Team * * PCSX2 is free software: you can redistribute it and/or modify it under the terms * of the GNU Lesser General Public License as published by the Free Software Found- @@ -224,6 +224,7 @@ void Host::Internal::UpdateEmuFolders() const std::string old_cheats_ni_directory(EmuFolders::CheatsNI); const std::string old_memcards_directory(EmuFolders::MemoryCards); const std::string old_textures_directory(EmuFolders::Textures); + const std::string old_videos_directory(EmuFolders::Videos); EmuFolders::LoadConfig(*GetBaseSettingsLayer()); EmuFolders::EnsureFoldersExist(); @@ -250,5 +251,12 @@ void Host::Internal::UpdateEmuFolders() GSTextureReplacements::ReloadReplacementMap(); }); } + + if (EmuFolders::Videos != old_videos_directory) + { + if (VMManager::HasValidVM()) + GetMTGS().RunOnGSThread(&GSEndCapture); + } + } } diff --git a/pcsx2/GS/GS.cpp b/pcsx2/GS/GS.cpp index b572c2e25c..58f279b95f 100644 --- a/pcsx2/GS/GS.cpp +++ b/pcsx2/GS/GS.cpp @@ -1,5 +1,5 @@ /* PCSX2 - PS2 Emulator for PCs - * Copyright (C) 2002-2022 PCSX2 Dev Team + * Copyright (C) 2002-2023 PCSX2 Dev Team * * PCSX2 is free software: you can redistribute it and/or modify it under the terms * of the GNU Lesser General Public License as published by the Free Software Found- @@ -956,7 +956,7 @@ BEGIN_HOTKEY_LIST(g_gs_hotkeys) return; } - std::string filename(fmt::format("{}.{}", GSGetBaseSnapshotFilename(), GSConfig.VideoCaptureContainer)); + std::string filename(fmt::format("{}.{}", GSGetBaseVideoFilename(), GSConfig.VideoCaptureContainer)); g_gs_renderer->BeginCapture(std::move(filename)); }); } diff --git a/pcsx2/GS/GS.h b/pcsx2/GS/GS.h index 844b623531..de612fec1d 100644 --- a/pcsx2/GS/GS.h +++ b/pcsx2/GS/GS.h @@ -1,5 +1,5 @@ /* PCSX2 - PS2 Emulator for PCs - * Copyright (C) 2002-2021 PCSX2 Dev Team + * Copyright (C) 2002-2023 PCSX2 Dev Team * * PCSX2 is free software: you can redistribute it and/or modify it under the terms * of the GNU Lesser General Public License as published by the Free Software Found- @@ -69,6 +69,7 @@ void GSgifTransfer3(u8* mem, u32 size); void GSvsync(u32 field, bool registers_written); int GSfreeze(FreezeAction mode, freezeData* data); std::string GSGetBaseSnapshotFilename(); +std::string GSGetBaseVideoFilename(); void GSQueueSnapshot(const std::string& path, u32 gsdump_frames = 0); void GSStopGSDump(); bool GSBeginCapture(std::string filename); diff --git a/pcsx2/GS/GSCapture.cpp b/pcsx2/GS/GSCapture.cpp index 25dbd2088b..59c69ff550 100644 --- a/pcsx2/GS/GSCapture.cpp +++ b/pcsx2/GS/GSCapture.cpp @@ -1,5 +1,5 @@ /* PCSX2 - PS2 Emulator for PCs - * Copyright (C) 2002-2022 PCSX2 Dev Team + * Copyright (C) 2002-2023 PCSX2 Dev Team * * PCSX2 is free software: you can redistribute it and/or modify it under the terms * of the GNU Lesser General Public License as published by the Free Software Found- @@ -31,6 +31,7 @@ extern "C" { #include "libavcodec/version.h" #include "libavformat/avformat.h" #include "libavformat/version.h" +#include "libavutil/dict.h" #include "libavutil/version.h" #include "libswscale/swscale.h" #include "libswscale/version.h" @@ -76,7 +77,11 @@ extern "C" { X(av_frame_get_buffer) \ X(av_frame_free) \ X(av_strerror) \ - X(av_reduce) + X(av_reduce) \ + X(av_dict_get_string) \ + X(av_dict_parse_string) \ + X(av_dict_set) \ + X(av_dict_free) #define VISIT_SWSCALE_IMPORTS(X) \ X(sws_getCachedContext) \ @@ -104,6 +109,7 @@ static AVFrame* s_converted_frame = nullptr; // YUV static AVPacket* s_video_packet = nullptr; static s64 s_next_pts = 0; static SwsContext* s_sws_context = nullptr; +static AVDictionary* s_codec_arguments = nullptr; #define DECLARE_IMPORT(X) static decltype(X)* wrap_##X; VISIT_AVCODEC_IMPORTS(DECLARE_IMPORT); @@ -303,10 +309,22 @@ bool GSCapture::BeginCapture(float fps, GSVector2i recommendedResolution, float } } + s_codec_arguments = nullptr; + if (GSConfig.EnableVideoCaptureParameters) + { + res = wrap_av_dict_parse_string(&s_codec_arguments, GSConfig.VideoCaptureParameters.c_str(), "=", ":", 0); + if (res < 0) + { + LogAVError(res, "av_dict_parse_string() failed: "); + EndCapture(); + return false; + } + } + if (output_format->flags & AVFMT_GLOBALHEADER) s_codec_context->flags |= AV_CODEC_FLAG_GLOBAL_HEADER; - res = wrap_avcodec_open2(s_codec_context, codec, nullptr); + res = wrap_avcodec_open2(s_codec_context, codec, &s_codec_arguments); if (res < 0) { LogAVError(res, "avcodec_open2() failed: "); @@ -406,7 +424,7 @@ bool GSCapture::DeliverFrame(const void* bits, int pitch, bool rgba) s_converted_frame->pts = s_next_pts++; - int res = wrap_avcodec_send_frame(s_codec_context, s_converted_frame); + const int res = wrap_avcodec_send_frame(s_codec_context, s_converted_frame); if (res < 0) { LogAVError(res, "avcodec_send_frame() failed: "); @@ -456,7 +474,7 @@ bool GSCapture::EndCapture() std::lock_guard lock(s_lock); int res; - bool was_capturing = s_capturing; + const bool was_capturing = s_capturing; if (was_capturing) { @@ -504,6 +522,11 @@ bool GSCapture::EndCapture() wrap_avformat_free_context(s_format_context); s_format_context = nullptr; } + if (s_codec_arguments) + { + wrap_av_dict_free(&s_codec_arguments); + s_codec_arguments = nullptr; + } if (was_capturing) UnloadFFmpeg(); diff --git a/pcsx2/GS/Renderers/Common/GSRenderer.cpp b/pcsx2/GS/Renderers/Common/GSRenderer.cpp index a93177b819..263713a141 100644 --- a/pcsx2/GS/Renderers/Common/GSRenderer.cpp +++ b/pcsx2/GS/Renderers/Common/GSRenderer.cpp @@ -1,5 +1,5 @@ /* PCSX2 - PS2 Emulator for PCs - * Copyright (C) 2002-2021 PCSX2 Dev Team + * Copyright (C) 2002-2023 PCSX2 Dev Team * * PCSX2 is free software: you can redistribute it and/or modify it under the terms * of the GNU Lesser General Public License as published by the Free Software Found- @@ -799,7 +799,7 @@ void GSRenderer::VSync(u32 field, bool registers_written) { if (GSTexture* current = g_gs_device->GetCurrent()) { - GSVector2i size = GSCapture::GetSize(); + const GSVector2i size = GSCapture::GetSize(); bool res; GSTexture::GSMap m; @@ -836,7 +836,7 @@ void GSRenderer::QueueSnapshot(const std::string& path, u32 gsdump_frames) m_dump_frames = gsdump_frames; } -std::string GSGetBaseSnapshotFilename() +static std::string GSGetBaseFilename() { std::string filename; @@ -855,7 +855,7 @@ std::string GSGetBaseSnapshotFilename() filename += serial; } - time_t cur_time = time(nullptr); + const time_t cur_time = time(nullptr); char local_time[16]; if (strftime(local_time, sizeof(local_time), "%Y%m%d%H%M%S", localtime(&cur_time))) @@ -879,8 +879,19 @@ std::string GSGetBaseSnapshotFilename() prev_snap = cur_time; } + return filename; +} + +std::string GSGetBaseSnapshotFilename() +{ // prepend snapshots directory - return Path::Combine(EmuFolders::Snapshots, filename); + return Path::Combine(EmuFolders::Snapshots, GSGetBaseFilename()); +} + +std::string GSGetBaseVideoFilename() +{ + // prepend video directory + return Path::Combine(EmuFolders::Videos, GSGetBaseFilename()); } void GSRenderer::StopGSDump() diff --git a/pcsx2/Pcsx2Config.cpp b/pcsx2/Pcsx2Config.cpp index f2c733a004..9c83b44fdf 100644 --- a/pcsx2/Pcsx2Config.cpp +++ b/pcsx2/Pcsx2Config.cpp @@ -1,5 +1,5 @@ /* PCSX2 - PS2 Emulator for PCs - * Copyright (C) 2002-2021 PCSX2 Dev Team + * Copyright (C) 2002-2023 PCSX2 Dev Team * * PCSX2 is free software: you can redistribute it and/or modify it under the terms * of the GNU Lesser General Public License as published by the Free Software Found- @@ -103,6 +103,7 @@ namespace EmuFolders std::string GameSettings; std::string Textures; std::string InputProfiles; + std::string Videos; } // namespace EmuFolders void TraceLogFilters::LoadSave(SettingsWrapper& wrap) @@ -438,6 +439,8 @@ Pcsx2Config::GSOptions::GSOptions() LoadTextureReplacements = false; LoadTextureReplacementsAsync = true; PrecacheTextureReplacements = false; + + EnableVideoCaptureParameters = false; } bool Pcsx2Config::GSOptions::operator==(const GSOptions& right) const @@ -524,6 +527,7 @@ bool Pcsx2Config::GSOptions::OptionsAreEqual(const GSOptions& right) const OpEqu(VideoCaptureContainer) && OpEqu(VideoCaptureCodec) && OpEqu(VideoCaptureBitrate) && + OpEqu(VideoCaptureParameters) && OpEqu(Adapter) && @@ -645,6 +649,7 @@ void Pcsx2Config::GSOptions::LoadSave(SettingsWrapper& wrap) GSSettingBool(LoadTextureReplacements); GSSettingBool(LoadTextureReplacementsAsync); GSSettingBool(PrecacheTextureReplacements); + GSSettingBool(EnableVideoCaptureParameters); GSSettingIntEnumEx(LinearPresent, "linear_present_mode"); GSSettingIntEnumEx(InterlaceMode, "deinterlace_mode"); @@ -697,6 +702,7 @@ void Pcsx2Config::GSOptions::LoadSave(SettingsWrapper& wrap) GSSettingStringEx(VideoCaptureContainer, "VideoCaptureContainer"); GSSettingStringEx(VideoCaptureCodec, "VideoCaptureCodec"); GSSettingIntEx(VideoCaptureBitrate, "VideoCaptureBitrate"); + GSSettingStringEx(VideoCaptureParameters, "VideoCaptureParameters"); GSSettingString(Adapter); GSSettingString(HWDumpDirectory); @@ -1423,6 +1429,7 @@ void EmuFolders::SetDefaults(SettingsInterface& si) si.SetStringValue("Folders", "Cache", "cache"); si.SetStringValue("Folders", "Textures", "textures"); si.SetStringValue("Folders", "InputProfiles", "inputprofiles"); + si.SetStringValue("Folders", "Videos", "videos"); } static std::string LoadPathFromSettings(SettingsInterface& si, const std::string& root, const char* name, const char* def) @@ -1448,6 +1455,7 @@ void EmuFolders::LoadConfig(SettingsInterface& si) Cache = LoadPathFromSettings(si, DataRoot, "Cache", "cache"); Textures = LoadPathFromSettings(si, DataRoot, "Textures", "textures"); InputProfiles = LoadPathFromSettings(si, DataRoot, "InputProfiles", "inputprofiles"); + Videos = LoadPathFromSettings(si, DataRoot, "Videos", "videos"); Console.WriteLn("BIOS Directory: %s", Bios.c_str()); Console.WriteLn("Snapshots Directory: %s", Snapshots.c_str()); @@ -1462,6 +1470,7 @@ void EmuFolders::LoadConfig(SettingsInterface& si) Console.WriteLn("Cache Directory: %s", Cache.c_str()); Console.WriteLn("Textures Directory: %s", Textures.c_str()); Console.WriteLn("Input Profile Directory: %s", InputProfiles.c_str()); + Console.WriteLn("Video Dumping Directory: %s", Videos.c_str()); } bool EmuFolders::EnsureFoldersExist() @@ -1480,6 +1489,7 @@ bool EmuFolders::EnsureFoldersExist() result = FileSystem::CreateDirectoryPath(Cache.c_str(), false) && result; result = FileSystem::CreateDirectoryPath(Textures.c_str(), false) && result; result = FileSystem::CreateDirectoryPath(InputProfiles.c_str(), false) && result; + result = FileSystem::CreateDirectoryPath(Videos.c_str(), false) && result; return result; }