[Bug] SetRes doesn't update Canvas Clip size

Hello,

It looks like the console command “SetRes” doesn’t update properly the Canvas Clip size variables. I have the following functions in my game code :

Character.cpp :

void AExilCharacter::gameFullscreen()
{
	if(EPC != NULL)
	{
		EPC->ConsoleCommand("SETRES 1920x1080 f", true);
		
		EPC->GetHud()->RefreshCanvas();
	}
}



void AExilCharacter::gameWindowed()
{
	if(EPC != NULL)
	{
		EPC->ConsoleCommand("SETRES 1280x720 w", true);

		EPC->GetHud()->RefreshCanvas();
	}
}

HUD.cpp :

void AExilHud::RefreshCanvas()
{
	if(Canvas)
	{
		//Doesn't work, need to find a way to update the ClipX/Y Size properly
		Canvas->Update();
		Canvas->UpdateAllCanvasSafeZoneData();
	}
}

If my game is launched in windowed mode (1280x720 w) and then I switch to fullscreen (1920x1080 f), my Canvas size is not updated (Im referring to Canvas->ClipX and Canvas->ClipY ). Therefore my HUD is not properly drawn. However if I launch my game in fullscreen mode first, then switch to windowed mode, the Canvas size is properly updated.

Bumping this for visibility.

Console command should be: “r.setres”

It’s the same thing. The clip size variables don’t update properly anyway.

This bug doesn’t occur anymore with the 4.2.1 version of the engine.