is there any advantage to using getRes() over $pref::Video::resolution?
Less to type, but that's about it. Using global variables will be slightly faster than a function call (hash table lookup, get string pointer, quick strcpy to stack vs hash lookup, point cpu to function, copy return to buffer, copy to stack)
You should use getRes() for better readability, though. Only use $pref::video::resolution if you're in dire need of performance.