mirror of
https://github.com/giongto35/cloud-game.git
synced 2026-01-23 02:34:42 +00:00
Increase buffers that use max dimensions from the Libretro geometry
Some cores may render frames bigger that reported max dimensions. This may help a bit.
This commit is contained in:
parent
83b040b39f
commit
ba7db72093
1 changed files with 4 additions and 2 deletions
|
|
@ -897,9 +897,11 @@ func geometryChange(geom C.struct_retro_game_geometry) {
|
|||
Nan0.sys.av.geometry = geom
|
||||
|
||||
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
|
||||
// (for LRPS2) makes the max height bigger increasing SDL2 and OpenGL buffers slightly
|
||||
Nan0.sys.av.geometry.max_height = C.unsigned(float32(Nan0.sys.av.geometry.max_height) * 1.5)
|
||||
bufS := uint(geom.max_width*Nan0.sys.av.geometry.max_height) * Nan0.Video.PixFmt.BPP
|
||||
graphics.SetBuffer(int(bufS))
|
||||
Nan0.log.Debug().Msgf("OpenGL frame buffer: %v", byteCountBinary(int64(bufS)))
|
||||
Nan0.log.Debug().Msgf("OpenGL frame buffer: %v", bufS)
|
||||
}
|
||||
|
||||
if Nan0.OnSystemAvInfo != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue