X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=libpcsxcore%2Fplugins.c;h=4f0897e21b7ca9712a0b094869c5a5a417485ff3;hb=340addc5d7a8d62db4883218ba83ec0470ac7081;hp=b143923b595f71b9c5ea5fa0e01f89dcc530e298;hpb=5ced3945423cda0010597b27b7da6bce77b12baa;p=pcsx_rearmed.git diff --git a/libpcsxcore/plugins.c b/libpcsxcore/plugins.c index b143923b..4f0897e2 100644 --- a/libpcsxcore/plugins.c +++ b/libpcsxcore/plugins.c @@ -49,7 +49,6 @@ GPUmakeSnapshot GPU_makeSnapshot; GPUfreeze GPU_freeze; GPUgetScreenPic GPU_getScreenPic; GPUshowScreenPic GPU_showScreenPic; -GPUclearDynarec GPU_clearDynarec; GPUvBlank GPU_vBlank; CDRinit CDR_init; @@ -201,7 +200,6 @@ void CALLBACK GPU__makeSnapshot(void) {} void CALLBACK GPU__keypressed(int key) {} long CALLBACK GPU__getScreenPic(unsigned char *pMem) { return -1; } long CALLBACK GPU__showScreenPic(unsigned char *pMem) { return -1; } -void CALLBACK GPU__clearDynarec(void (CALLBACK *callback)(void)) {} void CALLBACK GPU__vBlank(int val) {} #define LoadGpuSym1(dest, name) \ @@ -241,7 +239,6 @@ static int LoadGPUplugin(const char *GPUdll) { LoadGpuSym1(freeze, "GPUfreeze"); LoadGpuSym0(getScreenPic, "GPUgetScreenPic"); LoadGpuSym0(showScreenPic, "GPUshowScreenPic"); - LoadGpuSym0(clearDynarec, "GPUclearDynarec"); LoadGpuSym0(vBlank, "GPUvBlank"); LoadGpuSym0(configure, "GPUconfigure"); LoadGpuSym0(test, "GPUtest"); @@ -664,28 +661,17 @@ void _PADstartPoll(PadDataS *pad) { int absX = (pad->absoluteX / 64) + 512; int absY = (pad->absoluteY / 64) + 512; - //Keep within limits - if (absX > 1023) absX = 1023; - if (absX < 0) absX = 0; - if (absY > 1023) absY = 1023; - if (absY < 0) absY = 0; - - stdpar[4] = 0x5a - (xres - 256) / 3 + (((xres - 256) / 3 + 356) * absX >> 10); - stdpar[5] = (0x5a - (xres - 256) / 3 + (((xres - 256) / 3 + 356) * absX >> 10)) >> 8; - stdpar[6] = 0x20 + (yres * absY >> 10); - stdpar[7] = (0x20 + (yres * absY >> 10)) >> 8; - - //Offscreen - Point at the side of the screen so PSX thinks you are pointing offscreen - //Required as a mouse can't be offscreen - //Coordinates X=0001h, Y=000Ah indicates "no light" - //This will mean you cannot shoot the very each of the screen - //ToDo read offscreen range from settings if useful to change - int OffscreenRange = 2; - if (absX < (OffscreenRange) || absX > (1023 - OffscreenRange) || absY < (OffscreenRange) || absY > (1023 - OffscreenRange)) { - stdpar[4] = 0x01; - stdpar[5] = 0x00; - stdpar[6] = 0x0A; - stdpar[7] = 0x00; + if (absX == 65536 || absY == 65536) { + stdpar[4] = 0x01; + stdpar[5] = 0x00; + stdpar[6] = 0x0A; + stdpar[7] = 0x00; + } + else { + stdpar[4] = 0x5a - (xres - 256) / 3 + (((xres - 256) / 3 + 356) * absX >> 10); + stdpar[5] = (0x5a - (xres - 256) / 3 + (((xres - 256) / 3 + 356) * absX >> 10)) >> 8; + stdpar[6] = 0x20 + (yres * absY >> 10); + stdpar[7] = (0x20 + (yres * absY >> 10)) >> 8; } memcpy(buf, stdpar, 8); @@ -1131,10 +1117,6 @@ static int LoadSIO1plugin(const char *SIO1dll) { #endif -void CALLBACK clearDynarec(void) { - psxCpu->Reset(); -} - int LoadPlugins() { int ret; char Plugin[MAXPATHLEN * 2];