fix ios entry (#3027)

When initWithFrame is being called s_ctx has not been created yet. Fix with correct assign order.
This commit is contained in:
ShuangLiu1992
2023-01-19 16:45:51 +00:00
committed by GitHub
parent 9cc4d85b69
commit adb0f893a3

View File

@@ -212,8 +212,6 @@ using namespace entry;
return nil;
}
s_ctx->m_window = self.layer;
return self;
}
@@ -335,6 +333,7 @@ using namespace entry;
[m_view setContentScaleFactor: scaleFactor ];
s_ctx = new Context((uint32_t)(scaleFactor*rect.size.width), (uint32_t)(scaleFactor*rect.size.height));
s_ctx->m_window = m_view.layer;
return YES;
}