// some PAD or SPU plugins would not work anymore)\r
////////////////////////////////////////////////////////////////////////\r
\r
-long CALLBACK GPUopen(int hwndGPU)\r
+long CALLBACK GPUopen(unsigned long *disp, char *cap, char *cfg)\r
{\r
iResX=800;iResY=480;\r
iColDepth=8;\r
\r
InitializeTextureStore(); // init texture mem\r
\r
+ CSTEXTURE = CSVERTEX = CSCOLOR = 0;\r
+\r
// lGPUstatusRet = 0x74000000;\r
\r
// with some emus, we could do the OGL init right here... oh my\r
- if(bIsFirstFrame) GLinitialize();\r
+ if(bIsFirstFrame) GLinitialize(NULL, NULL);\r
\r
return 0;\r
}\r
{\r
unsigned long lCommand=(gdata>>24)&0xff;\r
\r
-if(bIsFirstFrame) GLinitialize(); // real ogl startup (needed by some emus)\r
+if(bIsFirstFrame) GLinitialize(NULL, NULL); // real ogl startup (needed by some emus)\r
\r
ulStatusControl[lCommand]=gdata;\r
\r
unsigned char * baseAddrB;\r
short count;unsigned int DMACommandCounter = 0;\r
\r
-if(bIsFirstFrame) GLinitialize();\r
+if(bIsFirstFrame) GLinitialize(NULL, NULL);\r
\r
GPUIsBusy;\r
\r
if(count>0) GPUwriteDataMem(&baseAddrL[dmaMem>>2],count);\r
\r
addr = baseAddrL[addr>>2]&0xffffff;\r
- }\r
-while (addr != 0xffffff);\r
-\r
+ } while (!(addr & 0x800000)); // contrary to some documentation, the end-of-linked-list marker is not actually 0xFF'FFFF\r
+ // any pointer with bit 23 set will do.\r
GPUIsIdle;\r
\r
return 0;\r