yuzu-emu
/
yuzu
Archived
1
0
Fork 0

kernel/handle_table: Amend reference to CTR-OS in Create()

Another hold-over from Citra.
This commit is contained in:
Lioncash 2018-12-04 01:40:16 -05:00
parent 312690b450
commit ac966e4213
1 changed files with 3 additions and 2 deletions

View File

@ -42,9 +42,10 @@ ResultVal<Handle> HandleTable::Create(SharedPtr<Object> obj) {
u16 generation = next_generation++; u16 generation = next_generation++;
// Overflow count so it fits in the 15 bits dedicated to the generation in the handle. // Overflow count so it fits in the 15 bits dedicated to the generation in the handle.
// CTR-OS doesn't use generation 0, so skip straight to 1. // Horizon OS uses zero to represent an invalid handle, so skip to 1.
if (next_generation >= (1 << 15)) if (next_generation >= (1 << 15)) {
next_generation = 1; next_generation = 1;
}
generations[slot] = generation; generations[slot] = generation;
objects[slot] = std::move(obj); objects[slot] = std::move(obj);