fgsfdsfgs / sm64-port

PS2, PS3, OG Xbox and DOS ports of sm64-port.
https://discord.gg/7bcNTPK
242 stars 38 forks source link

Fix game not saving due to impossible check #81

Closed MtnDont closed 1 year ago

MtnDont commented 1 year ago
fgsfdsfgs commented 1 year ago

Upon checking ps2_drivers, it appears that the correct way to check for init_memcard_driver failure would be if (ret < 0), since both 0 and 1 are considered a success. For mcInit it would probably make sense to do something like this to catch both possible MC types:

    ret = mcInit(MC_TYPE_XMC);
    if (ret < 0) ret = mcInit(MC_TYPE_MC);
    if (ret < 0) {
        printf("ps2_memcard: mcInit failed: %d\n", ret);
        return false;
    }