Ensure window scale is initialized on creation.

PiperOrigin-RevId: 839699437
Change-Id: I99e477ac49b56726b77389306aec49c895e160fa
This commit is contained in:
Haroon Qureshi
2025-12-03 04:28:37 -08:00
committed by Copybara-Service
parent 55664b63e1
commit e409538831
+5
View File
@@ -133,6 +133,11 @@ Window::Window(std::string_view title, int width, int height, Config config,
native_window_ =
GetNativeWindowOsx(reinterpret_cast<void*>(wmi.info.cocoa.window));
#endif
int drawable_width = width;
int drawable_height = height;
SDL_GL_GetDrawableSize(sdl_window_, &drawable_width, &drawable_height);
scale_ = (float)drawable_width / (float)width_;
}
Window::~Window() {