DVD fixed!

This commit is contained in:
dborth 2008-10-04 02:37:54 +00:00
parent 75c9951a99
commit 05446c5203
3 changed files with 23 additions and 11 deletions

View File

@ -695,14 +695,18 @@ MainMenu (int selectedMenu)
}
}
/*** Remove any still held buttons ***/
// Wait for buttons to be released
int count = 0; // how long we've been waiting for the user to release the button
while(count < 50 && (
PAD_ButtonsHeld(0)
#ifdef HW_RVL
while( PAD_ButtonsHeld(0) || WPAD_ButtonsHeld(0) )
VIDEO_WaitVSync();
#else
while( PAD_ButtonsHeld(0) )
VIDEO_WaitVSync();
|| WPAD_ButtonsHeld(0)
#endif
))
{
VIDEO_WaitVSync();
count++;
}
StartAudio();
mftb(&end);

View File

@ -234,8 +234,15 @@ LoadSMBFile (char * rom, int length)
/****************************************************************************
* Write savebuffer to SMB file
****************************************************************************/
// no buffer specified, use savebuffer
int
SaveBufferToSMB (char *filepath, int datasize, bool silent)
{
return SaveBufferFromSMB(savebuffer, filepath, datasize, silent);
}
int
SaveBufferToSMB (char * sbuffer, char *filepath, int datasize, bool silent)
{
if(!ConnectShare (NOTSILENT))
return 0;
@ -255,10 +262,10 @@ SaveBufferToSMB (char *filepath, int datasize, bool silent)
{
if (dsize > 1024)
wrote =
SMB_WriteFile ((char *) savebuffer + boffset, 1024, boffset, smbfile);
SMB_WriteFile ((char *) sbuffer + boffset, 1024, boffset, smbfile);
else
wrote =
SMB_WriteFile ((char *) savebuffer + boffset, dsize, boffset, smbfile);
SMB_WriteFile ((char *) sbuffer + boffset, dsize, boffset, smbfile);
boffset += wrote;
dsize -= wrote;
@ -271,6 +278,7 @@ SaveBufferToSMB (char *filepath, int datasize, bool silent)
sprintf(msg, "Couldn't save SMB: %s", SMBPath(filepath));
WaitPrompt (msg);
}
return boffset;
}

View File

@ -21,5 +21,5 @@ int LoadSMBFile (char * fbuffer, int length);
int LoadBufferFromSMB (char *filepath, bool silent);
int LoadBufferFromSMB (char * sbuffer, char *filepath, int length, bool silent);
int SaveBufferToSMB (char *filepath, int datasize, bool silent);
int SaveBufferToSMB (char * sbuffer, char *filepath, int datasize, bool silent);
#endif