Browse Source

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

altef 3 years ago
parent
commit
5c7cec25b8
1 changed files with 2 additions and 0 deletions
  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);