Properly show OSD information of resolution

Fixes #5230 that popped up after my previous commit. Also take care of 0 case. Sorry for the inconvenience.