class RbSDL2::RbSDL2Error
Public Class Methods
init(= SDL.init)
click to toggle source
# File lib/rb_sdl2.rb, line 36 def init = SDL.init def load(path) ::SDL2.load_lib(path) # オーディオデバイスを閉じ忘れるとアプリケーションの終了時にメモリーアクセス違反を起こす。 # アプリケーションが強制終了した場合を考慮し終了処理を設定する。 at_exit { ::SDL2.SDL_Quit } end def loop while true Event.pump yield Event.clear end end end
load(path)
click to toggle source
# File lib/rb_sdl2.rb, line 38 def load(path) ::SDL2.load_lib(path) # オーディオデバイスを閉じ忘れるとアプリケーションの終了時にメモリーアクセス違反を起こす。 # アプリケーションが強制終了した場合を考慮し終了処理を設定する。 at_exit { ::SDL2.SDL_Quit } end
loop() { || ... }
click to toggle source
# File lib/rb_sdl2.rb, line 45 def loop while true Event.pump yield Event.clear end end
new(error_message = Error.message)
click to toggle source
Calls superclass method
# File lib/rb_sdl2.rb, line 32 def initialize(error_message = Error.message) = super end