X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=platform%2Fwin32%2FGenaDrive%2FEmu.cpp;h=46fa27ab6dbafe947502c21bd373d27606226f9c;hb=490eb4805c9dd8fd358c96dc7e646a6db74e2dfb;hp=e1fd97640a56b6b3fbff5e6f7edc00bd336c42ab;hpb=c9e1affca5438353fdb156fb07a747af83251e14;p=picodrive.git diff --git a/platform/win32/GenaDrive/Emu.cpp b/platform/win32/GenaDrive/Emu.cpp index e1fd976..46fa27a 100644 --- a/platform/win32/GenaDrive/Emu.cpp +++ b/platform/win32/GenaDrive/Emu.cpp @@ -4,8 +4,9 @@ unsigned short *EmuScreen=NULL; int EmuWidth=320,EmuHeight=224; RECT EmuScreenRect = { 0, 0, 320, 224 }; +int PicoPadAdd = 0; -static int EmuScan(unsigned int num, void *sdata); +static int EmuScan(unsigned int num); unsigned char *PicoDraw2FB = NULL; int EmuInit() @@ -22,7 +23,7 @@ int EmuInit() memset(EmuScreen,0,len); PicoDrawSetColorFormat(1); - PicoScan=EmuScan; + PicoScanBegin=EmuScan; return 0; } @@ -38,18 +39,9 @@ void EmuExit() } // Megadrive scanline callback: -static int EmuScan(unsigned int num, void *sdata) +static int EmuScan(unsigned int num) { - unsigned short *pd=NULL; - unsigned short *ps=NULL; - - if (num>=(unsigned int)EmuHeight) return 0; - - // Copy scanline to screen buffer: - pd=EmuScreen+(num<<8)+(num<<6); - ps=(unsigned short *)sdata; - - memcpy(pd, ps, 320*2); + DrawLineDest=EmuScreen+(num<<8)+(num<<6); return 0; } @@ -67,6 +59,7 @@ int EmuFrame() } PicoPad[0]=input; + PicoPad[0]|=PicoPadAdd; PsndOut=(short *)DSoundNext; PicoFrame();