Browse files

Don't autorelease the video surface. Seriously.

  • Loading branch information...
1 parent 4b22e90 commit 52baddd0c4d2f6775774a9ca056e3b988b3b1942 @jacius committed Oct 19, 2009
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/ruby-sdl-ffi/sdl/video.rb
View
5 lib/ruby-sdl-ffi/sdl/video.rb
@@ -245,7 +245,8 @@ def self.release( pointer )
sdl_func :VideoDriverName, [ :string, :int ], :string
- sdl_func :GetVideoSurface, [], SDL::Surface.typed_pointer
+ sdl_func :GetVideoSurface, [],
+ SDL::Surface.typed_pointer( :autorelease => false )
sdl_func :GetVideoInfo, [ ], SDL::VideoInfo.typed_pointer
@@ -255,7 +256,7 @@ def self.release( pointer )
# sdl_func :ListModes, [ :pointer, :uint32 ], :pointer
sdl_func :SetVideoMode, [ :int, :int, :int, :uint32 ],
- SDL::Surface.typed_pointer
+ SDL::Surface.typed_pointer( :autorelease => false )

0 comments on commit 52baddd

Please sign in to comment.