fix(render): prevent Filament camera assert crash by ignoring 0 size display projection
This commit is contained in:
parent
0e5e084f6c
commit
5c8568875d
@ -205,6 +205,9 @@ MetaCoreImGuiHelper::~MetaCoreImGuiHelper() {
|
||||
|
||||
void MetaCoreImGuiHelper::setDisplaySize(int width, int height, float scaleX, float scaleY,
|
||||
bool flipVertical) {
|
||||
if (width <= 0 || height <= 0) {
|
||||
return;
|
||||
}
|
||||
ImGuiIO& io = ImGui::GetIO();
|
||||
io.DisplaySize = ImVec2(width, height);
|
||||
io.DisplayFramebufferScale.x = scaleX;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user