Main Display scale in worker thread

Hi Jules,


When loading some resource in a worker thread, I would like to get the current display scale. (in order to know if I load retina assets or not)

Currently if I call Desktop::Displays::getMainDisplay() in another thread to get this scale, I got an assert.


Is this assert mandatory, or some locking would help avoiding it ?



The display structure could be updated at any time by the message thread, so you'd need to use a MessageManagerLock to read it safely.

oki doki


Thanks !