-
Notifications
You must be signed in to change notification settings - Fork 160
Improve sceGuSignal
usage
#306
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
base: master
Are you sure you want to change the base?
Conversation
@@ -15,7 +15,7 @@ int sceGuCallList(const void *list) | |||
|
|||
if (gu_call_mode == GU_CALL_SIGNAL) | |||
{ | |||
sendCommandi(SIGNAL, (list_addr >> 16) | 0x110000); | |||
sendCommandi(SIGNAL, (0x11 << 16) | (list_addr >> 16)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the old syntax (list_addr >> 16) | 0x110000
as it's clearer to me, but it's probably just my personal preference.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here… 0x11 is an specific command
@@ -33,7 +33,7 @@ int sceGuFinishId(unsigned int id) | |||
case GU_CALL: | |||
if (gu_call_mode == GU_CALL_SIGNAL) | |||
{ | |||
sendCommandi(SIGNAL, 0x120000); | |||
sendCommandi(SIGNAL, 0x12 << 16); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here, I'd keep 0x120000
(personal preference)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason why I split it is because 0x12 is actually part of a GE command when SIGNAL CMD is used.
@@ -324,10 +324,6 @@ extern "C" { | |||
#define GU_CALLBACK_SIGNAL (1) | |||
#define GU_CALLBACK_FINISH (4) | |||
|
|||
/* Signal behavior */ | |||
#define GU_BEHAVIOR_SUSPEND (1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe instead of removing these 2 values we could add to the documentation that they are deprecated and should not be used. I think this might break existing code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO is not worthy, this is why we introduced the versioning…
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way we could cause a custom compile error when the old value is used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do see why you'd want to take it out, because it is confusing. My main issue is that if you try to compile code that uses one of these values, you'll get an error that does not help you to get your code to compile. I don't know how you'd find out that the original value was 1 or 2.
Description
This PR improves the function definition of
sceGuSignal
andsceGuCallMode
, having now better-named parameters and a better description too.Additionally, I have fixed the usage in the examples that PSPSDK has.