浏览代码

Window size from window returned by SDL (for Android) (#1024)

altef 3 年之前
父节点
当前提交
5c7cec25b8
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      hxd/Window.hl.hx

+ 2 - 0
hxd/Window.hl.hx

@@ -83,6 +83,8 @@ class Window {
 		if( USE_VULKAN ) sdlFlags |= sdl.Window.SDL_WINDOW_VULKAN;
 		#end
 		window = new sdl.Window(title, width, height, sdl.Window.SDL_WINDOWPOS_CENTERED, sdl.Window.SDL_WINDOWPOS_CENTERED, sdlFlags);
+		this.windowWidth = window.width;
+		this.windowHeight = window.height;
 		#elseif hldx
 		final dxFlags = if (!fixed) dx.Window.RESIZABLE else 0;
 		window = new dx.Window(title, width, height, dx.Window.CW_USEDEFAULT, dx.Window.CW_USEDEFAULT, dxFlags);