pokepetter / ursina

A game engine powered by python and panda3d.
https://pokepetter.github.io/ursina/
MIT License
2.13k stars 321 forks source link

fixed no monitor found #647

Closed L4a1n closed 5 months ago

L4a1n commented 6 months ago

In the rare case, where there are monitors but no primary is set it cant start since it just continues without any set monitors.... so I fixed it by using the very first it gets.... I will probably make it a little bit "prettier" but for now it works!

pokepetter commented 6 months ago

What if there were no monitors found, like the original warning said, and the list of monitors is empty? Accessing element 0 would not work in that case.

L4a1n commented 6 months ago

Youre right. Ill think of something else...

PraneethJain commented 5 months ago

Hey I was facing the same issue (there are monitors but no primary is set), and applying this fixes it.

Also, isn't the if self.monitors check redundant because get_monitors() always returns a non-empty list?