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

SDL1.2 : SDL_AddTimer not working #184

Open
vichoca9 opened this issue Aug 11, 2024 · 6 comments
Open

SDL1.2 : SDL_AddTimer not working #184

vichoca9 opened this issue Aug 11, 2024 · 6 comments

Comments

@vichoca9
Copy link

I was compiling POWDER for PSP again based on the files provided on its latest build, with current toolchain from pspdev's page and with pspdev sdl 1.2.15-5 [installed] latest sdl.

For some reason, the timer thread doesnt do anything, yet the game works fine on Linux SDL with almost no changes, so the Callback function (or the thread) might be not getting called.

I might update this once I test the threads issue more deeply, maybe with a simpler app.

@vichoca9 vichoca9 changed the title SDL_AddTimer not working SDL1.2 : SDL_AddTimer not working Aug 11, 2024
@sharkwouter
Copy link
Member

Interesting, the code for the SDL 1.2 port which we host can be found here: https://github.com/pspdev/SDL/tree/psp-v.1.2.15

It has been a while since anyone touched it.

@vichoca9
Copy link
Author

Nope, the schrodinger bug keeps happening. I even updated the game to SDL2 (and now it works), but SDL1.2 still doesnt. It seems that SDL_PumpEvents or SDL_WaitEvents might be involved, I will keep this open JUST in case someone else has this bug.

@vichoca9 vichoca9 reopened this Aug 23, 2024
@sharkwouter
Copy link
Member

Do you have a code example that shows the bug by any chance?

@vichoca9
Copy link
Author

vichoca9 commented Aug 24, 2024

SDL1.2 test's testtimer.c works in Linux but not on PSP. I provided a makefile (run make for psp, else compile normally with command on PC) and the modified test.
testtimer.zip

@vichoca9
Copy link
Author

SDL2 version runs as expected (modified from the same test!):
testtimer_SDL2.zip

@sharkwouter
Copy link
Member

Thank for the example. I'm glad it works on SDL2 at least. That probably means it works on SDL3 as well. My guess right now is that this fix never arrived in SDL 1.2: libsdl-org/SDL#9340

But there could also be other causes. SDL 1.2 is not so commonly used and there have been some changes in the API in the SDK.

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

No branches or pull requests

2 participants