Closed hukaidong closed 4 years ago
That is because the SDL2 document says that "The message is only applicable when an SDL function has signaled an error". Ruby/SDL2 users do not need to call SDL_GetError directly. Instead, Ruby/SDL2 detects all errors from a return value of an SDL function and raises an exception.
In fact, Window.destroy
did not work because Ruby/SDL2 forgot calling SDL_DestroyWindow. The problem was fixed in 7f1404e2aa96895f4853020b68fa978d69a2579c. The new version 0.3.5 is released now to fix some problems including this one.
nice to hear that
Is there any reason we are not including this function in this binding? I'm trying to build a SDL project, but seems window.destroy not working well. How should we destroy a window without terminate the program?