X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git;a=blobdiff_plain;f=plugins%2Fgpu-gles%2FgpuPlugin.c;h=6d3ca14c0f441e5fe11475ef15c0a371e282331b;hp=45a0b92e5d96896a7ff57d0df7cd5b6a6284aa37;hb=HEAD;hpb=9f58cabba9806e2c365c64f7a3701efa6282aa72 diff --git a/plugins/gpu-gles/gpuPlugin.c b/plugins/gpu-gles/gpuPlugin.c index 45a0b92e..906d01ee 100644 --- a/plugins/gpu-gles/gpuPlugin.c +++ b/plugins/gpu-gles/gpuPlugin.c @@ -453,7 +453,7 @@ return 0; // some PAD or SPU plugins would not work anymore) //////////////////////////////////////////////////////////////////////// -long CALLBACK GPUopen(int hwndGPU) +long CALLBACK GPUopen(unsigned long *disp, char *cap, char *cfg) { iResX=800;iResY=480; iColDepth=8; @@ -506,10 +506,12 @@ long CALLBACK GPUopen(int hwndGPU) InitializeTextureStore(); // init texture mem + CSTEXTURE = CSVERTEX = CSCOLOR = 0; + // lGPUstatusRet = 0x74000000; // with some emus, we could do the OGL init right here... oh my - if(bIsFirstFrame) GLinitialize(); + if(bIsFirstFrame) GLinitialize(NULL, NULL); return 0; } @@ -1168,7 +1170,7 @@ void CALLBACK GPUwriteStatus(unsigned long gdata) { unsigned long lCommand=(gdata>>24)&0xff; -if(bIsFirstFrame) GLinitialize(); // real ogl startup (needed by some emus) +if(bIsFirstFrame) GLinitialize(NULL, NULL); // real ogl startup (needed by some emus) ulStatusControl[lCommand]=gdata; @@ -2181,7 +2183,7 @@ unsigned long dmaMem; unsigned char * baseAddrB; short count;unsigned int DMACommandCounter = 0; -if(bIsFirstFrame) GLinitialize(); +if(bIsFirstFrame) GLinitialize(NULL, NULL); GPUIsBusy; @@ -2203,9 +2205,8 @@ do if(count>0) GPUwriteDataMem(&baseAddrL[dmaMem>>2],count); addr = baseAddrL[addr>>2]&0xffffff; - } -while (addr != 0xffffff); - + } while (!(addr & 0x800000)); // contrary to some documentation, the end-of-linked-list marker is not actually 0xFF'FFFF + // any pointer with bit 23 set will do. GPUIsIdle; return 0;