Improve error reporting when address lines wrong
Before, a weird error would be shown because of the blitter thread destructor running.
This commit is contained in:
parent
cfec6060d8
commit
274adf1805
1 changed files with 2 additions and 1 deletions
|
|
@ -52,11 +52,12 @@ struct piomatter : piomatter_base {
|
|||
piomatter(std::span<typename colorspace::data_type const> framebuffer,
|
||||
const matrix_geometry &geometry)
|
||||
: framebuffer(framebuffer), geometry{geometry}, converter{},
|
||||
blitter_thread{&piomatter::blit_thread, this} {
|
||||
blitter_thread{} {
|
||||
if (geometry.n_addr_lines > std::size(pinout::PIN_ADDR)) {
|
||||
throw std::runtime_error("too many address lines requested");
|
||||
}
|
||||
program_init();
|
||||
blitter_thread = std::move(std::thread{&piomatter::blit_thread, this});
|
||||
show();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue