Skip to content

Commit

Permalink
Add another workaround for g0 stack in Go 1.22.5 (#460)
Browse files Browse the repository at this point in the history
  • Loading branch information
sergystepanov committed Jul 5, 2024
1 parent ca64bd1 commit ba45936
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/worker/caged/libretro/nanoarch/nanoarch.go
Original file line number Diff line number Diff line change
Expand Up @@ -304,9 +304,11 @@ func (n *Nanoarch) LoadGame(path string) error {
n.log.Debug().Msgf("Set buffer: %v", byteCountBinary(int64(bufS)))
if n.LibCo {
C.same_thread(C.init_video_cgo)
C.same_thread(unsafe.Pointer(Nan0.Video.hw.context_reset))
} else {
runtime.LockOSThread()
initVideo()
C.bridge_context_reset(Nan0.Video.hw.context_reset)
runtime.UnlockOSThread()
}
}
Expand Down Expand Up @@ -853,7 +855,6 @@ func initVideo() {
}
Nan0.sdlCtx = sdl

C.bridge_context_reset(Nan0.Video.hw.context_reset)
if Nan0.log.GetLevel() < logger.InfoLevel {
printOpenGLDriverInfo()
}
Expand Down

0 comments on commit ba45936

Please sign in to comment.