mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Linux compile fix.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2559 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -34,7 +34,7 @@ CDolLoader::CDolLoader(const char* _szFilename)
|
||||
u8* tmpBuffer = new u8[(size_t)size];
|
||||
|
||||
FILE* pStream = fopen(_szFilename, "rb");
|
||||
fread(tmpBuffer, size_t(size), 1, pStream);
|
||||
fread(tmpBuffer, (size_t)size, 1, pStream);
|
||||
fclose(pStream);
|
||||
|
||||
m_bInit = Initialize(tmpBuffer, (u32)size);
|
||||
|
@ -35,7 +35,7 @@ CARCFile::CARCFile(const std::string& _rFilename)
|
||||
if (pReader != NULL)
|
||||
{
|
||||
u64 FileSize = pReader->GetDataSize();
|
||||
m_pBuffer = new u8[unsigned int(FileSize)];
|
||||
m_pBuffer = new u8[(u32)FileSize];
|
||||
pReader->Read(0, FileSize, m_pBuffer);
|
||||
delete pReader;
|
||||
|
||||
|
@ -106,8 +106,8 @@ bool CNANDContentLoader::CreateFromDirectory(const std::string& _rPath)
|
||||
return false;
|
||||
}
|
||||
u64 Size = File::GetSize(TMDFileName.c_str());
|
||||
u8* pTMD = new u8[unsigned int(Size)];
|
||||
fread(pTMD, size_t(Size), 1, pTMDFile);
|
||||
u8* pTMD = new u8[(u32)Size];
|
||||
fread(pTMD, (size_t)Size, 1, pTMDFile);
|
||||
fclose(pTMDFile);
|
||||
|
||||
//////
|
||||
@ -135,11 +135,11 @@ bool CNANDContentLoader::CreateFromDirectory(const std::string& _rPath)
|
||||
if (pFile != NULL)
|
||||
{
|
||||
u64 Size = File::GetSize(szFilename);
|
||||
rContent.m_pData = new u8[unsigned int(Size)];
|
||||
rContent.m_pData = new u8[(u32)Size];
|
||||
|
||||
_dbg_assert_msg_(BOOT, rContent.m_Size==Size, "TMDLoader: Filesize doesnt fit (%s %i)", szFilename, i);
|
||||
|
||||
fread(rContent.m_pData, size_t(Size), 1, pFile);
|
||||
fread(rContent.m_pData, (size_t)Size, 1, pFile);
|
||||
fclose(pFile);
|
||||
} else {
|
||||
ERROR_LOG(DISCIO, "CreateFromDirectory: error opening %s",
|
||||
|
@ -581,7 +581,7 @@ static void WriteStage(char *&p, int n, u32 texture_mask)
|
||||
|
||||
int texcoord = bpmem.tevorders[n/2].getTexCoord(n&1);
|
||||
int texfun = xfregs.texcoords[texcoord].texmtxinfo.projection;
|
||||
bool bHasTexCoord = unsigned int(texcoord) < bpmem.genMode.numtexgens;
|
||||
bool bHasTexCoord = (u32)texcoord < bpmem.genMode.numtexgens;
|
||||
bool bHasIndStage = bpmem.tevind[n].IsActive() && bpmem.tevind[n].bt < bpmem.genMode.numindstages;
|
||||
|
||||
// HACK to handle cases where the tex gen is not enabled
|
||||
|
Reference in New Issue
Block a user