Skip to content

Commit

Permalink
Change GL framebuffer if max geometry is different
Browse files Browse the repository at this point in the history
  • Loading branch information
sergystepanov committed Jul 14, 2024
1 parent d8a3e82 commit 83b040b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/worker/caged/libretro/nanoarch/nanoarch.go
Original file line number Diff line number Diff line change
Expand Up @@ -896,7 +896,7 @@ func geometryChange(geom C.struct_retro_game_geometry) {
old := Nan0.sys.av.geometry
Nan0.sys.av.geometry = geom

if Nan0.Video.gl.enabled {
if Nan0.Video.gl.enabled && (old.max_width != geom.max_width || old.max_height != geom.max_height) {
bufS := uint(geom.max_width*geom.max_height) * Nan0.Video.PixFmt.BPP
graphics.SetBuffer(int(bufS))
Nan0.log.Debug().Msgf("OpenGL frame buffer: %v", byteCountBinary(int64(bufS)))
Expand Down

0 comments on commit 83b040b

Please sign in to comment.