Browse Source

Add viewport content scale

Ansraer 3 years ago
parent
commit
045f511bd9
1 changed files with 1 additions and 1 deletions
  1. 1 1
      scene/main/window.cpp

+ 1 - 1
scene/main/window.cpp

@@ -681,7 +681,7 @@ void Window::_update_viewport_size() {
 
 			} break;
 			case CONTENT_SCALE_MODE_VIEWPORT: {
-				final_size = viewport_size;
+				final_size = (viewport_size / content_scale_factor).floor();
 				attach_to_screen_rect = Rect2(margin, screen_size);
 
 			} break;