We really need a law for that. They should have to either
buy them back
make sure they work for a sufficiently long time after the last unit was sold (e.g. 5 years)
make the software open source so the community can maintain the software (if even possible, cause the community won’t be able to work on the server side)
release an offline patch that makes the device work even after servers have been shut down if that makes sense for the device in question (applies mostly to always-online single player games)
We really need a law for that. They should have to either