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

Language and MC fix #340

Merged
merged 2 commits into from
Dec 29, 2020
Merged

Language and MC fix #340

merged 2 commits into from
Dec 29, 2020

Conversation

KrahJohlito
Copy link
Member

Pull Request checklist

Note: these are not necessarily requirements

  • I reformatted the code with clang-format
  • I checked to make sure my submission worked
  • I am the author of submission or have permission from the original author
  • Requires update of the PS2SDK
  • Requires update of the gsKit
  • Others (please specify below)

Pull Request description

fixes #321 as seen here the first call to mcGetInfo() returns a value of -1 if a formatted mc is found.

Languages were freeing based on number of valid entries for the newly selected language rather than the one being freed.

@rickgaiser
Copy link
Member

Calling mcSync after calling mcGetInfo should return (copied from ps2sdk):

 * mcSync result:	 0 = same card as last getInfo call
 *					-1 = formatted card inserted since last getInfo call
 *					-2 = unformatted card inserted since last getInfo call
 *					< -2 = memcard access error (could be due to accessing psx memcard)

So checking for -1 seems good, but what happens the second time the mc card is checked? Does it then return 0 (same card)?

@KrahJohlito
Copy link
Member Author

Yea it should return 0 but this shouldn't happen as we would already have an mcID at this point and just pass through the function https://github.com/ps2homebrew/Open-PS2-Loader/blob/master/src/util.c#L48

The second call to mcGetInfo() immediately after is checking the other slot so on first call this would also return -1 even if the first card already did as its a new card.

@rickgaiser rickgaiser merged commit fa30283 into ps2homebrew:master Dec 29, 2020
@KrahJohlito KrahJohlito deleted the patch branch January 1, 2021 11:12
AKuHAK pushed a commit that referenced this pull request Sep 30, 2021
citronalco pushed a commit to citronalco/OPL-Daily-Builds that referenced this pull request Sep 10, 2023
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.

[ISSUE] OPL isn't recognizing the translation in mc/OPL folder anymore
2 participants