Просмотр исходного кода

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

Another hold-over from Citra.
Lioncash 7 лет назад
Родитель
Сommit
ac966e4213
1 измененных файлов с 3 добавлено и 2 удалено
  1. 3 2
      src/core/hle/kernel/handle_table.cpp

+ 3 - 2
src/core/hle/kernel/handle_table.cpp

@@ -42,9 +42,10 @@ ResultVal<Handle> HandleTable::Create(SharedPtr<Object> obj) {
     u16 generation = next_generation++;
 
     // 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.
-    if (next_generation >= (1 << 15))
+    // Horizon OS uses zero to represent an invalid handle, so skip to 1.
+    if (next_generation >= (1 << 15)) {
         next_generation = 1;
+    }
 
     generations[slot] = generation;
     objects[slot] = std::move(obj);