diff --git a/output/dll/octoshock.dll b/output/dll/octoshock.dll index 2a14816faf..a283e0fef8 100644 Binary files a/output/dll/octoshock.dll and b/output/dll/octoshock.dll differ diff --git a/psx/octoshock/psx/psx.cpp b/psx/octoshock/psx/psx.cpp index d94c7cab54..ba358a647b 100644 --- a/psx/octoshock/psx/psx.cpp +++ b/psx/octoshock/psx/psx.cpp @@ -60,6 +60,15 @@ static bool PrevInterlaced; static Deinterlacer deint; static EmulateSpecStruct espec; +template inline void reconstruct(T* t) { + t->~T(); + new(t) T(); +} +template inline void reconstruct(T* t, A a) { + t->~T(); + new(t) T(a); +} + namespace MDFN_IEN_PSX { @@ -1082,11 +1091,12 @@ struct { void Initialize() { - for(int i=0;i<2;i++) + for(int i=0;i<10;i++) { ports[i].type = ePeripheralType_None; memset(ports[i].buffer,0,sizeof(ports[i].buffer)); } + reconstruct(FIO); } //TODO: "Take care to call ->Power() only if the device actually changed."