_viewImage = function(pic)
// ...
prevMode = display(0).mode
// Setting display-mode of 0 to pixel ...?
display(0).mode = displayMode.pixel
// Before saving the previous display?
prevDisp = display(0)
g = new PixelDisplay
g.install 0
Isn't the code above setting the display-mode before even saving it?
I would have thought the order of events needs to be:
_viewImage = function(pic)
// ...
prevMode = display(0).mode
prevDisp = display(0)
// Maybe this line is redundant thanks to ...
display(0).mode = displayMode.pixel
// ... the following 2 lines?
g = new PixelDisplay
g.install 0
Also, would setting the mode to pixel not be redundant since we are installing a PixelDisplay at slot 0 anyway?
The order of events here got me confused. Either I don't understand it correctly or it might be a yet undetected bug:
https://github.com/JoeStrout/minimicro-sysdisk/blob/747bfee66d331a7a468671912562a7a4fbed047e/sys/startup.ms#L250
Isn't the code above setting the display-mode before even saving it?
I would have thought the order of events needs to be:
Also, would setting the mode to pixel not be redundant since we are installing a PixelDisplay at slot 0 anyway?