xenia icon indicating copy to clipboard operation
xenia copied to clipboard

[XAM] Implemented XamCreateEnumeratorHandle

Open Gliniak opened this issue 2 years ago • 5 comments

  • Thanks Rick for providing names for parameters

After spending a some time I figured out that extra_size is just a size of single item, so I changed its name 🐑

This resolves guest crashes in few games that lately started to crash in main menu

Gliniak avatar Aug 22 '21 18:08 Gliniak

The main problem of this implementation is that it will be empty regardless. We need to match this against a list of app_id, open_message, close_message, and item_size to create the appropriate enumerator. Defaulting to an empty static untyped enumerator is probably fine (with warnings).

gibbed avatar Aug 22 '21 20:08 gibbed

I agree, however I'm not sure if item_size is important there 🤔 In my opinion: app_id, open_message and close_message should be enough to determine exactly what kind of enumerator we need.

Gliniak avatar Aug 22 '21 20:08 Gliniak

I agree, however I'm not sure if item_size is important there 🤔 In my opinion: app_id, open_message and close_message should be enough to determine exactly what kind of enumerator we need.

extra_size is important if we're create our own enumerator implementations to pass back instead of the untyped enumerator that has nothing in it. If we get a different size, then that suggests it's not the same enumerator.

gibbed avatar Aug 22 '21 20:08 gibbed

Just to clarify here, extra_size does not map to item_size argument of the constructor. This is a value passed to Initialize(...).

item_size is implicit with the type of enumerator being created, and is not passed in as an argument. Which is why we need to match against those arguments I mentioned to figure out what enumerator is actually being created.

gibbed avatar Aug 22 '21 20:08 gibbed

Ok, good to know. I was worried that this value might not be always correct and can be manipulated freely. That is why I insisted to provide at least one correct value for each app_id, open & close message and check it with what we received.

Gliniak avatar Aug 22 '21 20:08 Gliniak