Hello
I’m actually working on a projet involving the possibility to take photos. To did it, I use FScreenshotRequest::RequestScreenshot.
The problem here is the screenshot will have the aspect ratio and pixel size of the viewport.
If I use the HighResScreenshot feature, I can choose the aspect ratio and pixel size, however I even if I precise where the screenshot will be save through FScreenshotRequest::RequestScreenshot, it’s automatically override.
So I investigate a bit and I saw this (UnrealClient.cpp, line 971, 4.10) :
if( GIsHighResScreenshot || bTakeHighResScreenShot )
{
const bool bShowUI = false;
const bool bAddFilenameSuffix = true;
FScreenshotRequest::RequestScreenshot( FString(), bShowUI, bAddFilenameSuffix );
GIsHighResScreenshot = true;
GScreenMessagesRestoreState = GAreScreenMessagesEnabled;
GAreScreenMessagesEnabled = false;
HighResScreenshot();
}
Wouldn’t be easyier to check if there isn’t a RequestScreenshot instead of create a new one ?
if( GIsHighResScreenshot || bTakeHighResScreenShot )
{
if (!FScreenshotRequest::IsScreenshotRequested())
{
const bool bShowUI = false;
const bool bAddFilenameSuffix = true;
FScreenshotRequest::RequestScreenshot(FString(), bShowUI, bAddFilenameSuffix);
}
GIsHighResScreenshot = true;
GScreenMessagesRestoreState = GAreScreenMessagesEnabled;
GAreScreenMessagesEnabled = false;
HighResScreenshot();
}
And, by the way, would it be possible to precise if we want notification ?
Thank you !