summaryrefslogtreecommitdiff
path: root/plugins/peopsxgl/gpu.c
diff options
context:
space:
mode:
authorSND\edgbla_cp <SND\edgbla_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2010-10-01 22:15:22 +0000
committerSND\edgbla_cp <SND\edgbla_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2010-10-01 22:15:22 +0000
commit3249db8f9dfa113d95e4c949aa6b869e921e5b9f (patch)
treeb643551ceccc5fdd756c49bfaed5421d23afd662 /plugins/peopsxgl/gpu.c
parent6c743fbd9db15d4564e2729b559923336557bd80 (diff)
downloadpcsxr-3249db8f9dfa113d95e4c949aa6b869e921e5b9f.tar.gz
dfxvideo, peopsxgl: ode bit fix (Cosmowarrior Rei/iS - Internal Section).
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@57994 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'plugins/peopsxgl/gpu.c')
-rw-r--r--plugins/peopsxgl/gpu.c58
1 files changed, 33 insertions, 25 deletions
diff --git a/plugins/peopsxgl/gpu.c b/plugins/peopsxgl/gpu.c
index bde3f4a4..91a10b2c 100644
--- a/plugins/peopsxgl/gpu.c
+++ b/plugins/peopsxgl/gpu.c
@@ -152,6 +152,7 @@ uint32_t ulGPUInfoVals[16];
int iFakePrimBusy = 0;
int iRumbleVal = 0;
int iRumbleTime = 0;
+uint32_t vBlank=0;
////////////////////////////////////////////////////////////////////////
// stuff to make this a true PDK module
@@ -548,6 +549,7 @@ long CALLBACK GPUinit()
// device initialised already !
//lGPUstatusRet = 0x74000000;
+ vBlank = 0;
STATUSREG = 0x14802000;
GPUIsIdle;
@@ -972,28 +974,28 @@ void sysdep_create_display(void) // create display
XResizeWindow(display,window,screen->width,screen->height);
hints.min_width = hints.max_width = hints.base_width = screen->width;
hints.min_height= hints.max_height = hints.base_height = screen->height;
- XSetWMNormalHints(display,window,&hints);
-
- // set the window layer for GNOME
- {
- XEvent xev;
-
- memset(&xev, 0, sizeof(xev));
- xev.xclient.type = ClientMessage;
- xev.xclient.serial = 0;
- xev.xclient.send_event = 1;
- xev.xclient.message_type = XInternAtom(display, "_NET_WM_STATE", 0);
- xev.xclient.window = window;
- xev.xclient.format = 32;
- xev.xclient.data.l[0] = 1;
- xev.xclient.data.l[1] = XInternAtom(display, "_NET_WM_STATE_FULLSCREEN", 0);
- xev.xclient.data.l[2] = 0;
- xev.xclient.data.l[3] = 0;
- xev.xclient.data.l[4] = 0;
-
- XSendEvent(display, RootWindow(display, DefaultScreen(display)), 0,
- SubstructureRedirectMask | SubstructureNotifyMask, &xev);
- }
+ XSetWMNormalHints(display,window,&hints);
+
+ // set the window layer for GNOME
+ {
+ XEvent xev;
+
+ memset(&xev, 0, sizeof(xev));
+ xev.xclient.type = ClientMessage;
+ xev.xclient.serial = 0;
+ xev.xclient.send_event = 1;
+ xev.xclient.message_type = XInternAtom(display, "_NET_WM_STATE", 0);
+ xev.xclient.window = window;
+ xev.xclient.format = 32;
+ xev.xclient.data.l[0] = 1;
+ xev.xclient.data.l[1] = XInternAtom(display, "_NET_WM_STATE_FULLSCREEN", 0);
+ xev.xclient.data.l[2] = 0;
+ xev.xclient.data.l[3] = 0;
+ xev.xclient.data.l[4] = 0;
+
+ XSendEvent(display, RootWindow(display, DefaultScreen(display)), 0,
+ SubstructureRedirectMask | SubstructureNotifyMask, &xev);
+ }
}
}
@@ -1934,8 +1936,8 @@ static unsigned short usFirstPos=2;
void CALLBACK GPUupdateLace(void)
{
- if(!(dwActFixes&0x1000))
- STATUSREG^=0x80000000; // interlaced bit toggle, if the CC game fix is not active (see gpuReadStatus)
+ //if(!(dwActFixes&0x1000))
+ // STATUSREG^=0x80000000; // interlaced bit toggle, if the CC game fix is not active (see gpuReadStatus)
if(!(dwActFixes&128)) // normal frame limit func
CheckFrameRate();
@@ -1947,6 +1949,7 @@ void CALLBACK GPUupdateLace(void)
if(PSXDisplay.Interlaced) // interlaced mode?
{
+ STATUSREG^=0x80000000;
if(PSXDisplay.DisplayMode.x>0 && PSXDisplay.DisplayMode.y>0)
{
updateDisplay(); // -> swap buffers (new frame)
@@ -1998,7 +2001,7 @@ uint32_t CALLBACK GPUreadStatus(void)
}
}
- return STATUSREG;
+ return STATUSREG | (vBlank ? 0x80000000 : 0 );;
}
////////////////////////////////////////////////////////////////////////
@@ -3479,3 +3482,8 @@ void CALLBACK GPUdisplayFlags(uint32_t dwFlags)
{
dwCoreFlags=dwFlags;
}
+
+void CALLBACK GPUvBlank( int val )
+{
+ vBlank = val;
+}