Skip to content

SCALED related tasks (1365) #788

Open
@GalacticEmperor1

Description

@GalacticEmperor1

Issue №1365 opened by illume at 2019-10-03 09:23:42

Some SCALED related tasks left to do identified in the PR # 1237 work.

  • Docs (user-facing) for resizing API (example code is already there!)
  • Document (user-facing) behaviour of 0,0 window size, in set_mode docs.
  • document the SCALED/toggle_fullscreen example some more so it reads like a tutorial.
  • API for SDL render quality hint, or just documenting how to use os.environ to set SDL hints?
  • Format and delete commented out code. Make issues if there are todos, and comments about other stuff.
  • Maybe in the future test if workarounds are still needed and add # ifdefs for old SDL versions
  • Figure out which static state (using_GL) should be used where and document (C-side developer-facing) the behaviour of SDL_Renderer and GL context somewhere. Maybe also document that user-facing, it it interacts with modernGL or pyOpenGL
  • Talk to upstream about the bugs we found. (make issues in bugzilla)
  • Get OPENGL|SCALED to work with mouse scaling
  • division by zero possible (xscale = display_mode.w / w;) according to clang static analysis.
  • SDL_SetWindowFullscreen in display.c needs to check the return value for failure.

Comments

# # robertpfeiffer commented at 2019-10-19 08:40:49

I can add a check, but I don't think division by zero is actually possible there. I suppose the static analysis errs on the side of "can't prove it won't happen"?


# # illume commented at 2019-10-19 10:58:14

I can't link to it, but if you run the tool gives you the path in a browser it can reach to get there. So it tells you if X is A and Y is B, and you go down this path, and down this path... this error can happen.


# # robertpfeiffer commented at 2019-10-20 17:15:07

I ran scan-build, and it told me that if using_gl is false and pg_renderer is not-NULL at the same time intoggle_fullscreen, bad things happen. I know these cannot happen at the same time. I added a check anyway, just to make the static analyser happy. Then I ran it away. Now it said in the check assuming this check fails (no exception raised) because using_gl is true, but pg_renderer is NULL. Then, later down the line it said assuming pg_renderer != NULL.


# # lordmauve commented at 2020-06-23 12:36:31

Get OPENGL|SCALED to work with mouse scaling

What's involved in this? Shall I try to create a patch?


# # robertpfeiffer commented at 2020-06-23 14:14:52

Resizing SCALED windows should work without user intervention now, the API I added is preliminary for testing purposes, the previous preliminary resizing API is no longer needed.

What's involved in this?

Access GL viewport and window size info in event handling code. Ensure this code path is not entered when GL is used via a renderer. For SCALED, we can just ask SDL for the default renderer dimensions.

Shall I try to create a patch?

Sure, go ahead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions