From b0783d7b731332036500be01966ce74657140d1a Mon Sep 17 00:00:00 2001 From: Arisotura Date: Wed, 5 Apr 2023 23:30:54 +0200 Subject: [PATCH] blorp --- src/frontend/qt_sdl/Netplay.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/frontend/qt_sdl/Netplay.cpp b/src/frontend/qt_sdl/Netplay.cpp index f2b830fe..52992231 100644 --- a/src/frontend/qt_sdl/Netplay.cpp +++ b/src/frontend/qt_sdl/Netplay.cpp @@ -659,17 +659,22 @@ void SyncMirrorClients() // send initial state // TODO: this is a terrible hack! + printf("[MH] state start\n"); Savestate* state = new Savestate("netplay.mln", true); NDS::DoSavestate(state); delete state; + printf("[MH] state taken\n"); FILE* f = fopen("netplay.mln", "rb"); + printf("[MH] state=%d\n", f?1:0); fseek(f, 0, SEEK_END); u32 flen = ftell(f); fseek(f, 0, SEEK_SET); u8* statebuf = new u8[flen]; fread(statebuf, flen, 1, f); fclose(f); + printf("[MH] state read, len=%d\n", flen); SendBlobToMirrorClients(Blob_InitState, flen, statebuf); + printf("[MH] state sent\n"); delete[] statebuf; u8 data[2];