Code: Formatting

This commit is contained in:
KamFretoZ 2024-08-05 16:08:30 +07:00 committed by lightningterror
parent 72034da6ac
commit fe3eab5815
3 changed files with 39 additions and 40 deletions

View File

@ -756,19 +756,19 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsWindow* dialog, QWidget*
{ {
dialog->registerWidgetHelp(m_ui.videoCaptureCodec, tr("Video Codec"), tr("Default"), tr("Selects which Video Codec to be used for Video Capture. " dialog->registerWidgetHelp(m_ui.videoCaptureCodec, tr("Video Codec"), tr("Default"), tr("Selects which Video Codec to be used for Video Capture. "
"<b>If unsure, leave it on default.<b>")); "<b>If unsure, leave it on default.<b>"));
dialog->registerWidgetHelp(m_ui.videoCaptureFormat, tr("Video Format"), tr("Default"), tr("Selects which Video Format to be used for Video Capture. If by chance the codec does not support the format, the first format available will be used. " dialog->registerWidgetHelp(m_ui.videoCaptureFormat, tr("Video Format"), tr("Default"), tr("Selects which Video Format to be used for Video Capture. If by chance the codec does not support the format, the first format available will be used. "
"<b>If unsure, leave it on default.<b>")); "<b>If unsure, leave it on default.<b>"));
dialog->registerWidgetHelp(m_ui.videoCaptureBitrate, tr("Video Bitrate"), tr("6000 kbps"), tr("Sets the video bitrate to be used. " dialog->registerWidgetHelp(m_ui.videoCaptureBitrate, tr("Video Bitrate"), tr("6000 kbps"), tr("Sets the video bitrate to be used. "
"Larger bitrate generally yields better video quality at the cost of larger resulting file size.")); "Larger bitrate generally yields better video quality at the cost of larger resulting file size."));
dialog->registerWidgetHelp(m_ui.videoCaptureResolutionAuto, tr("Automatic Resolution"), tr("Unchecked"), tr("When checked, the video capture resolution will follows the internal resolution of the running game.<br><br>" dialog->registerWidgetHelp(m_ui.videoCaptureResolutionAuto, tr("Automatic Resolution"), tr("Unchecked"), tr("When checked, the video capture resolution will follows the internal resolution of the running game.<br><br>"
"<b>Be careful when using this setting especially when you are upscaling, as higher internal resolution (above 4x) can results in very large video capture and can cause system overload.</b>")); "<b>Be careful when using this setting especially when you are upscaling, as higher internal resolution (above 4x) can results in very large video capture and can cause system overload.</b>"));
dialog->registerWidgetHelp(m_ui.enableVideoCaptureArguments, tr("Enable Extra Video Arguments"), tr("Unchecked"), tr("Allows you to pass arguments to the selected video codec.")); dialog->registerWidgetHelp(m_ui.enableVideoCaptureArguments, tr("Enable Extra Video Arguments"), tr("Unchecked"), tr("Allows you to pass arguments to the selected video codec."));
@ -780,7 +780,7 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsWindow* dialog, QWidget*
dialog->registerWidgetHelp(m_ui.audioCaptureCodec, tr("Audio Codec"), tr("Default"), tr("Selects which Audio Codec to be used for Video Capture. " dialog->registerWidgetHelp(m_ui.audioCaptureCodec, tr("Audio Codec"), tr("Default"), tr("Selects which Audio Codec to be used for Video Capture. "
"<b>If unsure, leave it on default.<b>")); "<b>If unsure, leave it on default.<b>"));
dialog->registerWidgetHelp(m_ui.audioCaptureBitrate, tr("Audio Bitrate"), tr("160 kbps"), tr("Sets the audio bitrate to be used.")); dialog->registerWidgetHelp(m_ui.audioCaptureBitrate, tr("Audio Bitrate"), tr("160 kbps"), tr("Sets the audio bitrate to be used."));

View File

@ -27,10 +27,10 @@
// We're using deprecated fields because we're targeting multiple ffmpeg versions. // We're using deprecated fields because we're targeting multiple ffmpeg versions.
#if defined(_MSC_VER) #if defined(_MSC_VER)
#pragma warning(disable:4996) // warning C4996: 'AVCodecContext::channels': was declared deprecated #pragma warning(disable : 4996) // warning C4996: 'AVCodecContext::channels': was declared deprecated
#elif defined (__clang__) #elif defined(__clang__)
#pragma clang diagnostic ignored "-Wdeprecated-declarations" #pragma clang diagnostic ignored "-Wdeprecated-declarations"
#elif defined (__GNUC__) #elif defined(__GNUC__)
#pragma GCC diagnostic ignored "-Wdeprecated-declarations" #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif #endif
@ -293,14 +293,14 @@ bool GSCapture::LoadFFmpeg(bool report_errors)
if (report_errors) if (report_errors)
{ {
Host::ReportErrorAsync(TRANSLATE_SV("GSCapture","Failed to load FFmpeg"), Host::ReportErrorAsync(TRANSLATE_SV("GSCapture", "Failed to load FFmpeg"),
fmt::format(TRANSLATE_FS("GSCapture","You may be missing one or more files, or are using the incorrect version. This build of PCSX2 requires:\n" fmt::format(TRANSLATE_FS("GSCapture", "You may be missing one or more files, or are using the incorrect version. This build of PCSX2 requires:\n"
" libavcodec: {}\n" " libavcodec: {}\n"
" libavformat: {}\n" " libavformat: {}\n"
" libavutil: {}\n" " libavutil: {}\n"
" libswscale: {}\n" " libswscale: {}\n"
" libswresample: {}\n\n" " libswresample: {}\n\n"
"Please see our official documentation for more information."), "Please see our official documentation for more information."),
LIBAVCODEC_VERSION_MAJOR, LIBAVFORMAT_VERSION_MAJOR, LIBAVUTIL_VERSION_MAJOR, LIBAVCODEC_VERSION_MAJOR, LIBAVFORMAT_VERSION_MAJOR, LIBAVUTIL_VERSION_MAJOR,
LIBSWSCALE_VERSION_MAJOR, LIBSWRESAMPLE_VERSION_MAJOR)); LIBSWSCALE_VERSION_MAJOR, LIBSWRESAMPLE_VERSION_MAJOR));
} }
@ -363,7 +363,7 @@ void GSCapture::LogAVError(int errnum, const char* format, ...)
std::string GSCapture::GetCaptureTypeForMessage(bool capture_video, bool capture_audio) std::string GSCapture::GetCaptureTypeForMessage(bool capture_video, bool capture_audio)
{ {
return capture_video ? capture_audio ? TRANSLATE("GSCapture","capturing audio and video") : TRANSLATE("GSCapture","capturing video") : TRANSLATE("GSCapture","capturing audio"); return capture_video ? capture_audio ? TRANSLATE("GSCapture", "capturing audio and video") : TRANSLATE("GSCapture", "capturing video") : TRANSLATE("GSCapture", "capturing audio");
} }
bool GSCapture::IsUsingHardwareVideoEncoding() bool GSCapture::IsUsingHardwareVideoEncoding()
@ -1528,7 +1528,7 @@ GSCapture::FormatList GSCapture::GetVideoFormatList(const char* codec)
} }
// rawvideo doesn't have a list of formats. // rawvideo doesn't have a list of formats.
if(v_codec->pix_fmts == nullptr) if (v_codec->pix_fmts == nullptr)
{ {
Console.Error("(GetVideoFormatList) v_codec->pix_fmts is null."); Console.Error("(GetVideoFormatList) v_codec->pix_fmts is null.");
return ret; return ret;

View File

@ -359,7 +359,7 @@ __ri void ImGuiManager::DrawPerformanceOverlay(float& position_y, float scale, f
__ri void ImGuiManager::DrawSettingsOverlay(float scale, float margin, float spacing) __ri void ImGuiManager::DrawSettingsOverlay(float scale, float margin, float spacing)
{ {
if (!GSConfig.OsdShowSettings || if (!GSConfig.OsdShowSettings ||
FullscreenUI::HasActiveWindow()) FullscreenUI::HasActiveWindow())
return; return;
std::string text; std::string text;
@ -691,8 +691,7 @@ __ri void ImGuiManager::DrawVideoCaptureOverlay(float& position_y, float scale,
{ {
if (!GSConfig.OsdShowVideoCapture || if (!GSConfig.OsdShowVideoCapture ||
!GSCapture::IsCapturing() || !GSCapture::IsCapturing() ||
FullscreenUI::HasActiveWindow() FullscreenUI::HasActiveWindow())
)
return; return;
const float shadow_offset = std::ceil(scale); const float shadow_offset = std::ceil(scale);