Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PACKAGE: SDL2 Add set scale mode for DirectFB video backend #136

Merged
merged 1 commit into from
Nov 13, 2024

Conversation

tiopex
Copy link
Contributor

@tiopex tiopex commented Nov 10, 2024

Allow to use hint SDL_HINT_RENDER_SCALE_QUALITY to set scale quality for DirectFB video backend

@Apaczer
Copy link
Member

Apaczer commented Nov 11, 2024

ok so via: https://raw.githubusercontent.com/libsdl-org/SDL/refs/tags/release-2.0.20/include/SDL_hints.h

we can set env var export SDL_RENDER_SCALE_QUALITY= and change scaling method with:

  • "0" or "nearest" - Nearest pixel sampling
  • "1" or "linear" - Linear filtering
  • "2" or "best" - Linear with anti-aliasing?

@tiopex
Copy link
Contributor Author

tiopex commented Nov 11, 2024

Anti-aliasing is only defined, but not used anywhere currently in DirectFB2 https://github.com/directfb2/DirectFB2/blob/4d6b7ddd8477b4b52aa78ec82a3add28ade0c965/include/directfb.h#L3559

You can change scale quality directly from code, via env variable or via directfbrc file

@Apaczer
Copy link
Member

Apaczer commented Nov 11, 2024

just wondering why this code is commented out for renderer->SetTextureScaleMode and non-existent for data->render_options in SDL2 code, what's the difference between? Any idea?

@tiopex
Copy link
Contributor Author

tiopex commented Nov 11, 2024

It was commented there was #if 0. This method is used to control scale quality during rendering

@tiopex tiopex merged commit 21be370 into MiyooCFW:master Nov 13, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants