examples/off-screen: Place irrelevant resource locating code in the init function.