mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Merge pull request #6931 from CPkmn/patch-6
D3D9 Get maxAnisotropyLevel from device caps
This commit is contained in:
commit
b9d3443e1b
1 changed files with 14 additions and 2 deletions
|
@ -74,8 +74,20 @@ TextureCacheDX9::TextureCacheDX9() : clearCacheNextFrame_(false), lowMemoryMode_
|
|||
memset(clutBufConverted_, 0, 4096 * sizeof(u32));
|
||||
memset(clutBufRaw_, 0, 4096 * sizeof(u32));
|
||||
|
||||
// TODO: Get from device caps!
|
||||
maxAnisotropyLevel = 16;
|
||||
D3DCAPS9 pCaps;
|
||||
ZeroMemory(&pCaps, sizeof(pCaps));
|
||||
HRESULT result = 0;
|
||||
if (pD3DdeviceEx) {
|
||||
result = pD3DdeviceEx->GetDeviceCaps(&pCaps);
|
||||
} else {
|
||||
result = pD3Ddevice->GetDeviceCaps(&pCaps);
|
||||
}
|
||||
if (FAILED(result)) {
|
||||
WARN_LOG(G3D, "Failed to get the device caps!");
|
||||
maxAnisotropyLevel = 16;
|
||||
} else {
|
||||
maxAnisotropyLevel = pCaps.MaxAnisotropy;
|
||||
}
|
||||
SetupTextureDecoder();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue