summaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
authorTom Black <[email protected]>2019-01-06 01:54:30 -0800
committerTom Black <[email protected]>2019-01-06 01:54:30 -0800
commit19fe64de6fec783e32a2257ff04862b2d0a41572 (patch)
tree3a106a63013dc5f248baee4e85fa61cbc25ae74c /lib
parentd39551a9f72acc928f7886956d8a3e5adedda181 (diff)
downloadruby2d-19fe64de6fec783e32a2257ff04862b2d0a41572.tar.gz
ruby2d-19fe64de6fec783e32a2257ff04862b2d0a41572.zip
Set diagnostics immediately
`set diagnostics: true` now calls the new `Window#ext_diagnostics` native extension function, which immediately calls `S2D_Diagnostics()`
Diffstat (limited to 'lib')
-rw-r--r--lib/ruby2d/window.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/ruby2d/window.rb b/lib/ruby2d/window.rb
index 9e8b462..dea4f26 100644
--- a/lib/ruby2d/window.rb
+++ b/lib/ruby2d/window.rb
@@ -208,7 +208,10 @@ module Ruby2D
@borderless = opts[:borderless] || @borderless
@fullscreen = opts[:fullscreen] || @fullscreen
@highdpi = opts[:highdpi] || @highdpi
- @diagnostics = opts[:diagnostics] || @diagnostics
+ unless opts[:diagnostics].nil?
+ @diagnostics = opts[:diagnostics]
+ ext_diagnostics(@diagnostics)
+ end
end
# Add an object to the window