Minor tweak to savestates to help improve threaded responsiveness. May or may not work as expected (thread scheduling doesn't always behave in a consistent manner). Shouldn't hurt in any case.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4200 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
Jake.Stine 2011-01-11 14:47:37 +00:00
parent 249f5594d3
commit bd0990f9cb
1 changed files with 6 additions and 0 deletions

View File

@ -430,6 +430,12 @@ protected:
if (!woot->IsOk())
throw Exception::CannotCreateStream(tempfile);
// Scheduler hint (yield) -- creating and saving the file is low priority compared to
// the emulator/vm thread. Sleeping the executor thread briefly before doing file
// transactions should help reduce overhead. --air
Yield(4);
// Write the version and screenshot:
ScopedPtr<pxOutputStream> out( new pxOutputStream(tempfile, new wxZipOutputStream(woot)) );
wxZipOutputStream* gzfp = (wxZipOutputStream*)out->GetWxStreamBase();