Warning fixes/suppressions(aui), assorted code cleanup, d3d vertex shader cache expiration interval increased.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4165 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
hrydgard
2009-09-02 18:55:36 +00:00
parent dd7eba0bb9
commit e97bc516e6
15 changed files with 68 additions and 82 deletions

View File

@ -309,7 +309,7 @@ bool CEXIETHERNET::sendPacket(u8 *etherpckt, int size)
bool CEXIETHERNET::handleRecvdPacket()
{
int rbwpp = mCbw.p_write() + CB_OFFSET; //read buffer write page pointer
int rbwpp = (int)(mCbw.p_write() + CB_OFFSET); // read buffer write page pointer
u32 available_bytes_in_cb;
if (rbwpp < mRBRPP)
available_bytes_in_cb = mRBRPP - rbwpp;
@ -328,7 +328,7 @@ bool CEXIETHERNET::handleRecvdPacket()
cbwriteDescriptor(mRecvBufferLength);
mCbw.write(mRecvBuffer, mRecvBufferLength);
mCbw.align();
rbwpp = mCbw.p_write() + CB_OFFSET;
rbwpp = (int)(mCbw.p_write() + CB_OFFSET);
//DUMPWORD(rbwpp);
//mPacketsRcvd++;
@ -384,7 +384,7 @@ bool CEXIETHERNET::startRecv()
return true;
}
DWORD res = ReadFile(mHAdapter, mRecvBuffer, mRecvBuffer.size(),
DWORD res = ReadFile(mHAdapter, mRecvBuffer, (DWORD)mRecvBuffer.size(),
&mRecvBufferLength, &mReadOverlapped);
if (res)
@ -471,11 +471,11 @@ bool CEXIETHERNET::cbwriteDescriptor(u32 size)
u32 npp;
if (mCbw.p_write() + size < CB_SIZE)
{
npp = mCbw.p_write() + size + CB_OFFSET;
npp = (u32)(mCbw.p_write() + size + CB_OFFSET);
}
else
{
npp = mCbw.p_write() + size + CB_OFFSET - CB_SIZE;
npp = (u32)(mCbw.p_write() + size + CB_OFFSET - CB_SIZE);
}
npp = (npp + 0xff) & ~0xff;

View File

@ -296,7 +296,7 @@ u32 CWII_IPC_HLE_Device_net_ip_top::ExecuteCommand(u32 _Command, u32 _BufferIn,
u32 TYPE = Memory::Read_U32(_BufferIn + 0x04);
u32 PROT = Memory::Read_U32(_BufferIn + 0x04 * 2);
u32 Unk1 = Memory::Read_U32(_BufferIn + 0x04 * 3);
u32 Socket = socket(AF, TYPE, PROT);
u32 Socket = (u32)socket(AF, TYPE, PROT);
return Common::swap32(Socket); // So it doesn't get mangled later on
}
break;
@ -322,13 +322,13 @@ u32 CWII_IPC_HLE_Device_net_ip_top::ExecuteCommand(u32 _Command, u32 _BufferIn,
return Return;
}
break;
case IOCTL_SO_ACCEPT:
case IOCTL_SO_ACCEPT:
{
//TODO: (Sonic)Check if this is correct
u32 S = Memory::Read_U32(_BufferIn);
socklen_t addrlen;
struct sockaddr_in address;
int Return = accept(S, (struct sockaddr *)&address, &addrlen);
u32 Return = (u32)accept(S, (struct sockaddr *)&address, &addrlen);
GC_sockaddr_in *addr = (GC_sockaddr_in*)Memory::GetPointer(BufferOut);
addr->sin_family = (u8)address.sin_family;
addr->sin_addr.s_addr_ = address.sin_addr.s_addr;

View File

@ -370,21 +370,23 @@ void CFrame::OnAllowNotebookDnD(wxAuiNotebookEvent& event)
void CFrame::HidePane()
{
// Get the first notebook
wxAuiNotebook * NB;
wxAuiNotebook * NB = NULL;
for (u32 i = 0; i < m_Mgr->GetAllPanes().GetCount(); i++)
{
if (m_Mgr->GetAllPanes().Item(i).window->IsKindOf(CLASSINFO(wxAuiNotebook)))
NB = (wxAuiNotebook*)m_Mgr->GetAllPanes().Item(i).window;
}
if (NB->GetPageCount() == 0)
m_Mgr->GetPane(wxT("Pane 1")).Hide();
else
m_Mgr->GetPane(wxT("Pane 1")).Show();
m_Mgr->Update();
if (NB) {
if (NB->GetPageCount() == 0)
m_Mgr->GetPane(wxT("Pane 1")).Hide();
else
m_Mgr->GetPane(wxT("Pane 1")).Show();
m_Mgr->Update();
}
SetSimplePaneSize();
}
void CFrame::DoRemovePageString(wxString Str, bool _hide, bool _destroy)
void CFrame::DoRemovePageString(wxString Str, bool /*_hide*/, bool _destroy)
{
for (u32 i = 0; i < m_Mgr->GetAllPanes().GetCount(); i++)
{
@ -673,7 +675,7 @@ void CFrame::OnDropDownToolbarSelect(wxCommandEvent& event)
void CFrame::ResetToolbarStyle()
{
wxAuiPaneInfoArray& AllPanes = m_Mgr->GetAllPanes();
for (int i = 0, Count = AllPanes.GetCount(); i < Count; ++i)
for (int i = 0, Count = (int)AllPanes.GetCount(); i < Count; ++i)
{
wxAuiPaneInfo& Pane = AllPanes.Item(i);
if (Pane.window->IsKindOf(CLASSINFO(wxAuiToolBar)))
@ -726,7 +728,7 @@ void CFrame::TogglePaneStyle(bool On, int EventId)
void CFrame::ToggleNotebookStyle(long Style)
{
wxAuiPaneInfoArray& AllPanes = m_Mgr->GetAllPanes();
for (int i = 0, Count = AllPanes.GetCount(); i < Count; ++i)
for (int i = 0, Count = (int)AllPanes.GetCount(); i < Count; ++i)
{
wxAuiPaneInfo& Pane = AllPanes.Item(i);
if (Pane.window->IsKindOf(CLASSINFO(wxAuiNotebook)))

View File

@ -224,7 +224,7 @@ void BPWritten(const BPCmd& bp)
float xfbLines = ((bpmem.copyTexSrcWH.y + 1.0f) * yScale);
if ((u32)xfbLines > MAX_XFB_HEIGHT)
{
WARN_LOG(VIDEO, "Tried to scale EFB to too many XFB lines (%f)", xfbLines);
INFO_LOG(VIDEO, "Tried to scale EFB to too many XFB lines (%f)", xfbLines);
xfbLines = MAX_XFB_HEIGHT;
}
@ -460,6 +460,7 @@ void BPWritten(const BPCmd& bp)
case BPMEM_TX_SETMODE0+1:
case BPMEM_TX_SETMODE0+2:
case BPMEM_TX_SETMODE0+3:
SetSamplerState(bp);
case BPMEM_TX_SETMODE1:
case BPMEM_TX_SETMODE1+1:
case BPMEM_TX_SETMODE1+2:
@ -472,7 +473,6 @@ void BPWritten(const BPCmd& bp)
case BPMEM_TX_SETMODE1_4+1:
case BPMEM_TX_SETMODE1_4+2:
case BPMEM_TX_SETMODE1_4+3:
SetSamplerState(bp);
break;
// --------------------------------------------
// BPMEM_TX_SETIMAGE0 - Texture width, height, format

View File

@ -322,7 +322,7 @@ inline u32 makecol(int r, int g, int b, int a)
void decodeDXTBlock(u32 *dst, const DXTBlock *src, int pitch)
{
// S3TC Decoder (Note: GCN decodes differently from PC)
// S3TC Decoder (Note: GCN decodes differently from PC so we can't use native support)
u16 c1 = Common::swap16(src->color1);
u16 c2 = Common::swap16(src->color2);
u8 blue1 = Convert5To8(c1 & 0x1F);
@ -331,9 +331,7 @@ void decodeDXTBlock(u32 *dst, const DXTBlock *src, int pitch)
u8 green2 = Convert6To8((c2 >> 5) & 0x3F);
u8 red1 = Convert5To8((c1 >> 11) & 0x1F);
u8 red2 = Convert5To8((c2 >> 11) & 0x1F);
int colors[4];
if (c1 > c2)
{
colors[0] = makecol(red1, green1, blue1, 255);
@ -457,10 +455,7 @@ PC_TexFormat TexDecoder_Decode_real(u8 *dst, const u8 *src, int width, int heigh
for (int y = 0; y < height; y += 4)
for (int x = 0; x < width; x += 8)
for (int iy = 0; iy < 4; iy++, src += 8)
{
//decodebytesIA4((u32*)dst+(y+iy)*width+x, src, 8);
decodebytesIA4((u16*)dst + (y + iy) * width + x, src);
}
}
return PC_TEX_FMT_IA4_AS_IA8;
case GX_TF_IA8: