Tangent128 / luasdl2

A pure C binding of SDL 2.0 for Lua 5.1, Lua 5.2, and LuaJIT.
ISC License
385 stars 74 forks source link

2.0.4 support - Closes #39; Update version info. #55

Closed Web-eWorks closed 7 years ago

Web-eWorks commented 7 years ago

Implemented everything in #39 but the Windows message pre-processing function, as that seems out of the scope of this module.

Questions, comments?

Tangent128 commented 7 years ago

Sorry for delay, Thanksgiving week.

Made an initial review, had a few questions.

Web-eWorks commented 7 years ago

That's fine, I understand how it is.

One thing I wanted to get confirmation on -- does the callback passed to SDL_SetWindowHitTest run in a different thread? The documentation never explicitly says one way or the other, so I am assuming not.

Tangent128 commented 7 years ago

I don't know either; my instinct says it would run in whichever thread runs SDL_PollEvent().

So, if you want to add a safety note to the documentation, I'd say advise only calling SDL_SetWindowHitTest() from the main thread (which should also be the one initializing video & calling SDL_PollEvent()).

Web-eWorks commented 7 years ago

Assuming that the wiki documentation is not automatically generated, I added a page for Window:setHitTest. I'll drop a note in the code too.

It just now hit me that uservalues are a Lua 5.2+ thing, so I will need to add a conditional for that too. I do all my Lua-ing on 5.3, so you'll have to tell me if I committed some compatibility sin somewhere.

Web-eWorks commented 7 years ago

Was there anything else you wanted changed?

Tangent128 commented 7 years ago

Nothing comes to mind; I'm just underwater with work so I can't re-review yet.

Tangent128 commented 7 years ago

Thank you for this contribution, too!