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.