lib/mittsu/renderers/generic_lib.rb in mittsu-0.2.1 vs lib/mittsu/renderers/generic_lib.rb in mittsu-0.2.2
- old
+ new
@@ -7,14 +7,20 @@
when :OPENGL_PLATFORM_MACOSX
self::MacOS.new
when :OPENGL_PLATFORM_LINUX
self::Linux.new
else
- fail "Unsupported platform."
+ warn "WARNING: Unsupported platform: #{OpenGL.get_platform}"
+ Base.new
end
end
- class Linux
+ class Base
+ def path; nil; end
+ def file; nil; end
+ end
+
+ class Linux < Base
def path
return nil if file_path.nil?
File.dirname file_path
end