Add volatile keyword so that pause is thread safe

on enforceContinuousRenderingOnPause that is write/read by two threads