bytesToWrite is initialized like this
| DWORD bytesTowrite = (DWORD)win32State->totalSize;
|
so it should not matter.
- you can check bytesWritten to make sure you wrote the right amount of bytes to the disk.
- You may check the written file to make sure it doesn't contains only zeros (by writing a small program to do so or using an hex editor). The game state is huge (2GB I think) and is mostly filled with zeroes at that point in the project.
- You may check that bytesRead == bytesToRead in the BeginInputPlayback and that it restored the data in win32State->gameMemoryBlock
Since it seems that you're not modifying the state, it looks like you aren't reading the file from the disk (if you were reading zeros, the game would crash or do something unexpected).