hrydgard/ppsspp — pull request #3075 by unknownbrackets (2013-08-07 06:18:41+00:00)
Title: Prep work for GE and CPU on separate threads

This time there shouldn't be any deviation in behavior. It might hurt performance a tiny bit but afaict the difference is negligible.

Threadsafe events were kinda buggy before, especially with remove and the added unschedule. More importantly, they weren't based on the same starting time, which I had not realized. I don't think GetTicks() will ever return garbage, so I just called it like always.

Because savestates need to be run *outside* a syscall, and the above makes threadsafe events run inside them (so there's no change in behavior), this just handles savestates more specially. They've already got a good chunk of code throughout dedicated to them, so they might as well be special.

Fixes the differences I could reproduce, but makes savestate actions slightly more delayed. Does open the door better for "rewind" (frame based) if that can be practical.

-[Unknown]