Stop reallocating new render targets when DPI isn't exactly a integer value
This commit is contained in:
parent
5226aa1200
commit
c6d699a130
1 changed files with 1 additions and 1 deletions
|
@ -663,7 +663,7 @@ void CommonEditor::createDockArea() {
|
|||
|
||||
void CommonEditor::drawViewport(Scene* scene) {
|
||||
const auto size = ImGui::GetContentRegionAvail();
|
||||
const auto real_size = ImVec2(size.x * platform::get_monitor_dpi(), size.y * platform::get_monitor_dpi());
|
||||
const auto real_size = ImVec2(static_cast<int>(size.x * platform::get_monitor_dpi()), static_cast<int>(size.y * platform::get_monitor_dpi()));
|
||||
|
||||
if(real_size.x <= 0 || real_size.y <= 0)
|
||||
return;
|
||||
|
|
Reference in a new issue