From 95c4e0b9c497fee97821b58c1a080d76efd2d3c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Fri, 28 Dec 2012 23:33:00 +0100 Subject: [PATCH] Quick build fix for gcc --- Core/HLE/HLE.cpp | 4 +++- Core/HLE/sceDisplay.cpp | 3 ++- Core/HLE/sceKernelEventFlag.cpp | 5 +++-- Core/HLE/sceKernelInterrupt.cpp | 3 ++- Core/HLE/sceKernelMbx.cpp | 3 ++- Core/HLE/sceKernelMsgPipe.cpp | 5 +++-- Core/SaveState.cpp | 2 +- Core/Util/BlockAllocator.cpp | 3 ++- 8 files changed, 18 insertions(+), 10 deletions(-) diff --git a/Core/HLE/HLE.cpp b/Core/HLE/HLE.cpp index ef81fa2a23..2ebb7b5149 100644 --- a/Core/HLE/HLE.cpp +++ b/Core/HLE/HLE.cpp @@ -17,6 +17,7 @@ #include "HLE.h" #include +#include #include "../MemMap.h" #include "HLETables.h" @@ -60,7 +61,8 @@ void HLEInit() void HLEDoState(PointerWrap &p) { - p.Do(unresolvedSyscalls, Syscall()); + Syscall sc = {0}; + p.Do(unresolvedSyscalls, sc); p.DoMarker("HLE"); } diff --git a/Core/HLE/sceDisplay.cpp b/Core/HLE/sceDisplay.cpp index 2eaa41f069..ddd793b43b 100644 --- a/Core/HLE/sceDisplay.cpp +++ b/Core/HLE/sceDisplay.cpp @@ -125,7 +125,8 @@ void __DisplayDoState(PointerWrap &p) { p.Do(isVblank); p.Do(hasSetMode); p.Do(lastFrameTime); - p.Do(vblankWaitingThreads, WaitVBlankInfo(0)); + WaitVBlankInfo wvi(0); + p.Do(vblankWaitingThreads, wvi); p.Do(enterVblankEvent); CoreTiming::RestoreRegisterEvent(enterVblankEvent, "EnterVBlank", &hleEnterVblank); diff --git a/Core/HLE/sceKernelEventFlag.cpp b/Core/HLE/sceKernelEventFlag.cpp index d57d63c9bd..8f62b722c0 100644 --- a/Core/HLE/sceKernelEventFlag.cpp +++ b/Core/HLE/sceKernelEventFlag.cpp @@ -57,7 +57,7 @@ public: nef.currentPattern, nef.numWaitThreads); } - + static u32 GetMissingErrorCode() { return SCE_KERNEL_ERROR_UNKNOWN_EVFID; } @@ -66,7 +66,8 @@ public: virtual void DoState(PointerWrap &p) { p.Do(nef); - p.Do(waitingThreads, EventFlagTh()); + EventFlagTh eft = {0}; + p.Do(waitingThreads, eft); p.DoMarker("EventFlag"); } diff --git a/Core/HLE/sceKernelInterrupt.cpp b/Core/HLE/sceKernelInterrupt.cpp index 7c8c9d2544..77e7e707a9 100644 --- a/Core/HLE/sceKernelInterrupt.cpp +++ b/Core/HLE/sceKernelInterrupt.cpp @@ -247,7 +247,8 @@ void __InterruptsDoState(PointerWrap &p) } intState.DoState(p); - p.Do(pendingInterrupts, PendingInterrupt(0, 0)); + PendingInterrupt pi(0, 0); + p.Do(pendingInterrupts, pi); p.Do(interruptsEnabled); p.Do(inInterrupt); p.DoMarker("sceKernelInterrupt"); diff --git a/Core/HLE/sceKernelMbx.cpp b/Core/HLE/sceKernelMbx.cpp index 205a97460d..a36183ecca 100644 --- a/Core/HLE/sceKernelMbx.cpp +++ b/Core/HLE/sceKernelMbx.cpp @@ -156,7 +156,8 @@ struct Mbx : public KernelObject virtual void DoState(PointerWrap &p) { p.Do(nmb); - p.Do(waitingThreads, MbxWaitingThread()); + MbxWaitingThread mwt(0,0); + p.Do(waitingThreads, mwt); p.DoMarker("Mbx"); } diff --git a/Core/HLE/sceKernelMsgPipe.cpp b/Core/HLE/sceKernelMsgPipe.cpp index 92ef03c74a..2f820a3a3a 100644 --- a/Core/HLE/sceKernelMsgPipe.cpp +++ b/Core/HLE/sceKernelMsgPipe.cpp @@ -155,8 +155,9 @@ struct MsgPipe : public KernelObject virtual void DoState(PointerWrap &p) { p.Do(nmp); - p.Do(sendWaitingThreads, MsgPipeWaitingThread()); - p.Do(receiveWaitingThreads, MsgPipeWaitingThread()); + MsgPipeWaitingThread mpwt1 = {0}, mpwt2 = {0}; + p.Do(sendWaitingThreads, mpwt1); + p.Do(receiveWaitingThreads, mpwt2); bool hasBuffer = buffer != NULL; p.Do(hasBuffer); if (hasBuffer) diff --git a/Core/SaveState.cpp b/Core/SaveState.cpp index 35f91ce900..485aeb726c 100644 --- a/Core/SaveState.cpp +++ b/Core/SaveState.cpp @@ -44,7 +44,7 @@ namespace SaveState struct Operation { - Operation(OperationType t, std::string &f, Callback cb) + Operation(OperationType t, const std::string &f, Callback cb) : type(t), filename(f), callback(cb) { } diff --git a/Core/Util/BlockAllocator.cpp b/Core/Util/BlockAllocator.cpp index d778012ab9..c8e7cbbe3e 100644 --- a/Core/Util/BlockAllocator.cpp +++ b/Core/Util/BlockAllocator.cpp @@ -300,7 +300,8 @@ u32 BlockAllocator::GetTotalFreeBytes() void BlockAllocator::DoState(PointerWrap &p) { - p.Do(blocks, Block(0, 0, false)); + Block b(0, 0, false); + p.Do(blocks, b); p.Do(rangeStart_); p.Do(rangeSize_); p.Do(grain_);