mat1jaczyyy / apollo-studio

Apollo Studio is a standalone editor and live playback engine for RGB Launchpad light effects.
https://apollo.mat1jaczyyy.com
BSD 3-Clause "New" or "Revised" License
186 stars 23 forks source link

Implement Purpose field for Devices to achieve proper initialization #456

Closed mat1jaczyyy closed 1 year ago

mat1jaczyyy commented 1 year ago

Newly added Purpose field is required to be set BEFORE any device initializes:

This is done using reflection, as the constructor needs to already know what purpose the device is being created for but adding a new parameter to the constructor is not desirable.

Fixes #390 and should also fix all Output bugs. Also happens to fix #455 as code that caused that issue had to be refactored for this anyways.

Ready to merge after some more bugtesting :)