diff options
| author | Tom Black <[email protected]> | 2019-01-06 01:54:30 -0800 |
|---|---|---|
| committer | Tom Black <[email protected]> | 2019-01-06 01:54:30 -0800 |
| commit | 19fe64de6fec783e32a2257ff04862b2d0a41572 (patch) | |
| tree | 3a106a63013dc5f248baee4e85fa61cbc25ae74c /lib | |
| parent | d39551a9f72acc928f7886956d8a3e5adedda181 (diff) | |
| download | ruby2d-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.rb | 5 |
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 |
