From d02dd6d3facb114a099e67f65801a45ac955cad1 Mon Sep 17 00:00:00 2001 From: Soren Jorvang Date: Mon, 6 Sep 2010 12:14:18 +0000 Subject: [PATCH] std::string needs rather than . Also some minor cleanup. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6184 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Common/Src/NandPaths.cpp | 6 +++--- Source/Core/Common/Src/NandPaths.h | 2 ++ Source/Core/Core/Src/CoreParameter.cpp | 3 ++- Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp | 6 +++--- Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.h | 2 +- Source/Core/Core/Src/PowerPC/Interpreter/Interpreter.cpp | 3 ++- .../Src/PowerPC/Interpreter/Interpreter_SystemRegisters.cpp | 1 + Source/Core/Core/Src/PowerPC/Jit64IL/IR_X86.cpp | 5 ----- Source/Core/VideoCommon/Src/DLCache.cpp | 2 -- Source/Plugins/Plugin_VideoOGL/Src/TextureMngr.cpp | 2 -- 10 files changed, 14 insertions(+), 18 deletions(-) diff --git a/Source/Core/Common/Src/NandPaths.cpp b/Source/Core/Common/Src/NandPaths.cpp index 4c0f263ead..32a4253e9e 100644 --- a/Source/Core/Common/Src/NandPaths.cpp +++ b/Source/Core/Common/Src/NandPaths.cpp @@ -15,10 +15,10 @@ // Official SVN repository and contact information can be found at // http://code.google.com/p/dolphin-emu/ -#include "NandPaths.h" #include "CommonPaths.h" #include "FileUtil.h" -#include +#include "NandPaths.h" + namespace Common { std::string CreateTicketFileName(u64 _TitleID) @@ -37,4 +37,4 @@ std::string CreateTitleContentPath(u64 _TitleID) return ContentPath; } -}; \ No newline at end of file +}; diff --git a/Source/Core/Common/Src/NandPaths.h b/Source/Core/Common/Src/NandPaths.h index 54d4934a3d..d68bbba2e0 100644 --- a/Source/Core/Common/Src/NandPaths.h +++ b/Source/Core/Common/Src/NandPaths.h @@ -17,6 +17,8 @@ #ifndef __NANDPATHS_H__ #define __NANDPATHS_H__ + +#include #include "CommonTypes.h" #define TITLEID_SYSMENU 0x0000000100000002ull diff --git a/Source/Core/Core/Src/CoreParameter.cpp b/Source/Core/Core/Src/CoreParameter.cpp index a288ef73f6..f3afd80fb3 100644 --- a/Source/Core/Core/Src/CoreParameter.cpp +++ b/Source/Core/Core/Src/CoreParameter.cpp @@ -47,7 +47,8 @@ SCoreStartupParameter::SCoreStartupParameter() bLockThreads(false), bEnableCheats(false), bRunCompareServer(false), bRunCompareClient(false), - bMMU(false), bAlternateRFI(false), iTLBHack(0), SelectedLanguage(0), bWii(false), + bMMU(false), iTLBHack(0), bAlternateRFI(false), + SelectedLanguage(0), bWii(false), bConfirmStop(false), bHideCursor(false), bAutoHideCursor(false), bUsePanicHandlers(true), iRenderWindowXPos(0), iRenderWindowYPos(0), diff --git a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp index d17a374bc5..19eeaee796 100644 --- a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp +++ b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp @@ -138,7 +138,7 @@ void SetDefaultContentFile(const std::string& _rFilename) pDevice->LoadWAD(_rFilename); } -u32 GetDeviceIDByName(const std::string& _rDeviceName) +int GetDeviceIDByName(const std::string& _rDeviceName) { TDeviceMap::const_iterator itr = g_DeviceMap.begin(); while(itr != g_DeviceMap.end()) @@ -259,7 +259,7 @@ void ExecuteCommand(u32 _Address) bool CmdSuccess = false; ECommandType Command = static_cast(Memory::Read_U32(_Address)); - u32 DeviceID = Memory::Read_U32(_Address + 8); + int DeviceID = Memory::Read_U32(_Address + 8); IWII_IPC_HLE_Device* pDevice = AccessDeviceByID(DeviceID); INFO_LOG(WII_IPC_HLE, "-->> Execute Command Address: 0x%08x (code: %x, device: %x) ", _Address, Command, DeviceID); @@ -280,7 +280,7 @@ void ExecuteCommand(u32 _Address) u32 Mode = Memory::Read_U32(_Address + 0x10); DeviceID = GetDeviceIDByName(DeviceName); - // check if a device with this name has been created already + // check if a device with this name has been created already if (DeviceID == -1) { if (DeviceName.find("/dev/") != std::string::npos) diff --git a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.h b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.h index 177a3f02ce..612f6f356d 100644 --- a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.h +++ b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.h @@ -43,7 +43,7 @@ void DoState(PointerWrap &p); // Set default content file void SetDefaultContentFile(const std::string& _rFilename); -u32 GetDeviceIDByName(const std::string& _rDeviceName); +int GetDeviceIDByName(const std::string& _rDeviceName); IWII_IPC_HLE_Device* AccessDeviceByID(u32 _ID); diff --git a/Source/Core/Core/Src/PowerPC/Interpreter/Interpreter.cpp b/Source/Core/Core/Src/PowerPC/Interpreter/Interpreter.cpp index 7dca05adde..1e368939cf 100644 --- a/Source/Core/Core/Src/PowerPC/Interpreter/Interpreter.cpp +++ b/Source/Core/Core/Src/PowerPC/Interpreter/Interpreter.cpp @@ -86,7 +86,8 @@ void Trace( UGeckoInstruction &instCode ) char fregs[500]=""; for (int i=0; i<32; i++) { - sprintf(fregs, "%sf%02d: %08x %08x ", fregs, i, PowerPC::ppcState.ps[i][0], PowerPC::ppcState.ps[i][1]); + sprintf(fregs, "%sf%02d: %08llx %08llx ", fregs, i, + PowerPC::ppcState.ps[i][0], PowerPC::ppcState.ps[i][1]); } char ppcInst[256]; diff --git a/Source/Core/Core/Src/PowerPC/Interpreter/Interpreter_SystemRegisters.cpp b/Source/Core/Core/Src/PowerPC/Interpreter/Interpreter_SystemRegisters.cpp index caec9f5866..3b553f097e 100644 --- a/Source/Core/Core/Src/PowerPC/Interpreter/Interpreter_SystemRegisters.cpp +++ b/Source/Core/Core/Src/PowerPC/Interpreter/Interpreter_SystemRegisters.cpp @@ -264,6 +264,7 @@ void Interpreter::mftb(UGeckoInstruction _inst) { int iIndex = (_inst.TBR >> 5) | ((_inst.TBR & 0x1F) << 5); _dbg_assert_msg_(POWERPC, (iIndex == SPR_TL) || (iIndex == SPR_TU), "Invalid mftb"); + (void)iIndex; mfspr(_inst); } diff --git a/Source/Core/Core/Src/PowerPC/Jit64IL/IR_X86.cpp b/Source/Core/Core/Src/PowerPC/Jit64IL/IR_X86.cpp index fb64c33d1d..c385418d63 100644 --- a/Source/Core/Core/Src/PowerPC/Jit64IL/IR_X86.cpp +++ b/Source/Core/Core/Src/PowerPC/Jit64IL/IR_X86.cpp @@ -130,11 +130,6 @@ static OpArg fregLocForSlot(RegInfo& RI, unsigned slot) { return M(&FSlotSet[slot*16]); } -// Used for accessing the top half of a spilled double -static OpArg fregLocForSlotPlusFour(RegInfo& RI, unsigned slot) { - return M(&FSlotSet[slot*16+4]); -} - static unsigned fregCreateSpill(RegInfo& RI, InstLoc I) { unsigned newSpill = ++RI.numFSpills; RI.IInfo[I - RI.FirstI] |= newSpill << 16; diff --git a/Source/Core/VideoCommon/Src/DLCache.cpp b/Source/Core/VideoCommon/Src/DLCache.cpp index aefe27adb5..d643a81015 100644 --- a/Source/Core/VideoCommon/Src/DLCache.cpp +++ b/Source/Core/VideoCommon/Src/DLCache.cpp @@ -402,8 +402,6 @@ bool CompileAndRunDisplayList(u32 address, int size, CachedDisplayList *dl) // Execute u16 numVertices = DataReadU16(); - u64 pre_draw_video_data = (u64)g_pVideoData; - u8* StartAddress = VertexManager::s_pBaseBufferPointer; VertexManager::Flush(); VertexLoaderManager::RunVertices( diff --git a/Source/Plugins/Plugin_VideoOGL/Src/TextureMngr.cpp b/Source/Plugins/Plugin_VideoOGL/Src/TextureMngr.cpp index 0bbd337982..c9ada9878c 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/TextureMngr.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/TextureMngr.cpp @@ -378,8 +378,6 @@ TextureMngr::TCacheEntry* TextureMngr::Load(int texstage, u32 address, int width { //Load Custom textures char texPathTemp[MAX_PATH]; - int oldWidth = width; - int oldHeight = height; sprintf(texPathTemp, "%s_%08x_%i", globals->unique_id, (unsigned int) texHash, tex_format); dfmt = HiresTextures::GetHiresTex(texPathTemp, &width, &height, tex_format, temp);