devkitPro / 3ds-examples

Examples for 3DS using devkitARM, libctru, citro3d and citro2d
https://devkitpro.org/viewforum.php?f=39
453 stars 51 forks source link

MiiData type isn't recognized by VS Code #66

Open BlyZeDev opened 1 month ago

BlyZeDev commented 1 month ago

Bug Report

What's the issue you encountered?

The MiiSelectorReturn type has a field named mii with the type MiiData. For some reason the type MiiData seems to not exist. So I can't use the field mii with it's properties. If I check the implementation I see this so I don't know what's going on.

typedef struct
{
    u32 no_mii_selected;                ///< 0 if a Mii was selected, 1 if the selection was
                                        ///< canceled.
    u32 guest_mii_was_selected;         ///< 1 if a Guest Mii was selected, 0 otherwise.
    u32 guest_mii_index;                ///< Index of the selected Guest Mii,
                                        ///< 0xFFFFFFFF if no guest was selected.
    MiiData mii;                        ///< Data of selected Mii.
    u16 _pad0x68;                       ///< @private
    u16 checksum;                       ///< Checksum of the returned Mii data.
                                        ///< Stored as a big-endian value; use
                                        ///< @ref miiSelectorChecksumIsValid to
                                        ///< verify.
    u16 guest_mii_name[MIISELECTOR_GUESTMII_NAME_LEN]; ///< Localized name of a Guest Mii,
                                                       ///< if one was selected (UTF16-LE
                                                       ///< string). Zeroed otherwise.
} MiiSelectorReturn;

How can the issue be reproduced?

MiiSelectorConf msConf;
MiiSelectorReturn msRet;

miiSelectorInit(&msConf);
miiSelectorSetTitle(&msConf, "Select your Mii");
miiSelectorSetOptions(&msConf, 0);
miiSelectorSetInitialIndex(&msConf, 0);
miiSelectorLaunch(&msConf, &msRet);

msRet.mii //Doesn't exist for some reason
MiiData data //Doesn't exist as well

When hovering over .mii I get this: <error-type> <unnamed>::mii

Environment?

BlyZeDev commented 1 month ago

Update

Everything works but the type doesn't get recognized by VS Code

WinterMute commented 1 month ago

This isn't completed. It's simply been locked to avoid random contributions from people who like to drive by issues here and provide bogus advice. We're currently working on figuring out how to get this working cross platform while allowing the vscode project settings to be shared.

This project will work across macOS, linux and windows with the caveat that vscode should be started from the msys2 shell after running make GENERATE_COMPILE_COMMANDS=1

image

The issue we currently have is that this line will only work on windows if the environment variable gets translated into a windows path (which the msys2 shell will do when starting a native windows program)

This may not matter if you don't use windows. It makes things kind of awkward if you do.