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