mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-11-27 13:44:15 +01:00
-clearing framebuffer before displaying image, should prevent
from strange startups -replaced a few not needed definitions in code
This commit is contained in:
parent
f98ca361e8
commit
1b2842931f
@ -20,8 +20,7 @@
|
||||
|
||||
#include "lz77.h"
|
||||
#include "mem2.hpp"
|
||||
|
||||
#define ALIGN32(x) (((x) + 31) & ~31)
|
||||
#include "utils.h"
|
||||
|
||||
u32 packBytes(int a, int b, int c, int d)
|
||||
{
|
||||
|
@ -141,6 +141,12 @@ void CVideo::init(void)
|
||||
VIDEO_Configure(m_rmode);
|
||||
m_curFB = 0;
|
||||
VIDEO_SetNextFramebuffer(m_frameBuf[m_curFB]);
|
||||
VIDEO_ClearFrameBuffer(m_rmode, m_frameBuf[m_curFB], COLOR_BLACK);
|
||||
m_curFB ^= 1;
|
||||
VIDEO_SetNextFramebuffer(m_frameBuf[m_curFB]);
|
||||
VIDEO_ClearFrameBuffer(m_rmode, m_frameBuf[m_curFB], COLOR_BLACK);
|
||||
m_curFB ^= 1;
|
||||
VIDEO_SetNextFramebuffer(m_frameBuf[m_curFB]);
|
||||
VIDEO_SetBlack(FALSE);
|
||||
VIDEO_Flush();
|
||||
VIDEO_WaitVSync();
|
||||
|
@ -153,7 +153,7 @@ s32 GCDump::__DiscWriteFile(FILE *f, u64 offset, u32 length, u8 *ReadBuffer)
|
||||
while(length)
|
||||
{
|
||||
toread = min(length, gc_readsize);
|
||||
s32 ret = __DiscReadRaw(ReadBuffer, offset, (toread+31)&(~31));
|
||||
s32 ret = __DiscReadRaw(ReadBuffer, offset, ALIGN32(toread));
|
||||
if (ret == 1)
|
||||
memset(ReadBuffer, 0, gc_readsize);
|
||||
else if (ret > 1)
|
||||
@ -337,11 +337,11 @@ s32 GCDump::DumpGame()
|
||||
DOLSize = FSTOffset - DOLOffset;
|
||||
DiscSize = DataSize + GamePartOffset;
|
||||
|
||||
FSTBuffer = (u8 *)MEM2_alloc((FSTSize+31)&(~31));
|
||||
FSTBuffer = (u8 *)MEM2_alloc(ALIGN32(FSTSize));
|
||||
if(FSTBuffer == NULL)
|
||||
return 0x31100;
|
||||
|
||||
ret = __DiscReadRaw(FSTBuffer, FSTOffset+NextOffset, (FSTSize+31)&(~31));
|
||||
ret = __DiscReadRaw(FSTBuffer, FSTOffset+NextOffset, ALIGN32(FSTSize));
|
||||
|
||||
if(ret > 0)
|
||||
{
|
||||
@ -583,11 +583,11 @@ s32 GCDump::CheckSpace(u32 *needed, bool comp)
|
||||
}
|
||||
else
|
||||
{
|
||||
u8 *FSTBuffer = (u8 *)MEM2_alloc((FSTSize+31)&(~31));
|
||||
u8 *FSTBuffer = (u8 *)MEM2_alloc(ALIGN32(FSTSize));
|
||||
if(FSTBuffer == NULL)
|
||||
return 1;
|
||||
|
||||
ret = __DiscReadRaw(FSTBuffer, FSTOffset+NextOffset, (FSTSize+31)&(~31));
|
||||
ret = __DiscReadRaw(FSTBuffer, FSTOffset+NextOffset, ALIGN32(FSTSize));
|
||||
if(ret > 0)
|
||||
{
|
||||
MEM2_free(FSTBuffer);
|
||||
|
Loading…
Reference in New Issue
Block a user