Squashed 'deps/nostalgia/' changes from 6a523191..84205879

84205879 [olympic] Cleanup ItemMaker, remove unnecessary copy
ebf3a696 [ox/std] Add String constructor that takes a StringLiteral
dfd27afd [ox/std] Add implicit String constructor for str literals
6bfe1842 [ox/std] Remove unnecessary copying from HashMap::expand
700d7016 [nostalgia] Update for Ox changes
92232383 [ox] Cleanup
3b8d13dc [nostalgia,olympic] Fixes for Ox update
a20d7fd9 [ox] Cleanup
2c0e0227 [ox/std] Add assert to AnyPtr::Wrap::copyTo to ensure sufficiently large buff
e3c74637 [turbine] Make applicationData return const&
41e08d67 [turbine] Make keyEventHandler nodiscard
50f3479d [ox/std] Make AnyPtr constexpr
1616ca70 [turbine] Replace WrapPtr with ox::AnyPtr
3fa247e3 [ox/std] Add AnyPtr
27f1df8f [nostalgia,olympic] Further reduce use of applicationData
a4f0c7cd [nostalgia/core/studio] Remove applicationData usages

git-subtree-dir: deps/nostalgia
git-subtree-split: 84205879d46610dfe08098d1265c0398f2215d3d
This commit is contained in:
2024-04-21 10:33:10 -05:00
parent 5627a63572
commit c0baf7efca
76 changed files with 544 additions and 453 deletions

View File

@@ -134,12 +134,12 @@ ox::Result<char*> loadRom(ox::CRStringView) noexcept {
// media section
constexpr auto headerP2 = "R_______________";
constexpr auto headerP1 = "KEEL_MEDIA_HEADE";
constexpr auto headerP1Len = ox_strlen(headerP2);
constexpr auto headerP2Len = ox_strlen(headerP1);
constexpr auto headerP1Len = ox::strlen(headerP2);
constexpr auto headerP2Len = ox::strlen(headerP1);
constexpr auto headerLen = headerP1Len + headerP2Len;
for (auto current = MEM_ROM; current < reinterpret_cast<char*>(0x0a000000); current += headerLen) {
if (ox_memcmp(current, headerP1, headerP1Len) == 0 &&
ox_memcmp(current + headerP1Len, headerP2, headerP2Len) == 0) {
if (ox::memcmp(current, headerP1, headerP1Len) == 0 &&
ox::memcmp(current + headerP1Len, headerP2, headerP2Len) == 0) {
return current + headerLen;
}
}