OpenMacroBoard / StreamDeckSharp

A simple .NET wrapper for Stream Deck
MIT License
351 stars 47 forks source link

ClearKey only clears part of the key when different sized Stream Decks are connected #44

Closed jskeet closed 2 years ago

jskeet commented 2 years ago

I've got a Stream Deck and a Stream Deck XL. When both are used in the same application, calling deckXL.ClearKeys() only clears part of each Stream Deck XL key.

I believe this is because the XL keys are 96x96, whereas the Stream Deck keys are 72x72.

StreamDeckJpgHardwareBase.cachedNullImage is a static field, so it assumes the same null image can be used for all hardware - but its size depends on the instance that GetNullImage was first called on.

I suspect that just making cachedNullImage an instance field would be fine here - if I've read the code correctly, there are only normally 4 instances of StreamDeckJpgHardwareBase anyway, so it's not like it's hugely wasteful.

wischi-chr commented 2 years ago

The field is now an instance field in v4.0.0-preview.

Pls let me know if this fixes your issue wich ClearKey

wischi-chr commented 2 years ago

I'm closing this issue because it was fixed with v4. If you still have problems with ClearKeys feel free to reopen this issue / open a new ticket.