shinyblink / sled

Satanic/Sexy/Stupid/Silly/Shiny LED matrix controller
https://shinyblink.github.io/sled/
ISC License
122 stars 25 forks source link

fixed bug vifino/sled#31; rewrite modules_init; central outmod pointer #32

Closed marenz2569 closed 6 years ago

marenz2569 commented 6 years ago

Why the hell would you even bother having multiple pointers to outmod?

fixed vifino/sled#31

vifino commented 6 years ago

Hey!

Nice changes overall, a bit cleaner, although I would really like it if we could get rid of the malloc, allocating a single int is not so nice, even though os_unix does it too..

It should be rather trivial.

marenz2569 commented 6 years ago

I renamed outmod to outmod_c as the variable outmod is now a extern pointer to the output module. We have to pass a pointer to outmodno to the modules_init function to change its value outside the function. Doing this with &outmodno might also work, whilst int outmodno is used.

marenz2569 commented 6 years ago

Yes, doing it this way works.

vifino commented 6 years ago

Awesome, thanks.