std::string needs <string> rather than <string.h>.

Also some minor cleanup.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6184 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Soren Jorvang 2010-09-06 12:14:18 +00:00
parent 34aebffff9
commit d02dd6d3fa
10 changed files with 14 additions and 18 deletions

View File

@ -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 <string.h>
#include "NandPaths.h"
namespace Common
{
std::string CreateTicketFileName(u64 _TitleID)

View File

@ -17,6 +17,8 @@
#ifndef __NANDPATHS_H__
#define __NANDPATHS_H__
#include <string>
#include "CommonTypes.h"
#define TITLEID_SYSMENU 0x0000000100000002ull

View File

@ -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),

View File

@ -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<ECommandType>(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)

View File

@ -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);

View File

@ -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];

View File

@ -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);
}

View File

@ -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;

View File

@ -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(

View File

@ -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);