mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 15:27:46 -04:00
hint-less mode updated for SVP, state load callback, etc
git-svn-id: file:///home/notaz/opt/svn/PicoDrive@384 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
parent
71bb1b7bd0
commit
fad248933b
11 changed files with 86 additions and 19 deletions
10
Pico/Area.c
10
Pico/Area.c
|
@ -28,6 +28,8 @@ areaeof *areaEof = (areaeof *) 0;
|
|||
areaseek *areaSeek = (areaseek *) 0;
|
||||
areaclose *areaClose = (areaclose *) 0;
|
||||
|
||||
void (*PicoLoadStateHook)(void) = NULL;
|
||||
|
||||
|
||||
// Scan one variable and callback
|
||||
static int ScanVar(void *data,int len,char *name,void *PmovFile,int PmovAction)
|
||||
|
@ -177,7 +179,11 @@ int PmovState(int PmovAction, void *PmovFile)
|
|||
if ((PicoMCD & 1) || carthw_chunks != NULL)
|
||||
{
|
||||
if (PmovAction&1) return PicoCdSaveState(PmovFile);
|
||||
if (PmovAction&2) return PicoCdLoadState(PmovFile);
|
||||
if (PmovAction&2) {
|
||||
int ret = PicoCdLoadState(PmovFile);
|
||||
if (PicoLoadStateHook) PicoLoadStateHook();
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
memset(head,0,sizeof(head));
|
||||
|
@ -197,6 +203,8 @@ int PmovState(int PmovAction, void *PmovFile)
|
|||
// Scan memory areas:
|
||||
PicoAreaScan(PmovAction, *(unsigned int *)(head+0x8), PmovFile);
|
||||
|
||||
if ((PmovAction&2) && PicoLoadStateHook) PicoLoadStateHook();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue