mirror of
https://github.com/dborth/vbagx.git
synced 2024-12-26 02:31:50 +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 ***/
|
// Wait for buttons to be released
|
||||||
#ifdef HW_RVL
|
int count = 0; // how long we've been waiting for the user to release the button
|
||||||
while( PAD_ButtonsHeld(0) || WPAD_ButtonsHeld(0) )
|
while(count < 50 && (
|
||||||
VIDEO_WaitVSync();
|
PAD_ButtonsHeld(0)
|
||||||
#else
|
#ifdef HW_RVL
|
||||||
while( PAD_ButtonsHeld(0) )
|
|| WPAD_ButtonsHeld(0)
|
||||||
VIDEO_WaitVSync();
|
#endif
|
||||||
#endif
|
))
|
||||||
|
{
|
||||||
|
VIDEO_WaitVSync();
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
|
||||||
StartAudio();
|
StartAudio();
|
||||||
mftb(&end);
|
mftb(&end);
|
||||||
|
@ -234,8 +234,15 @@ LoadSMBFile (char * rom, int length)
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Write savebuffer to SMB file
|
* Write savebuffer to SMB file
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
// no buffer specified, use savebuffer
|
||||||
int
|
int
|
||||||
SaveBufferToSMB (char *filepath, int datasize, bool silent)
|
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))
|
if(!ConnectShare (NOTSILENT))
|
||||||
return 0;
|
return 0;
|
||||||
@ -255,10 +262,10 @@ SaveBufferToSMB (char *filepath, int datasize, bool silent)
|
|||||||
{
|
{
|
||||||
if (dsize > 1024)
|
if (dsize > 1024)
|
||||||
wrote =
|
wrote =
|
||||||
SMB_WriteFile ((char *) savebuffer + boffset, 1024, boffset, smbfile);
|
SMB_WriteFile ((char *) sbuffer + boffset, 1024, boffset, smbfile);
|
||||||
else
|
else
|
||||||
wrote =
|
wrote =
|
||||||
SMB_WriteFile ((char *) savebuffer + boffset, dsize, boffset, smbfile);
|
SMB_WriteFile ((char *) sbuffer + boffset, dsize, boffset, smbfile);
|
||||||
|
|
||||||
boffset += wrote;
|
boffset += wrote;
|
||||||
dsize -= wrote;
|
dsize -= wrote;
|
||||||
@ -271,6 +278,7 @@ SaveBufferToSMB (char *filepath, int datasize, bool silent)
|
|||||||
sprintf(msg, "Couldn't save SMB: %s", SMBPath(filepath));
|
sprintf(msg, "Couldn't save SMB: %s", SMBPath(filepath));
|
||||||
WaitPrompt (msg);
|
WaitPrompt (msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
return boffset;
|
return boffset;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,5 +21,5 @@ int LoadSMBFile (char * fbuffer, int length);
|
|||||||
int LoadBufferFromSMB (char *filepath, bool silent);
|
int LoadBufferFromSMB (char *filepath, bool silent);
|
||||||
int LoadBufferFromSMB (char * sbuffer, char *filepath, int length, bool silent);
|
int LoadBufferFromSMB (char * sbuffer, char *filepath, int length, bool silent);
|
||||||
int SaveBufferToSMB (char *filepath, int datasize, bool silent);
|
int SaveBufferToSMB (char *filepath, int datasize, bool silent);
|
||||||
|
int SaveBufferToSMB (char * sbuffer, char *filepath, int datasize, bool silent);
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user