Sha256: b1603133a9fb4cb747314779487923e2f76d2340fc62f3ca86a3f4186cc65709

Contents?: true

Size: 608 Bytes

Versions: 12

Compression:

Stored size: 608 Bytes

Contents

# SWIG workarounds
# These are offloaded into a separate file because rb_eval_string() is weird on Ruby 1.8.

# SWIG doesn't understand the C++ overloading.
class Gosu::Image
  def self.from_text(*args)
    args.size == 4 ? from_text4(*args) : from_text7(*args)
  end
end

# Linux workaround: instead of declaring a constant, we declare a hidden function and
# call it when we need to define the constant. Otherwise, we get a weird libGL.so segfault.
module Gosu
  def self.const_missing sym
    if sym == :MAX_TEXTURE_SIZE then
      const_set sym, __max_texture_size
    else
      super
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
gosu-0.7.22 lib/gosu/swig_patches.rb
gosu-0.7.22-universal-darwin lib/gosu/swig_patches.rb
gosu-0.7.22-i386-mingw32 lib/gosu/swig_patches.rb
gosu-0.7.21-i386-mingw32 lib/gosu/swig_patches.rb
gosu-0.7.21-universal-darwin lib/gosu/swig_patches.rb
gosu-0.7.21 lib/gosu/swig_patches.rb
gosu-0.7.20 lib/gosu/swig_patches.rb
gosu-0.7.20-universal-darwin lib/gosu/swig_patches.rb
gosu-0.7.20-i386-mingw32 lib/gosu/swig_patches.rb
gosu-0.7.19-universal-darwin lib/gosu/swig_patches.rb
gosu-0.7.19 lib/gosu/swig_patches.rb
gosu-0.7.19-i386-mingw32 lib/gosu/swig_patches.rb