Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log something useful if SDL2 fails to init #809

Merged
merged 2 commits into from
Feb 12, 2019
Merged

Conversation

NiLuJe
Copy link
Member

@NiLuJe NiLuJe commented Feb 11, 2019

(Thanks to @ptrm ;)).

@NiLuJe
Copy link
Member Author

NiLuJe commented Feb 11, 2019

All in all, a great showing :D.

I'll fix that, thanks ;).

@@ -68,7 +68,7 @@ function S.open()
if SDL.SDL_Init(bit.bor(SDL.SDL_INIT_VIDEO,
SDL.SDL_INIT_JOYSTICK,
SDL.SDL_INIT_GAMECONTROLLER)) ~= 0 then
error("Cannot initialize SDL.")
error("Cannot initialize SDL: " .. ffi.string(SDL.SDL_GetError()))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fun fact: I added the FFI header for it but I don't recall what I debugged with it. (Definitely not this line, 'cause I wouldn't have cleaned that out.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants