Skip to content

Commit

Permalink
Release 0.1.11
Browse files Browse the repository at this point in the history
  • Loading branch information
JesseTG committed Jun 10, 2024
1 parent 643643e commit d8d5d8e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
> breaking changes may be introduced
> at any time without warning.
## [0.1.11] - 2024-06-10

### Changed

- Raise a warning when the core's requested maximum framebuffer size
is larger than what the OpenGL implementation can provide.

## [0.1.10] - 2024-06-07

### Fixed
Expand Down
10 changes: 10 additions & 0 deletions src/libretro/drivers/video/opengl/moderngl.py
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,16 @@ def __get_framebuffer_size(self) -> tuple[int, int]:
max_rb_size = self._context.info["GL_MAX_RENDERBUFFER_SIZE"]
geometry = self._system_av_info.geometry

if (
geometry.max_width > max_rb_size
or geometry.max_height > max_fbo_size
or geometry.max_height > max_rb_size
or geometry.max_width > max_fbo_size
):
warnings.warn(
f"Core-provided framebuffer size ({geometry.max_width}x{geometry.max_height}) exceeds GL_MAX_TEXTURE_SIZE ({max_fbo_size}) or GL_MAX_RENDERBUFFER_SIZE ({max_rb_size})"
)

width = min(geometry.max_width, max_fbo_size, max_rb_size)
height = min(geometry.max_height, max_fbo_size, max_rb_size)
return width, height
Expand Down

0 comments on commit d8d5d8e

Please sign in to comment.