module RbSDL2::Version

Public Class Methods

revision(= ::SDL2.SDL_GetRevision.read_string) click to toggle source

SDL ライブラリのリビジョンを文字列で返します。

# File lib/rb_sdl2/version.rb, line 5
  def revision = ::SDL2.SDL_GetRevision.read_string

  # SDL ライブラリのバージョン番号を文字列で返します。形式はセマンティックバージョニングです。
  def version
    st = ::SDL2::SDL_version.new
    ::SDL2.SDL_GetVersion(st)
    "#{st[:major]}.#{st[:minor]}.#{st[:patch]}"
  end
end
version() click to toggle source

SDL ライブラリのバージョン番号を文字列で返します。形式はセマンティックバージョニングです。

# File lib/rb_sdl2/version.rb, line 8
def version
  st = ::SDL2::SDL_version.new
  ::SDL2.SDL_GetVersion(st)
  "#{st[:major]}.#{st[:minor]}.#{st[:patch]}"
end