fix new savestate bug, wifi warning, and scanlines 2x filter
This commit is contained in:
parent
88f0549e85
commit
a39c62b129
|
@ -2454,7 +2454,7 @@ void gfx3d_savestate(std::ostream* os)
|
||||||
for(int i=0;i<4;i++)
|
for(int i=0;i<4;i++)
|
||||||
{
|
{
|
||||||
OSWRITE(mtxStack[i].position);
|
OSWRITE(mtxStack[i].position);
|
||||||
for(int j=0;j<mtxStack[i].size*16+16;j++)
|
for(int j=0;j<mtxStack[i].size*16;j++)
|
||||||
OSWRITE(mtxStack[i].matrix[j]);
|
OSWRITE(mtxStack[i].matrix[j]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2493,7 +2493,7 @@ bool gfx3d_loadstate(std::istream* is, int size)
|
||||||
for(int i=0;i<4;i++)
|
for(int i=0;i<4;i++)
|
||||||
{
|
{
|
||||||
OSREAD(mtxStack[i].position);
|
OSREAD(mtxStack[i].position);
|
||||||
for(int j=0;j<mtxStack[i].size*16+16;j++)
|
for(int j=0;j<mtxStack[i].size*16;j++)
|
||||||
OSREAD(mtxStack[i].matrix[j]);
|
OSREAD(mtxStack[i].matrix[j]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1362,8 +1362,6 @@ static pcap_if_t * WIFI_index_device(pcap_if_t *alldevs, int index) {
|
||||||
|
|
||||||
bool SoftAP_Init()
|
bool SoftAP_Init()
|
||||||
{
|
{
|
||||||
char errbuf[PCAP_ERRBUF_SIZE];
|
|
||||||
pcap_if_t *alldevs;
|
|
||||||
|
|
||||||
wifiMac.SoftAP.usecCounter = 0;
|
wifiMac.SoftAP.usecCounter = 0;
|
||||||
|
|
||||||
|
@ -1372,6 +1370,9 @@ bool SoftAP_Init()
|
||||||
wifiMac.SoftAP.curPacketSending = FALSE;
|
wifiMac.SoftAP.curPacketSending = FALSE;
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
char errbuf[PCAP_ERRBUF_SIZE];
|
||||||
|
pcap_if_t *alldevs;
|
||||||
|
|
||||||
if(wifi_netEnabled)
|
if(wifi_netEnabled)
|
||||||
{
|
{
|
||||||
if(desmume_pcap_findalldevs(&alldevs, errbuf) == -1)
|
if(desmume_pcap_findalldevs(&alldevs, errbuf) == -1)
|
||||||
|
|
|
@ -27,6 +27,7 @@ typedef u64 uint64;
|
||||||
extern CACHE_ALIGN u16 fadeOutColors[17][0x8000];
|
extern CACHE_ALIGN u16 fadeOutColors[17][0x8000];
|
||||||
|
|
||||||
extern int scanline_filter_a, scanline_filter_b;
|
extern int scanline_filter_a, scanline_filter_b;
|
||||||
|
static int fac_a, fac_b;
|
||||||
|
|
||||||
FORCEINLINE void ScanLine16( uint16 *lpDst, uint16 *lpSrc, unsigned int Width){
|
FORCEINLINE void ScanLine16( uint16 *lpDst, uint16 *lpSrc, unsigned int Width){
|
||||||
while(Width--){
|
while(Width--){
|
||||||
|
@ -42,6 +43,38 @@ FORCEINLINE void ScanLine16_2( uint16 *lpDst, uint16 *lpSrc, unsigned int Width)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FORCEINLINE void ScanLine32( uint32 *lpDst, uint32 *lpSrc, unsigned int Width){
|
||||||
|
while(Width--){
|
||||||
|
*lpDst++ = *lpSrc;
|
||||||
|
u8* u8dst = (u8*)lpDst;
|
||||||
|
u8* u8src = (u8*)lpSrc;
|
||||||
|
*u8dst++ = *u8src++ * fac_a / 16;
|
||||||
|
*u8dst++ = *u8src++ * fac_a / 16;
|
||||||
|
*u8dst++ = *u8src++ * fac_a / 16;
|
||||||
|
lpDst++;
|
||||||
|
lpSrc++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
FORCEINLINE void ScanLine32_2( uint32 *lpDst, uint32 *lpSrc, unsigned int Width){
|
||||||
|
while(Width--){
|
||||||
|
u8* u8dst = (u8*)lpDst;
|
||||||
|
u8* u8src = (u8*)lpSrc;
|
||||||
|
*u8dst++ = *u8src++ * fac_a / 16;
|
||||||
|
*u8dst++ = *u8src++ * fac_a / 16;
|
||||||
|
*u8dst++ = *u8src++ * fac_a / 16;
|
||||||
|
u8dst++;
|
||||||
|
u8src = (u8*)lpSrc;
|
||||||
|
*u8dst++ = *u8src++ * fac_b / 16;
|
||||||
|
*u8dst++ = *u8src++ * fac_b / 16;
|
||||||
|
*u8dst++ = *u8src++ * fac_b / 16;
|
||||||
|
u8dst++; u8src++;
|
||||||
|
lpDst+=2;
|
||||||
|
lpSrc++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
FORCEINLINE void DoubleLine32( uint32 *lpDst, uint32 *lpSrc, unsigned int Width){
|
FORCEINLINE void DoubleLine32( uint32 *lpDst, uint32 *lpSrc, unsigned int Width){
|
||||||
while(Width--){
|
while(Width--){
|
||||||
*lpDst++ = *lpSrc;
|
*lpDst++ = *lpSrc;
|
||||||
|
@ -51,19 +84,20 @@ FORCEINLINE void DoubleLine32( uint32 *lpDst, uint32 *lpSrc, unsigned int Width)
|
||||||
|
|
||||||
void RenderScanline( SSurface Src, SSurface Dst)
|
void RenderScanline( SSurface Src, SSurface Dst)
|
||||||
{
|
{
|
||||||
uint16 *lpSrc;
|
fac_a = (16-scanline_filter_a);
|
||||||
|
fac_b = (16-scanline_filter_b);
|
||||||
unsigned int H;
|
unsigned int H;
|
||||||
|
|
||||||
const uint32 srcHeight = Src.Height;
|
const uint32 srcHeight = Src.Height;
|
||||||
|
|
||||||
const unsigned int srcPitch = Src.Pitch >> 1;
|
const unsigned int srcPitch = Src.Pitch >> 1;
|
||||||
lpSrc = reinterpret_cast<uint16 *>(Src.Surface);
|
u32* lpSrc = (u32*)Src.Surface;
|
||||||
|
|
||||||
const unsigned int dstPitch = Dst.Pitch >> 1;
|
const unsigned int dstPitch = Dst.Pitch >> 1;
|
||||||
uint16 *lpDst = (uint16*)Dst.Surface;
|
u32 *lpDst = (u32*)Dst.Surface;
|
||||||
for (H = 0; H < srcHeight; H++, lpSrc += srcPitch)
|
for (H = 0; H < srcHeight; H++, lpSrc += srcPitch)
|
||||||
ScanLine16 (lpDst, lpSrc, Src.Width), lpDst += dstPitch,
|
ScanLine32 (lpDst, lpSrc, Src.Width), lpDst += dstPitch,
|
||||||
ScanLine16_2 (lpDst, lpSrc, Src.Width), lpDst += dstPitch;
|
ScanLine32_2 (lpDst, lpSrc, Src.Width), lpDst += dstPitch;
|
||||||
//memset (lpDst, 0, 512*2), lpDst += dstPitch;
|
//memset (lpDst, 0, 512*2), lpDst += dstPitch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue