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

@ -27,10 +27,10 @@
// We're using deprecated fields because we're targeting multiple ffmpeg versions.
#if defined(_MSC_VER)
#pragma warning(disable:4996) // warning C4996: 'AVCodecContext::channels': was declared deprecated
#elif defined (__clang__)
#pragma warning(disable : 4996) // warning C4996: 'AVCodecContext::channels': was declared deprecated
#elif defined(__clang__)
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
#elif defined (__GNUC__)
#elif defined(__GNUC__)
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif
@ -293,8 +293,8 @@ bool GSCapture::LoadFFmpeg(bool report_errors)
if (report_errors)
{
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"
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"
" libavcodec: {}\n"
" libavformat: {}\n"
" libavutil: {}\n"
@ -363,7 +363,7 @@ void GSCapture::LogAVError(int errnum, const char* format, ...)
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()
@ -1528,7 +1528,7 @@ GSCapture::FormatList GSCapture::GetVideoFormatList(const char* codec)
}
// 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.");
return ret;

View File

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