mirror of
https://github.com/dborth/vbagx.git
synced 2024-12-25 18:21:51 +01:00
DVD fixed!
This commit is contained in:
parent
75c9951a99
commit
05446c5203
@ -695,14 +695,18 @@ MainMenu (int selectedMenu)
|
||||
}
|
||||
}
|
||||
|
||||
/*** Remove any still held buttons ***/
|
||||
#ifdef HW_RVL
|
||||
while( PAD_ButtonsHeld(0) || WPAD_ButtonsHeld(0) )
|
||||
VIDEO_WaitVSync();
|
||||
#else
|
||||
while( PAD_ButtonsHeld(0) )
|
||||
VIDEO_WaitVSync();
|
||||
#endif
|
||||
// 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
|
||||
|| WPAD_ButtonsHeld(0)
|
||||
#endif
|
||||
))
|
||||
{
|
||||
VIDEO_WaitVSync();
|
||||
count++;
|
||||
}
|
||||
|
||||
StartAudio();
|
||||
mftb(&end);
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user