FSlateApplication::Get().LockCursor(NULL)
doesn’t work since UE 4.11. You can avoid this bproblem by using FSlateApplicationBase::Get().GetPlatformCursor()->Lock( nullptr );
instead of.
TLDR;
COPY/PASTE EASY MODE:
void [CLASS_NAME]::SetScreenResolution(FVector2D screen_resolution)
{
FSlateApplicationBase::Get().GetPlatformCursor()->Lock(nullptr);
UGameUserSettings* GameSettings = GEngine->GetGameUserSettings();
GameSettings->SetScreenResolution(FIntPoint(screen_resolution.X, screen_resolution.Y));
GameSettings->SetFullscreenMode(EWindowMode::Windowed);
GameSettings->ApplySettings(false);
GameSettings->SetFullscreenMode(EWindowMode::Fullscreen);
GameSettings->ApplySettings(false);
}