summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorSND\edgbla_cp <SND\edgbla_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2013-03-19 21:32:10 +0000
committerSND\edgbla_cp <SND\edgbla_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2013-03-19 21:32:10 +0000
commit8ca0520d76626f64dbcf8c1c176045067bba9980 (patch)
treeaa4e4212217795bdae905a85559b2667545a94f7 /plugins
parent355a94d2d7b5300a92eb553cd66ee617942ac5a1 (diff)
downloadpcsxr-8ca0520d76626f64dbcf8c1c176045067bba9980.tar.gz
Patch 14090 (KrossX2);
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@83651 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'plugins')
-rwxr-xr-xplugins/peopsxgl/draw.c3
-rwxr-xr-xplugins/peopsxgl/externals.h1
-rwxr-xr-xplugins/peopsxgl/gpu.c15
3 files changed, 12 insertions, 7 deletions
diff --git a/plugins/peopsxgl/draw.c b/plugins/peopsxgl/draw.c
index a779af27..fd8f4c46 100755
--- a/plugins/peopsxgl/draw.c
+++ b/plugins/peopsxgl/draw.c
@@ -95,7 +95,8 @@ BOOL bIsFirstFrame = TRUE;
int iResX;
int iResY;
-BOOL bKeepRatio = FALSE;
+BOOL bKeepRatio = FALSE;
+BOOL bForceRatio43 = FALSE;
RECT rRatioRect;
// psx mask related vars
diff --git a/plugins/peopsxgl/externals.h b/plugins/peopsxgl/externals.h
index 4d4aea16..e793549e 100755
--- a/plugins/peopsxgl/externals.h
+++ b/plugins/peopsxgl/externals.h
@@ -224,6 +224,7 @@ extern HINSTANCE hInst;
extern int iResX;
extern int iResY;
extern BOOL bKeepRatio;
+extern BOOL bForceRatio43;
extern RECT rRatioRect;
extern BOOL bSnapShot;
extern BOOL bSmallAlpha;
diff --git a/plugins/peopsxgl/gpu.c b/plugins/peopsxgl/gpu.c
index 84d54bcb..d022d19e 100755
--- a/plugins/peopsxgl/gpu.c
+++ b/plugins/peopsxgl/gpu.c
@@ -169,7 +169,7 @@ short imageY0,imageY1;
BOOL bDisplayNotSet = TRUE;
GLuint uiScanLine=0;
int iUseScanLines=0;
-float iScanlineColor[] = {0,0,0, 0.3}; // easy on the eyes.
+float iScanlineColor[] = {0,0,0, 0.3f}; // easy on the eyes.
int lSelectedSlot=0;
unsigned char * pGfxCardScreen=0;
int iBlurBuffer=0;
@@ -1799,17 +1799,20 @@ void ChangeDispOffsetsY(void) // CENTER Y
void SetAspectRatio(void)
{
- float xs,ys,s;RECT r;
+ float xs,ys,s,resx,resy;RECT r;
if(!PSXDisplay.DisplayModeNew.x) return;
if(!PSXDisplay.DisplayModeNew.y) return;
- xs=(float)iResX/(float)PSXDisplay.DisplayModeNew.x;
- ys=(float)iResY/(float)PSXDisplay.DisplayModeNew.y;
+ resx = bForceRatio43 ? 640.0f : (float)PSXDisplay.DisplayModeNew.x;
+ resy = bForceRatio43 ? 480.0f : (float)PSXDisplay.DisplayModeNew.y;
+
+ xs=(float)iResX/resx;
+ ys=(float)iResY/resy;
s=min(xs,ys);
- r.right =(int)((float)PSXDisplay.DisplayModeNew.x*s);
- r.bottom=(int)((float)PSXDisplay.DisplayModeNew.y*s);
+ r.right =(int)(resx*s);
+ r.bottom=(int)(resy*s);
if(r.right > iResX) r.right = iResX;
if(r.bottom > iResY) r.bottom = iResY;
if(r.right < 1) r.right = 1;