Skip to content

Instantly share code, notes, and snippets.

@bil-bas
Created June 13, 2011 11:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bil-bas/1022618 to your computer and use it in GitHub Desktop.
Save bil-bas/1022618 to your computer and use it in GitHub Desktop.
Gosu 0.7.32.0 hotfix
module Gosu
class Window
%w(update draw needs_redraw? needs_cursor?
lose_focus button_down button_up).each do |callback|
define_method "protected_#{callback}" do |*args|
begin
# Turn into a boolean result for needs_cursor? etc while we are at it.
@_exception ? false : !!send(callback, *args)
rescue Exception => e
# Exit the message loop naturally, then re-throw
@_exception = e
close
end
end
end
end
end
@pencilcheck
Copy link

hotfix for the known issue in 0.7.32.0. Blame jlnr.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment