This commit is contained in:
Arisotura 2023-04-05 23:34:20 +02:00
parent b0783d7b73
commit 5df260ab3e
1 changed files with 3 additions and 2 deletions

View File

@ -35,6 +35,7 @@
#include "ROMManager.h" #include "ROMManager.h"
#include "Config.h" #include "Config.h"
#include "Savestate.h" #include "Savestate.h"
#include "Platform.h"
#include "ui_NetplayStartHostDialog.h" #include "ui_NetplayStartHostDialog.h"
#include "ui_NetplayStartClientDialog.h" #include "ui_NetplayStartClientDialog.h"
@ -625,7 +626,7 @@ printf("[MC] finish blob type=%d len=%d\n", type, len);
// load initial state // load initial state
// TODO: terrible hack!! // TODO: terrible hack!!
FILE* f = fopen("netplay2.mln", "wb"); FILE* f = Platform::OpenFile("netplay2.mln", "wb");
fwrite(Blobs[Blob_InitState], BlobLens[Blob_InitState], 1, f); fwrite(Blobs[Blob_InitState], BlobLens[Blob_InitState], 1, f);
fclose(f); fclose(f);
Savestate* state = new Savestate("netplay2.mln", false); Savestate* state = new Savestate("netplay2.mln", false);
@ -664,7 +665,7 @@ void SyncMirrorClients()
NDS::DoSavestate(state); NDS::DoSavestate(state);
delete state; delete state;
printf("[MH] state taken\n"); printf("[MH] state taken\n");
FILE* f = fopen("netplay.mln", "rb"); FILE* f = Platform::OpenFile("netplay.mln", "rb");
printf("[MH] state=%d\n", f?1:0); printf("[MH] state=%d\n", f?1:0);
fseek(f, 0, SEEK_END); fseek(f, 0, SEEK_END);
u32 flen = ftell(f); u32 flen = ftell(f);