Assorted warning fixes, small mixer improvement when both DTK and HLE audio are used

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1100 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
hrydgard
2008-11-09 13:17:17 +00:00
parent 42a515ba76
commit 530fb9ba3d
11 changed files with 24 additions and 29 deletions

View File

@ -232,7 +232,7 @@ TextureMngr::TCacheEntry* TextureMngr::Load(int texstage, u32 address, int width
/*if (width == entry.w && height==entry.h && format==entry.fmt)
{
LPDIRECT3DTEXTURE9 tex = entry.texture;
int bs = TexDecoder_GetBlockWidthInTexels(format)-1; //TexelSizeInNibbles(format)*width*height/16;
int bs = TexDecoder_GetBlockWidthInTexels(format)-1;
int expandedWidth = (width+bs) & (~bs);
D3DFORMAT dfmt = TexDecoder_Decode(temp,ptr,expandedWidth,height,format, tlutaddr, tlutfmt);
ReplaceTexture2D(tex,temp,width,height,expandedWidth,dfmt);
@ -247,7 +247,7 @@ TextureMngr::TCacheEntry* TextureMngr::Load(int texstage, u32 address, int width
}
}
int bs = TexDecoder_GetBlockWidthInTexels(format) - 1; //TexelSizeInNibbles(format)*width*height/16;
int bs = TexDecoder_GetBlockWidthInTexels(format) - 1;
int expandedWidth = (width + bs) & (~bs);
PC_TexFormat dfmt = TexDecoder_Decode(temp, ptr, expandedWidth, height, format, tlutaddr, tlutfmt);
@ -261,9 +261,9 @@ TextureMngr::TCacheEntry* TextureMngr::Load(int texstage, u32 address, int width
((u32 *)ptr)[entry.hashoffset] = entry.hash;
entry.addr = address;
entry.isRenderTarget=false;
entry.isNonPow2 = ((width&(width-1)) || (height&(height-1)));
entry.isRenderTarget = false;
entry.isNonPow2 = ((width & (width - 1)) || (height & (height - 1)));
glGenTextures(1, (GLuint *)&entry.texture);
GLenum target = entry.isNonPow2 ? GL_TEXTURE_RECTANGLE_ARB : GL_TEXTURE_2D;
@ -307,7 +307,7 @@ TextureMngr::TCacheEntry* TextureMngr::Load(int texstage, u32 address, int width
}
INCSTAT(stats.numTexturesCreated);
SETSTAT(stats.numTexturesAlive,textures.size());
SETSTAT(stats.numTexturesAlive, textures.size());
//glEnable(entry.isNonPow2?GL_TEXTURE_RECTANGLE_ARB:GL_TEXTURE_2D);