Patch by omegadox. fixed bloom

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@844 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
daco65 2008-10-12 15:12:51 +00:00
parent 3d345450f5
commit c8c160b430
3 changed files with 8 additions and 8 deletions

View File

@ -164,7 +164,7 @@ bool OpenGL_Create(SVideoInitialize &_VideoInitialize, int _iwidth, int _iheight
float FactorH = 480.0f / (float)nBackbufferHeight; float FactorH = 480.0f / (float)nBackbufferHeight;
float Max = (FactorW < FactorH) ? FactorH : FactorW; float Max = (FactorW < FactorH) ? FactorH : FactorW;
if(g_Config.bStretchToFit) if(g_Config.bStretchToFit && g_Config.renderToMainframe)
{ {
MValueX = 1.0f / FactorW; MValueX = 1.0f / FactorW;
MValueY = 1.0f / FactorH; MValueY = 1.0f / FactorH;
@ -619,7 +619,7 @@ void OpenGL_Update()
float Max = (FactorW < FactorH) ? FactorH : FactorW; float Max = (FactorW < FactorH) ? FactorH : FactorW;
AR = (float)nBackbufferWidth / (float)nBackbufferHeight; AR = (float)nBackbufferWidth / (float)nBackbufferHeight;
if(g_Config.bStretchToFit) if(g_Config.bStretchToFit && g_Config.renderToMainframe)
{ {
MValueX = 1; MValueX = 1;
MValueY = 1; MValueY = 1;

View File

@ -459,7 +459,7 @@ void Renderer::ReinitView(int nNewWidth, int nNewHeight)
} }
int Renderer::GetTargetWidth() int Renderer::GetTargetWidth()
{ {
if(g_Config.bStretchToFit) if(g_Config.bStretchToFit && g_Config.renderToMainframe)
return 640; return 640;
else else
return nBackbufferWidth; // return the actual window width return nBackbufferWidth; // return the actual window width
@ -467,7 +467,7 @@ int Renderer::GetTargetWidth()
int Renderer::GetTargetHeight() int Renderer::GetTargetHeight()
{ {
if(g_Config.bStretchToFit) if(g_Config.bStretchToFit && g_Config.renderToMainframe)
return 480; return 480;
else else
return nBackbufferHeight; // return the actual window height return nBackbufferHeight; // return the actual window height
@ -562,7 +562,7 @@ void Renderer::FlushZBufferAlphaToTarget()
for(int i = 1; i < 8; ++i) TextureMngr::DisableStage(i); for(int i = 1; i < 8; ++i) TextureMngr::DisableStage(i);
GL_REPORT_ERRORD(); GL_REPORT_ERRORD();
if(g_Config.bStretchToFit) if(g_Config.bStretchToFit && g_Config.renderToMainframe)
{ {
//TODO: Do Correctly in a bit //TODO: Do Correctly in a bit
float FactorW = (float)640 / (float)nBackbufferWidth; float FactorW = (float)640 / (float)nBackbufferWidth;

View File

@ -392,7 +392,7 @@ void VertexShaderMngr::SetConstants(VERTEXSHADER& vs)
hei = ceil(fabs(2 * rawViewport[1])); hei = ceil(fabs(2 * rawViewport[1]));
} }
if(g_Config.bStretchToFit) if(g_Config.bStretchToFit && g_Config.renderToMainframe)
{ {
glViewport( glViewport(
(int)(rawViewport[3]-rawViewport[0]-342) + xoffs, (int)(rawViewport[3]-rawViewport[0]-342) + xoffs,
@ -428,7 +428,7 @@ void VertexShaderMngr::SetConstants(VERTEXSHADER& vs)
g_fProjectionMatrix[8] = 0.0f; g_fProjectionMatrix[8] = 0.0f;
g_fProjectionMatrix[9] = 0.0f; g_fProjectionMatrix[9] = 0.0f;
g_fProjectionMatrix[10] = rawProjection[4]; g_fProjectionMatrix[10] = rawProjection[4];
g_fProjectionMatrix[11] = -(0.0f-rawProjection[5]); g_fProjectionMatrix[11] = rawProjection[5];
g_fProjectionMatrix[12] = 0.0f; g_fProjectionMatrix[12] = 0.0f;
g_fProjectionMatrix[13] = 0.0f; g_fProjectionMatrix[13] = 0.0f;
@ -449,7 +449,7 @@ void VertexShaderMngr::SetConstants(VERTEXSHADER& vs)
g_fProjectionMatrix[8] = 0.0f; g_fProjectionMatrix[8] = 0.0f;
g_fProjectionMatrix[9] = 0.0f; g_fProjectionMatrix[9] = 0.0f;
g_fProjectionMatrix[10] = rawProjection[4]; g_fProjectionMatrix[10] = rawProjection[4];
g_fProjectionMatrix[11] = -(0.0f-rawProjection[5]); g_fProjectionMatrix[11] = -rawProjection[5];
g_fProjectionMatrix[12] = 0; g_fProjectionMatrix[12] = 0;
g_fProjectionMatrix[13] = 0; g_fProjectionMatrix[13] = 0;