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

Rect has a negative size #6

Open
EmanuelNorsk opened this issue Jan 21, 2025 · 0 comments
Open

Rect has a negative size #6

EmanuelNorsk opened this issue Jan 21, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@EmanuelNorsk
Copy link

EmanuelNorsk commented Jan 21, 2025

Hi, I am having issues again, this time with a rectangle that just wont draw without crashing or kind of crashing in a way.

Running:
sdl3.SDL_SetRenderLogicalPresentation(self.renderer, ctypes.c_long(self.innerSize[0]), ctypes.c_long(self.innerSize[1]), sdl3.SDL_LOGICAL_PRESENTATION_LETTERBOX)

somehow messes the rest of my code.

This only happens if i set the mode to sdl3.SDL_LOGICAL_PRESENTATION_LETTERBOX
if the mode is set to sdl3.SDL_LOGICAL_PRESENTATION_STRETCH, it works fine and no error is generated, but I want the screen to be in letterbox.

Running this here (Assume the variables are set to a valid python number):

Image

Prints out this:

ERROR: b'rect has a negative size', (50.0, 50.0, 200.0, 200.0), (50.0, 50.0, 200.0, 200.0)

I have no idea why it is messed up. Do you know?

@EmanuelNorsk EmanuelNorsk changed the title No error message on error Rect has a negative size Jan 21, 2025
@Aermoss Aermoss added the bug Something isn't working label Jan 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants