Implement 3DS region auto-detect
This commit is contained in:
@@ -59,6 +59,9 @@ void Memory::reset() {
|
||||
readTable[i + initialPage] = pointer;
|
||||
writeTable[i + initialPage] = pointer;
|
||||
}
|
||||
|
||||
// Later adjusted based on ROM header when possible
|
||||
region = Regions::USA;
|
||||
}
|
||||
|
||||
bool Memory::allocateMainThreadStack(u32 size) {
|
||||
@@ -472,3 +475,9 @@ u64 Memory::timeSince3DSEpoch() {
|
||||
milliseconds ms = duration_cast<milliseconds>(seconds(rawTime + timezoneDifference + offset));
|
||||
return ms.count();
|
||||
}
|
||||
|
||||
Regions Memory::getConsoleRegion() {
|
||||
// TODO: Let the user force the console region as they want
|
||||
// For now we pick one based on the ROM header
|
||||
return region;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user