diff options
Diffstat (limited to 'plugins/peopsxgl')
| -rw-r--r-- | plugins/peopsxgl/externals.h | 1 | ||||
| -rw-r--r-- | plugins/peopsxgl/gpu.c | 58 |
2 files changed, 34 insertions, 25 deletions
diff --git a/plugins/peopsxgl/externals.h b/plugins/peopsxgl/externals.h index a2775fe9..02b1fdf1 100644 --- a/plugins/peopsxgl/externals.h +++ b/plugins/peopsxgl/externals.h @@ -383,6 +383,7 @@ extern uint32_t ulGPUInfoVals[]; extern BOOL bNeedInterlaceUpdate;
extern BOOL bNeedWriteUpload;
extern BOOL bSkipNextFrame;
+extern uint32_t vBlank;
extern int bFullScreen;
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;
+}
|
