summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorSND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2010-01-07 03:10:51 +0000
committerSND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2010-01-07 03:10:51 +0000
commitcd40452e610e32935cfc5bae96cc77209f79e7d9 (patch)
tree9a633dcf889ee7546dda44aeff58edbe945e1f99 /plugins
parent81b8c85841f874e07b220297770877d224d498ed (diff)
downloadpcsxr-cd40452e610e32935cfc5bae96cc77209f79e7d9.tar.gz
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@40064 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'plugins')
-rw-r--r--plugins/dfxvideo/draw.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/plugins/dfxvideo/draw.c b/plugins/dfxvideo/draw.c
index d89d75c2..fe7f87a6 100644
--- a/plugins/dfxvideo/draw.c
+++ b/plugins/dfxvideo/draw.c
@@ -47,8 +47,6 @@ unsigned short usCursorActive = 0;
//unsigned int LUT16to32[65536];
//unsigned int RGBtoYUV[65536];
-float pixelaspect;
-
#include <sys/ipc.h>
#include <sys/shm.h>
#include <X11/extensions/Xv.h>
@@ -1014,9 +1012,6 @@ void CreateDisplay(void)
screen=DefaultScreenOfDisplay(display);
- pixelaspect = ((float)DisplayWidth(display, myscreen) / (float)DisplayWidthMM(display, myscreen)) /
- ((float)DisplayHeight(display, myscreen) / (float)DisplayHeightMM(display, myscreen));
-
root_window_id=RootWindow(display,DefaultScreen(display));
//Look for an Xvideo RGB port
@@ -1536,24 +1531,23 @@ void RGB2YUV(uint32_t *s, int width, int height, uint32_t *d)
extern time_t tStart;
-//Note: dest w,h are both input and output variables
+//Note: dest x,y,w,h are both input and output variables
inline void MaintainAspect(unsigned int *dx,unsigned int *dy,unsigned int *dw,unsigned int *dh)
{
//Currently just 4/3 aspect ratio
int t;
- if (*dw * 3 > (float)*dh * pixelaspect * 4) {
- t = (float)*dh * pixelaspect * 4.0f / 3; //new width aspect
+ if (*dw * 3 > *dh * 4) {
+ t = *dh * 4.0f / 3; //new width aspect
*dx = (*dw - t) / 2; //centering
*dw = t;
} else {
- t = (float)(*dw * 3) / (float)(4.0f * pixelaspect);
+ t = *dw * 3.0f / 4;
*dy = (*dh - t) / 2;
*dh = t;
}
}
-
void DoBufferSwap(void)
{
Screen *screen;