diff --git a/BizHawk.Emulation.Cores/Consoles/Sega/Saturn/Yabause.cs b/BizHawk.Emulation.Cores/Consoles/Sega/Saturn/Yabause.cs index 7244319e83..96f8f7cd89 100644 --- a/BizHawk.Emulation.Cores/Consoles/Sega/Saturn/Yabause.cs +++ b/BizHawk.Emulation.Cores/Consoles/Sega/Saturn/Yabause.cs @@ -371,7 +371,14 @@ namespace BizHawk.Emulation.Cores.Sega.Saturn { var fp = new FilePiping(); fp.Offer(data); + + //loadstate can trigger GL work + CoreComm.ActivateGLContext(glContext); + bool succeed = LibYabause.libyabause_loadstate(fp.GetPipeNameNative()); + + CoreComm.DeactivateGLContext(); + fp.Finish(); if (!succeed) throw new Exception("libyabause_loadstate() failed");