mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-18 19:28:36 +00:00
small fixes
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1364 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
356f57baec
commit
e6022acf26
@ -481,14 +481,9 @@ error_jmp:
|
||||
|
||||
void GetCurrentDirectory(std::string& _rDirectory)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
|
||||
char tmpBuffer[MAX_PATH+1];
|
||||
getcwd(tmpBuffer, MAX_PATH);
|
||||
_rDirectory = tmpBuffer;
|
||||
#else
|
||||
PanicAlert("Missing Linux support of GetCurrentDirectory");
|
||||
#endif
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
@ -314,12 +314,13 @@ void ExecuteCommand(u32 _Address)
|
||||
|
||||
// F|RES: prolly the re-open is just a mode change
|
||||
|
||||
LOG(WII_IPC_FILEIO, "IOP: ReOpen (Device=%s, DeviceID=%08x, Mode=%i)",
|
||||
pDevice->GetDeviceName().c_str(), DeviceID, Mode);
|
||||
|
||||
if(DeviceName.find("/dev/") == std::string::npos)
|
||||
{
|
||||
LOG(WII_IPC_FILEIO, "IOP: ReOpen (Device=%s, DeviceID=%08x, Mode=%i)",
|
||||
pDevice->GetDeviceName().c_str(), DeviceID, Mode);
|
||||
|
||||
u32 Mode = Memory::Read_U32(_Address + 0x10);
|
||||
u32 newMode = Memory::Read_U32(_Address + 0x10);
|
||||
|
||||
// We may not have a file handle at this point, in Mario Kart I got a
|
||||
// Open > Failed > ... other stuff > ReOpen call sequence, in that case
|
||||
@ -328,13 +329,10 @@ void ExecuteCommand(u32 _Address)
|
||||
if(pDevice->ReturnFileHandle())
|
||||
Memory::Write_U32(DeviceID, _Address + 4);
|
||||
else
|
||||
GenerateReply = pDevice->Open(_Address, Mode);
|
||||
GenerateReply = pDevice->Open(_Address, newMode);
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG(WII_IPC_HLE, "IOP: ReOpen (Device=%s, DeviceID=%08x, Mode=%i)",
|
||||
pDevice->GetDeviceName().c_str(), pDevice->GetDeviceID(), Mode);
|
||||
|
||||
// We have already opened this device, return -6
|
||||
Memory::Write_U32(u32(-6), _Address + 4);
|
||||
}
|
||||
|
@ -245,8 +245,6 @@ s32 CWII_IPC_HLE_Device_fs::ExecuteCommand(u32 _Parameter, u32 _BufferIn, u32 _B
|
||||
LOG(WII_IPC_FILEIO, " InBufferSize: %i OutBufferSize: %i", _BufferInSize, _BufferOutSize);
|
||||
|
||||
|
||||
u32 Addr = _BufferOut;
|
||||
|
||||
/* Memory::Write_U32(Addr, a); Addr += 4;
|
||||
Memory::Write_U32(Addr, b); Addr += 4;
|
||||
Memory::Write_U32(Addr, c); Addr += 4;
|
||||
|
@ -306,11 +306,11 @@ bool SymbolDB::LoadMap(const char *filename)
|
||||
bool SymbolDB::SaveMap(const char *filename, bool WithCodes) const
|
||||
{
|
||||
// Format the name for the codes version
|
||||
std::string Temp = filename;
|
||||
if(WithCodes) Temp = Temp.substr(0, Temp.find_last_of(".")) + "_code.map";
|
||||
std::string mapFile = filename;
|
||||
if(WithCodes) mapFile = mapFile.substr(0, mapFile.find_last_of(".")) + "_code.map";
|
||||
|
||||
// Make a file
|
||||
FILE *f = fopen(Temp.c_str(), "w");
|
||||
FILE *f = fopen(mapFile.c_str(), "w");
|
||||
if (!f) return false;
|
||||
|
||||
|
||||
@ -342,13 +342,13 @@ bool SymbolDB::SaveMap(const char *filename, bool WithCodes) const
|
||||
|
||||
/* To make nice straight lines we fill out the name with spaces, we also cut off
|
||||
all names longer than 25 letters */
|
||||
std::string Temp;
|
||||
for(int i = 0; i < 25; i++)
|
||||
std::string TempSym;
|
||||
for(u32 i = 0; i < 25; i++)
|
||||
{
|
||||
if(i < LastSymbolName.size())
|
||||
Temp += LastSymbolName[i];
|
||||
TempSym += LastSymbolName[i];
|
||||
else
|
||||
Temp += " ";
|
||||
TempSym += " ";
|
||||
}
|
||||
|
||||
// We currently skip the last block because we don't know how long it goes
|
||||
@ -362,7 +362,7 @@ bool SymbolDB::SaveMap(const char *filename, bool WithCodes) const
|
||||
{
|
||||
int Address = LastAddress + i;
|
||||
fprintf(f,"%08x %i %20s %s\n", Address,
|
||||
0, Temp.c_str(), debugger->disasm(Address));
|
||||
0, TempSym.c_str(), debugger->disasm(Address));
|
||||
}
|
||||
fprintf(f, "\n"); // Write a blank line after each block
|
||||
}
|
||||
@ -370,10 +370,10 @@ bool SymbolDB::SaveMap(const char *filename, bool WithCodes) const
|
||||
// ---------------
|
||||
|
||||
// Show success message
|
||||
wxMessageBox(wxString::Format("Saved %s", Temp.c_str()));
|
||||
wxMessageBox(wxString::Format(wxT("Saved %s"), mapFile.c_str()));
|
||||
|
||||
// Close the file and return
|
||||
fclose(f);
|
||||
return true;
|
||||
}
|
||||
// ===========
|
||||
// ===========
|
||||
|
@ -143,7 +143,7 @@ void VertexLoader::CompileVertexTranslator()
|
||||
{
|
||||
m_VertexSize = 0;
|
||||
const TVtxAttr &vtx_attr = m_VtxAttr;
|
||||
const TVtxDesc &vtx_desc = m_VtxDesc;
|
||||
//const TVtxDesc &vtx_desc = m_VtxDesc;
|
||||
|
||||
#ifdef USE_JIT
|
||||
u8 *old_code_ptr = GetWritableCodePtr();
|
||||
@ -688,4 +688,4 @@ void VertexLoader::AppendToString(std::string *dest) {
|
||||
dest->append(StringFromFormat("sz: %i skin: %i Pos: %i %s %s Nrm: %i %s %s - %i vtx\n",
|
||||
m_VertexSize, m_VtxDesc.PosMatIdx, m_VtxAttr.PosElements ? 3 : 2, posMode[m_VtxDesc.Position], posFormats[m_VtxAttr.PosFormat],
|
||||
m_VtxAttr.NormalElements, posMode[m_VtxDesc.Normal], posFormats[m_VtxAttr.NormalFormat], m_numLoadedVertices));
|
||||
}
|
||||
}
|
||||
|
@ -70,8 +70,8 @@ private:
|
||||
struct Set {
|
||||
Set() {}
|
||||
Set(int gc_size_, TPipelineFunction function_) : gc_size(gc_size_), function(function_) {}
|
||||
TPipelineFunction function;
|
||||
int gc_size;
|
||||
TPipelineFunction function;
|
||||
// int pc_size;
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user