Hi,

I think you need to put the update in a while(1) and when last_resolution != current_resolution, you apply your changes.