fix(render): prevent Filament camera assert crash by ignoring 0 size display projection

This commit is contained in:
ayuan9957 2026-06-08 11:24:43 +08:00
parent 0e5e084f6c
commit 5c8568875d

View File

@ -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;