AVIDump: Inline OSD error handling.

This fixes a review feedback in PR #4345.
This commit is contained in:
degasus
2016-10-16 13:26:37 +02:00
parent 03d8efc270
commit dad5041737
2 changed files with 9 additions and 11 deletions

View File

@ -23,7 +23,9 @@ extern "C" {
#include "Core/HW/SystemTimers.h"
#include "Core/HW/VideoInterface.h" //for TargetRefreshRate
#include "Core/Movie.h"
#include "VideoCommon/AVIDump.h"
#include "VideoCommon/OnScreenDisplay.h"
#include "VideoCommon/VideoConfig.h"
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(55, 28, 1)
@ -68,7 +70,10 @@ bool AVIDump::Start(int w, int h)
InitAVCodec();
bool success = CreateFile();
if (!success)
{
CloseFile();
OSD::AddMessage("AVIDump Start failed");
}
return success;
}
@ -148,6 +153,9 @@ bool AVIDump::CreateFile()
return false;
}
OSD::AddMessage(StringFromFormat("Dumping Frames to \"%s\" (%dx%d)", s_format_context->filename,
s_width, s_height));
return true;
}