mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-25 15:19:42 -06:00
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:
@ -15,10 +15,10 @@
|
|||||||
// Official SVN repository and contact information can be found at
|
// Official SVN repository and contact information can be found at
|
||||||
// http://code.google.com/p/dolphin-emu/
|
// http://code.google.com/p/dolphin-emu/
|
||||||
|
|
||||||
#include "NandPaths.h"
|
|
||||||
#include "CommonPaths.h"
|
#include "CommonPaths.h"
|
||||||
#include "FileUtil.h"
|
#include "FileUtil.h"
|
||||||
#include <string.h>
|
#include "NandPaths.h"
|
||||||
|
|
||||||
namespace Common
|
namespace Common
|
||||||
{
|
{
|
||||||
std::string CreateTicketFileName(u64 _TitleID)
|
std::string CreateTicketFileName(u64 _TitleID)
|
||||||
@ -37,4 +37,4 @@ std::string CreateTitleContentPath(u64 _TitleID)
|
|||||||
return ContentPath;
|
return ContentPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -17,6 +17,8 @@
|
|||||||
|
|
||||||
#ifndef __NANDPATHS_H__
|
#ifndef __NANDPATHS_H__
|
||||||
#define __NANDPATHS_H__
|
#define __NANDPATHS_H__
|
||||||
|
|
||||||
|
#include <string>
|
||||||
#include "CommonTypes.h"
|
#include "CommonTypes.h"
|
||||||
|
|
||||||
#define TITLEID_SYSMENU 0x0000000100000002ull
|
#define TITLEID_SYSMENU 0x0000000100000002ull
|
||||||
|
@ -47,7 +47,8 @@ SCoreStartupParameter::SCoreStartupParameter()
|
|||||||
bLockThreads(false),
|
bLockThreads(false),
|
||||||
bEnableCheats(false),
|
bEnableCheats(false),
|
||||||
bRunCompareServer(false), bRunCompareClient(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),
|
bConfirmStop(false), bHideCursor(false),
|
||||||
bAutoHideCursor(false), bUsePanicHandlers(true),
|
bAutoHideCursor(false), bUsePanicHandlers(true),
|
||||||
iRenderWindowXPos(0), iRenderWindowYPos(0),
|
iRenderWindowXPos(0), iRenderWindowYPos(0),
|
||||||
|
@ -138,7 +138,7 @@ void SetDefaultContentFile(const std::string& _rFilename)
|
|||||||
pDevice->LoadWAD(_rFilename);
|
pDevice->LoadWAD(_rFilename);
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 GetDeviceIDByName(const std::string& _rDeviceName)
|
int GetDeviceIDByName(const std::string& _rDeviceName)
|
||||||
{
|
{
|
||||||
TDeviceMap::const_iterator itr = g_DeviceMap.begin();
|
TDeviceMap::const_iterator itr = g_DeviceMap.begin();
|
||||||
while(itr != g_DeviceMap.end())
|
while(itr != g_DeviceMap.end())
|
||||||
@ -259,7 +259,7 @@ void ExecuteCommand(u32 _Address)
|
|||||||
bool CmdSuccess = false;
|
bool CmdSuccess = false;
|
||||||
|
|
||||||
ECommandType Command = static_cast<ECommandType>(Memory::Read_U32(_Address));
|
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);
|
IWII_IPC_HLE_Device* pDevice = AccessDeviceByID(DeviceID);
|
||||||
|
|
||||||
INFO_LOG(WII_IPC_HLE, "-->> Execute Command Address: 0x%08x (code: %x, device: %x) ", _Address, Command, 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);
|
u32 Mode = Memory::Read_U32(_Address + 0x10);
|
||||||
DeviceID = GetDeviceIDByName(DeviceName);
|
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 (DeviceID == -1)
|
||||||
{
|
{
|
||||||
if (DeviceName.find("/dev/") != std::string::npos)
|
if (DeviceName.find("/dev/") != std::string::npos)
|
||||||
|
@ -43,7 +43,7 @@ void DoState(PointerWrap &p);
|
|||||||
// Set default content file
|
// Set default content file
|
||||||
void SetDefaultContentFile(const std::string& _rFilename);
|
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);
|
IWII_IPC_HLE_Device* AccessDeviceByID(u32 _ID);
|
||||||
|
|
||||||
|
@ -86,7 +86,8 @@ void Trace( UGeckoInstruction &instCode )
|
|||||||
|
|
||||||
char fregs[500]="";
|
char fregs[500]="";
|
||||||
for (int i=0; i<32; i++) {
|
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];
|
char ppcInst[256];
|
||||||
|
@ -264,6 +264,7 @@ void Interpreter::mftb(UGeckoInstruction _inst)
|
|||||||
{
|
{
|
||||||
int iIndex = (_inst.TBR >> 5) | ((_inst.TBR & 0x1F) << 5);
|
int iIndex = (_inst.TBR >> 5) | ((_inst.TBR & 0x1F) << 5);
|
||||||
_dbg_assert_msg_(POWERPC, (iIndex == SPR_TL) || (iIndex == SPR_TU), "Invalid mftb");
|
_dbg_assert_msg_(POWERPC, (iIndex == SPR_TL) || (iIndex == SPR_TU), "Invalid mftb");
|
||||||
|
(void)iIndex;
|
||||||
mfspr(_inst);
|
mfspr(_inst);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -130,11 +130,6 @@ static OpArg fregLocForSlot(RegInfo& RI, unsigned slot) {
|
|||||||
return M(&FSlotSet[slot*16]);
|
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) {
|
static unsigned fregCreateSpill(RegInfo& RI, InstLoc I) {
|
||||||
unsigned newSpill = ++RI.numFSpills;
|
unsigned newSpill = ++RI.numFSpills;
|
||||||
RI.IInfo[I - RI.FirstI] |= newSpill << 16;
|
RI.IInfo[I - RI.FirstI] |= newSpill << 16;
|
||||||
|
@ -402,8 +402,6 @@ bool CompileAndRunDisplayList(u32 address, int size, CachedDisplayList *dl)
|
|||||||
// Execute
|
// Execute
|
||||||
u16 numVertices = DataReadU16();
|
u16 numVertices = DataReadU16();
|
||||||
|
|
||||||
u64 pre_draw_video_data = (u64)g_pVideoData;
|
|
||||||
|
|
||||||
u8* StartAddress = VertexManager::s_pBaseBufferPointer;
|
u8* StartAddress = VertexManager::s_pBaseBufferPointer;
|
||||||
VertexManager::Flush();
|
VertexManager::Flush();
|
||||||
VertexLoaderManager::RunVertices(
|
VertexLoaderManager::RunVertices(
|
||||||
|
@ -378,8 +378,6 @@ TextureMngr::TCacheEntry* TextureMngr::Load(int texstage, u32 address, int width
|
|||||||
{
|
{
|
||||||
//Load Custom textures
|
//Load Custom textures
|
||||||
char texPathTemp[MAX_PATH];
|
char texPathTemp[MAX_PATH];
|
||||||
int oldWidth = width;
|
|
||||||
int oldHeight = height;
|
|
||||||
|
|
||||||
sprintf(texPathTemp, "%s_%08x_%i", globals->unique_id, (unsigned int) texHash, tex_format);
|
sprintf(texPathTemp, "%s_%08x_%i", globals->unique_id, (unsigned int) texHash, tex_format);
|
||||||
dfmt = HiresTextures::GetHiresTex(texPathTemp, &width, &height, tex_format, temp);
|
dfmt = HiresTextures::GetHiresTex(texPathTemp, &width, &height, tex_format, temp);
|
||||||
|
Reference in New Issue
Block a user