Created
June 13, 2011 11:20
-
-
Save bil-bas/1022618 to your computer and use it in GitHub Desktop.
Gosu 0.7.32.0 hotfix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
hotfix for the known issue in 0.7.32.0. Blame jlnr.