fix: HighDef check? & add setres thing
This commit is contained in:
@@ -854,16 +854,19 @@ ID3D11DeviceContext *Renderer::InitialiseContext(bool fromPresent)
|
||||
return deviceContext;
|
||||
}
|
||||
|
||||
//str1k3r - yo fuck you 4J and your hardcoded ass game
|
||||
void Renderer::setResolution(int ScreenWidth, int ScreenHeight)
|
||||
{
|
||||
if(kScreenHeight != ScreenHeight && kScreenWidth != ScreenWidth)
|
||||
{
|
||||
kScreenHeight = ScreenHeight;
|
||||
kScreenWidth = ScreenWidth;
|
||||
}
|
||||
}
|
||||
|
||||
bool Renderer::IsHiDef()
|
||||
{
|
||||
if(kScreenHeight >= 720 && kScreenWidth >= 1280)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return (kScreenHeight >= 720 && kScreenWidth >= 1280);
|
||||
}
|
||||
|
||||
bool Renderer::IsWidescreen()
|
||||
@@ -871,10 +874,10 @@ bool Renderer::IsWidescreen()
|
||||
if (kScreenHeight == 0) return false;
|
||||
|
||||
float aspectRatio = static_cast<float>(kScreenWidth) / kScreenHeight;
|
||||
return (aspectRatio >= 1.6f);
|
||||
return (aspectRatio >= 1.56f);
|
||||
}
|
||||
|
||||
void Renderer::Present(int ScreenWidth, int ScreenHeight)
|
||||
void Renderer::Present()
|
||||
{
|
||||
PROFILER_SCOPE("Renderer::Present", "Present", MP_MAGENTA);
|
||||
|
||||
@@ -882,9 +885,6 @@ void Renderer::Present(int ScreenWidth, int ScreenHeight)
|
||||
{
|
||||
PROFILER_SCOPE("Renderer::Present", "ScreenGrab", MP_MAGENTA);
|
||||
|
||||
kScreenHeight = ScreenHeight;
|
||||
kScreenWidth = ScreenWidth;
|
||||
|
||||
unsigned char *linearData = new unsigned char[kScreenWidth * kScreenHeight * 4];
|
||||
|
||||
ID3D11Resource *backBufferResource = NULL;
|
||||
|
||||
Reference in New Issue
Block a user