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

Bugfix for SDL_GetTicks() with new libogc version. #60

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

retro100
Copy link

@retro100 retro100 commented May 2, 2021

SDL_GetTicks() doesn't start with zero if the current libogc version is used. But it should.
The API docs of SDL_GetTicks() says: "Returns an unsigned 32-bit value representing the number of milliseconds since the SDL library initialized."

The problem is that the behaviour of the libogc function gettime() changed in a newer (current) version of libogc (I don't know at which libogc version this happend). The old libogc Version returns a timestamp relative to the starting point wenn the app was started. The current libogc version returns a very high value. Maybe the absolute time (system time)??? but definitely not the time since the app is started. But sdl-wii rely on the old behaviour.
The bugfix is very easy. The bugfix also works for old libogc versions. If SDL_GetTicks() doesn't start at zero the 32bit value is not enough.

@carstene1ns
Copy link
Contributor

I know this is tedious, but the bugfix should also be supplied to ogc-sdl1.2 branch on devkitpro repo (https://github.com/devkitPro/SDL/blob/ogc-sdl1.2/src/timer/ogc/SDL_systimer.c)
This way the wii-sdl and gamecube-sdl packages can profit from this and get updated as well. Thanks!

@mardy
Copy link

mardy commented Sep 24, 2023

I know this is tedious, but the bugfix should also be supplied to ogc-sdl1.2 branch on devkitpro repo (https://github.com/devkitPro/SDL/blob/ogc-sdl1.2/src/timer/ogc/SDL_systimer.c) This way the wii-sdl and gamecube-sdl packages can profit from this and get updated as well. Thanks!

Hi! Can you please clarify, which SDL library it's recommended to use? This or the one in the devkitpro repository?

Are there any practical differences between the two? I had a quick look at the code, and it seems to me that neither of the libraries do any 2D acceleration on blit operations.

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.

3 participants