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

Add more video modes #65

Merged
merged 4 commits into from
Mar 30, 2024
Merged

Add more video modes #65

merged 4 commits into from
Mar 30, 2024

Conversation

mardy
Copy link
Collaborator

@mardy mardy commented Mar 24, 2024

Add support for video mode switching. There are apps that might benefit from lower resolution video modes, so let's expose them.

It's recommended to review this PR commit by commit.

This has been tested with the oceanpop game, which has an option to enumerate the video modes and switch between them. A build is available here: https://github.com/mardy/oceanpop/releases/tag/1.1-20240324

Add the video modes supported by libogc. Since we cannot be sure that
they will all be compatible with the user's TV set, only list those
modes belonging to the same standard as the current default mode: this
should ensure that on a NTSC system only NTSC modes will be available,
and same for PAL and M-PAL.
This is a low resolution video mode with less elongated pixels than,
the 640x240 modes provided by libogc.
The WiiMote IR coordinates are based on a hypotehtical screen resolution
of 640x480, but now that we added support for different video modes, we
need to scale the coordinates accordingly.
The mouse cursor need to get scaled accordingly to the screen
resolution: it was designed for a resolution of 640x480, but on video
modes having a different aspect ratio (such as 640x240) or a different
scale (such as 320x240) it will appear deformed or huge.

Use a model view matrix to transform it appropriately.
@mardy mardy mentioned this pull request Mar 25, 2024
@WinterMute WinterMute merged commit 3f99df1 into devkitPro:ogc-sdl-2.28 Mar 30, 2024
3 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.

None yet

2 participants