From d6d2cea7cd72ba7fe8b7ccb1cc9818df01714de2 Mon Sep 17 00:00:00 2001 From: zeromus Date: Sat, 28 Jun 2008 20:20:40 +0000 Subject: [PATCH] fix zapper movie savestate bugs --- src/movie.cpp | 4 ++-- src/utils/endian.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/movie.cpp b/src/movie.cpp index 7a6d0e3d..978e6639 100644 --- a/src/movie.cpp +++ b/src/movie.cpp @@ -213,7 +213,7 @@ bool MovieRecord::parseBinary(MovieData* md, std::istream* is) zappers[port].y = (uint8)is->get(); zappers[port].b = (uint8)is->get(); zappers[port].bogo = (uint8)is->get(); - zappers[port].zaphit = uint64DecFromIstream(is); + read64le(&zappers[port].zaphit,is); } } } @@ -431,7 +431,7 @@ static void LoadFM2_binarychunk(MovieData& movieData, std::istream* fp, int size switch(movieData.ports[i]) { case SI_GAMEPAD: recordsize++; break; - case SI_ZAPPER: recordsize+=10; break; + case SI_ZAPPER: recordsize+=12; break; } } } diff --git a/src/utils/endian.cpp b/src/utils/endian.cpp index a948621e..00b91372 100644 --- a/src/utils/endian.cpp +++ b/src/utils/endian.cpp @@ -90,7 +90,7 @@ int write64le(uint64 b, std::ostream* os) s[6]=b>>48; s[7]=b>>56; os->write((char*)&s,8); - return 4; + return 8; }