Core: Put back sync handling in _waitUntilNotState
Core: Put back sync handling in _waitUntilNotState

Anty-Lemon/mgba,fr500/mgba,mgba-emu/mgba,iracigt/mgba,sergiobenrocha2/mgba,fr500/mgba,sergiobenrocha2/mgba,Iniquitatis/mgba,sergiobenrocha2/mgba,Touched/mgba,libretro/mgba,Touched/mgba,Anty-Lemon/mgba,iracigt/mgba,Iniquitatis/mgba,mgba-emu/mgba,jeremyherbert/mgba,Iniquitatis/mgba,libretro/mgba,jeremyherbert/mgba,sergiobenrocha2/mgba,jeremyherbert/mgba,mgba-emu/mgba,MerryMage/mgba,libretro/mgba,Anty-Lemon/mgba,fr500/mgba,MerryMage/mgba,Touched/mgba,Iniquitatis/mgba,MerryMage/mgba,libretro/mgba,iracigt/mgba,mgba-emu/mgba,jeremyherbert/mgba,sergiobenrocha2/mgba,Anty-Lemon/mgba,iracigt/mgba,fr500/mgba,libretro/mgba