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 other sceDisplay functions #248

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

diamant3
Copy link
Member

@diamant3 diamant3 commented Nov 14, 2024

These are the last functions found in sceDisplay according from https://spenon-dev.github.io/PSPLibDoc/, but these are all untested. Can we add them? thanks.

Verified

This commit was signed with the committer’s verified signature.
pentschev Peter Andreas Entschev
@sharkwouter
Copy link
Member

I did a quick test to see if this interfered with existing functions, but I had no issue. I would like to see at least one or two test applications to make sure at least some of them work, though. I think sceDisplayGetBrightness and sceDisplayIsVsync should be quite easy to test.

@sharkwouter
Copy link
Member

I did some more testing and it seems that these are wrong unfortunately. The sceDisplayIsVsync function actually returns a counter which starts when the application is started which keeps increasing. sceDisplayGetBrightness returns 0 regardless of screen brightness.

@sharkwouter
Copy link
Member

The sceDisplayGetResumeMode function causes the application to crash. The sceDisplayAdjustAccumulatedHcount function just returns 0, dunno what that means.

Copy link
Member

@sharkwouter sharkwouter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right now these functions don't do what the titles say. Some don't even work. We should fix this first.

@joel16
Copy link
Contributor

joel16 commented Nov 14, 2024

Well for one, I doubt all these functions have void arguments. For example sceDisplayGetBrightness seems to have two parameters from what I remember:

https://github.com/joel16/CMFileManager-PSP/blob/next/display_driver/display_driver.c#L13 (This is the kernel mode equivalent though which I assume would be similar/same in usermode)

@diamant3
Copy link
Member Author

Right now these functions don't do what the titles say. Some don't even work. We should fix this first.

Got it, and if no error codes returned, it means it's just a matter of function signature. I'll draft it and continue to work on this one. Thank you guys.

@diamant3 diamant3 marked this pull request as draft November 14, 2024 23:52

Verified

This commit was signed with the committer’s verified signature.
pentschev Peter Andreas Entschev

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@diamant3
Copy link
Member Author

Done. I checked them all one function at a time using my PSP slim(2000) and everything is usable except the sceDisplayGetResumeMode(I wrote a warning on this function).

Thanks to Joel16' CMFileManager display driver implementation, PPSSPP sceDisplay implementation and vita SDK docs.

@diamant3 diamant3 marked this pull request as ready for review November 16, 2024 02:12
@joel16
Copy link
Contributor

joel16 commented Nov 16, 2024

I might be completely wrong, and this is nothing than a mere speculation but sceDisplayGetResumeMode sounds like something for psp go's resume feature.

@diamant3
Copy link
Member Author

I might be completely wrong, and this is nothing than a mere speculation but sceDisplayGetResumeMode sounds like something for psp go's resume feature.

That function is specific to psp go? Hopefully not.😢

Anyway, Is it much better if I remove that sceDisplayGetResumeMode function to be safe?

@joel16
Copy link
Contributor

joel16 commented Nov 16, 2024

I might be completely wrong, and this is nothing than a mere speculation but sceDisplayGetResumeMode sounds like something for psp go's resume feature.

That function is specific to psp go? Hopefully not.😢

Anyway, Is it much better if I remove that sceDisplayGetResumeMode function to be safe?

Unless we can get it tested somehow then I'd suggest we remove it.

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

3 participants