diff options
| author | Tom Black <[email protected]> | 2017-09-28 14:11:38 -0700 |
|---|---|---|
| committer | Tom Black <[email protected]> | 2017-11-27 22:51:39 -0800 |
| commit | efeff37021c3cf5afb801a9941f093752b0d826e (patch) | |
| tree | f58b5031eef2dba6d9df02d201183b590fe975a6 /lib | |
| parent | 00c54e70107efe2a62f52170613faa5b55cc1ae7 (diff) | |
| download | ruby2d-efeff37021c3cf5afb801a9941f093752b0d826e.tar.gz ruby2d-efeff37021c3cf5afb801a9941f093752b0d826e.zip | |
Add iOS and tvOS support
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/ruby2d/window.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/ruby2d/window.rb b/lib/ruby2d/window.rb index d3e8143..0a5a995 100644 --- a/lib/ruby2d/window.rb +++ b/lib/ruby2d/window.rb @@ -17,6 +17,7 @@ module Ruby2D @width = args[:width] || 640 @height = args[:height] || 480 @viewport_width, @viewport_height = nil, nil + @display_width, @display_height = nil, nil @resizable = false @borderless = false @fullscreen = false @@ -60,6 +61,13 @@ module Ruby2D when :height; @height when :viewport_width; @viewport_width when :viewport_height; @viewport_height + when :display_width, :display_height + ext_get_display_dimensions + if sym == :display_width + @display_width + else + @display_height + end when :resizable; @resizable when :borderless; @borderless when :fullscreen; @fullscreen |
