-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
BcatService: Return InternetRequestDenied for CmifCommand 10101 #6780
base: master
Are you sure you want to change the base?
Conversation
Quick note, some testing was done in Endless Ocean. Returning Result.Success works to load main menu, but gives infinite loop on selecting online play. Returning BcatResult.NotFound also woks. Tries to load stage on selecting online play mode, but fails quietly back to main menu. Returning BcatResult.InternetRequestDenied gave the best results, allowing entry to main menu and prompting an error message before returning to main menu when online play is selected. |
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 think we should be consistent with what we do on RequestSyncDeliveryCache
. It does not look like RequestSyncDeliveryCache
returns an error.
We should probably implement both as if there was no internet connection available, but I'm not sure what it is supposed to return in this case. Also I'm not sure if that could have some undesirable side effect on a game that is currently working.
@@ -16,5 +16,14 @@ public Result RequestSyncDeliveryCache(out IDeliveryCacheProgressService deliver | |||
|
|||
return Result.Success; | |||
} | |||
|
|||
[CmifCommand(10101)] | |||
public Result RequestSyncDeliveryCacheWithDirectoryName(out IDeliveryCacheProgressService deliveryCacheProgressService) |
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.
This is missing the DirectoryName
argument, see https://github.com/gdkchan/Ryujinx/blob/horigen/Ryujinx.Horizon/Sdk/Bcat/Ipc/BcatService.cs#L19
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 would assume it would behave similarly if both return InternetRequestDenied
. In Endless Ocean's case, it fails quietly in some cases and prompts an error message in others. I'm actually not sure why Result.Success
is used here, since there is a BcatResult class that seems more appropriate.
I have updated the code now to include a directory parameter, although it was not failing without one. It's better to have it fleshed out completely for the future. Thanks!
public Result RequestSyncDeliveryCacheWithDirectoryName(out IDeliveryCacheProgressService deliveryCacheProgressService, LibHac.Bcat.DirectoryName arg1)
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.
You should add a new DirectoryName
type instead of using the LibHac type. On the branch that I linked you can find a DirectoryName
struct (although you can also "port" the one from LibHac if you want). The struct should be located on src/Ryujinx.Horizon/Bcat
.
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 tried to quickly implement that, but it caused a lot of build errors. I'll have a better look at it when I get home.
'DirectoryName' is an ambiguous reference between 'Ryujinx.Horizon.Sdk.Bcat.DirectoryName' and 'LibHac.Bcat.DirectoryName'
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.
Ok. I've set up the blank DirectoryName
struct and pushed for that in the arguments. I also resolved the conflicts between Bcat.DirectoryName
and LibHac.Bcat.DirectoryName
. The old functions that may rely on LibHac still use it, so nothing should be broken there.
The LibHac version looks well made, but I don't think it's my business to touch something that complex. :)
…me type and LibHac.Bcat.DirectoryName type
I think it's better to do the same as |
I will not change The options, at least for this game are as follows:
I can provide screenshots/recordings of these outcomes if requested. -Edit- Confused |
You originally said
Which makes it sound like that returning |
Ah. You're right. It's been a week and I confused I've tried dumping another game that uses this method for testing, but it crashes before loading the menu (even on main branch) if lan/ldn is enabled. It ends up crashing trying to write to an invalid address. So can't really test that one and compare the results. |
…net. Allow game to either handle it or fail by itself.
Implementation for BcatService.RequestSyncDeliveryCacheWithDirectoryName()
Instead of trying to connect to official servers, returns BcatResult.InternetRequestDenied.
This fixes #6769 , causing the game to be playable without "Ignore Missing Services". Skips the crash after Chapter 1-1. Also prompts an error message on trying to play online, alerting the user that internet access is not available.