summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--lib/ruby2d/window.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/ruby2d/window.rb b/lib/ruby2d/window.rb
index a952134..9e8b462 100644
--- a/lib/ruby2d/window.rb
+++ b/lib/ruby2d/window.rb
@@ -87,7 +87,11 @@ module Ruby2D
@diagnostics = false
# Console mode, enabled at command line
- @console = $ruby2d_console_mode || false
+ if RUBY_ENGINE == 'ruby'
+ @console = defined?($ruby2d_console_mode) ? true : false
+ else
+ @console = false
+ end
end
# Class methods for convenient access to properties