From 9772201345ab47cc820fd6c08247c133605f8b84 Mon Sep 17 00:00:00 2001 From: RSDuck Date: Fri, 4 Sep 2020 20:37:14 +0200 Subject: remove some UB - savestates used to read a four bytes from a single byte value - a few unassigned variables - some other things - also make the ROR macro an inline function --- src/DMA.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/DMA.cpp') diff --git a/src/DMA.cpp b/src/DMA.cpp index cd2df45..18b8a2f 100644 --- a/src/DMA.cpp +++ b/src/DMA.cpp @@ -73,6 +73,8 @@ void DMA::Reset() SrcAddrInc = 0; DstAddrInc = 0; + Stall = false; + Running = false; InProgress = false; @@ -111,8 +113,8 @@ void DMA::DoSavestate(Savestate* file) file->Var32(&DstAddrInc); file->Var32(&Running); - file->Var32((u32*)&InProgress); - file->Var32((u32*)&IsGXFIFODMA); + file->Bool32(&InProgress); + file->Bool32(&IsGXFIFODMA); } void DMA::WriteCnt(u32 val) -- cgit v1.2.3