switchbrew / libnx

Library for Switch Homebrew
https://switchbrew.github.io/libnx/
ISC License
1.27k stars 174 forks source link

add fsDeviceOperatorGetGameCardUpdatePartitionInfo #635

Closed ITotalJustice closed 11 months ago

ITotalJustice commented 11 months ago

i wasn't sure if the version field should be a bitfield or just a u32. if we keep it a u32, should i comment how to extract the version as it might not be obvious to the dev, as they may try to use HOSVER_X macros on it

const u8 relstep = (update_partition_info.version >> 0)  & 0xFFFF;
const u8 micro   = (update_partition_info.version >> 16) & 0x000F;
const u8 minor   = (update_partition_info.version >> 20) & 0x003F;
const u8 major   = (update_partition_info.version >> 26) & 0x003F;
yellows8 commented 11 months ago

u32 version is fine, u32 version is used elsewhere.