mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Revert "Made several variables/parameters unsigned in the DX9, DX11 and OGL plugins. They make more sense like this (given their names)."
Turns out I was wrong in my previous commit. My bad.
This reverts commit 8743166663
.
This commit is contained in:
@ -49,9 +49,9 @@ LPDIRECT3DSURFACE9 back_buffer_z;
|
||||
D3DCAPS9 caps;
|
||||
HWND hWnd;
|
||||
|
||||
static unsigned int multisample;
|
||||
static unsigned int resolution;
|
||||
static unsigned int xres, yres;
|
||||
static int multisample;
|
||||
static int resolution;
|
||||
static int xres, yres;
|
||||
static bool auto_depth_stencil = false;
|
||||
|
||||
#define VENDOR_NVIDIA 4318
|
||||
@ -480,25 +480,24 @@ const D3DCAPS9 &GetCaps()
|
||||
}
|
||||
|
||||
// returns true if size was changed
|
||||
bool FixTextureSize(u32& width, u32& height)
|
||||
bool FixTextureSize(int& width, int& height)
|
||||
{
|
||||
u32 oldw = width;
|
||||
u32 oldh = height;
|
||||
int oldw = width, oldh = height;
|
||||
|
||||
// conditional nonpow2 support should work fine for us
|
||||
if ((caps.TextureCaps & D3DPTEXTURECAPS_POW2) && !(caps.TextureCaps & D3DPTEXTURECAPS_NONPOW2CONDITIONAL))
|
||||
{
|
||||
// all texture dimensions need to be powers of two
|
||||
width = MakePow2(width);
|
||||
height = MakePow2(height);
|
||||
width = (int)MakePow2((u32)width);
|
||||
height = (int)MakePow2((u32)height);
|
||||
}
|
||||
if (caps.TextureCaps & D3DPTEXTURECAPS_SQUAREONLY)
|
||||
{
|
||||
width = height = max(width, height);
|
||||
}
|
||||
|
||||
width = min(width, (u32)caps.MaxTextureWidth);
|
||||
height = min(height, (u32)caps.MaxTextureHeight);
|
||||
width = min(width, (int)caps.MaxTextureWidth);
|
||||
height = min(height, (int)caps.MaxTextureHeight);
|
||||
|
||||
return (width != oldw) || (height != oldh);
|
||||
}
|
||||
@ -516,22 +515,18 @@ bool CheckDepthStencilSupport(D3DFORMAT target_format, D3DFORMAT depth_format)
|
||||
|
||||
D3DFORMAT GetSupportedDepthTextureFormat()
|
||||
{
|
||||
for (size_t i = 0; i < sizeof(DepthFormats)/sizeof(D3DFORMAT); ++i)
|
||||
{
|
||||
for (int i = 0; i < sizeof(DepthFormats)/sizeof(D3DFORMAT); ++i)
|
||||
if (D3D::CheckTextureSupport(D3DUSAGE_DEPTHSTENCIL, DepthFormats[i]))
|
||||
return DepthFormats[i];
|
||||
}
|
||||
|
||||
return D3DFMT_UNKNOWN;
|
||||
}
|
||||
|
||||
D3DFORMAT GetSupportedDepthSurfaceFormat(D3DFORMAT target_format)
|
||||
{
|
||||
for (size_t i = 0; i < sizeof(DepthFormats)/sizeof(D3DFORMAT); ++i)
|
||||
{
|
||||
for (int i = 0; i < sizeof(DepthFormats)/sizeof(D3DFORMAT); ++i)
|
||||
if (D3D::CheckDepthStencilSupport(target_format, DepthFormats[i]))
|
||||
return DepthFormats[i];
|
||||
}
|
||||
|
||||
return D3DFMT_UNKNOWN;
|
||||
}
|
||||
@ -572,7 +567,7 @@ void ShowD3DError(HRESULT err)
|
||||
PanicAlert("Driver Internal Error");
|
||||
break;
|
||||
case D3DERR_OUTOFVIDEOMEMORY:
|
||||
PanicAlert("Out of video memory");
|
||||
PanicAlert("Out of vid mem");
|
||||
break;
|
||||
default:
|
||||
// MessageBox(0,_T("Other error or success"),_T("ERROR"),0);
|
||||
|
Reference in New Issue
Block a user