From a5ba96e991982c30c64eca62b32fe5003d6ab5fc Mon Sep 17 00:00:00 2001 From: Elad <18193363+elad335@users.noreply.github.com> Date: Wed, 25 Dec 2024 06:56:08 +0200 Subject: [PATCH 1/6] Fixup lv2_socket --- rpcs3/Emu/Cell/lv2/sys_net/lv2_socket.cpp | 3 +++ rpcs3/Emu/Cell/lv2/sys_net/lv2_socket.h | 2 +- rpcs3/Emu/Cell/lv2/sys_net/lv2_socket_native.cpp | 5 +++++ rpcs3/Emu/Cell/lv2/sys_net/lv2_socket_native.h | 1 + 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/rpcs3/Emu/Cell/lv2/sys_net/lv2_socket.cpp b/rpcs3/Emu/Cell/lv2/sys_net/lv2_socket.cpp index 0e1543157c..d95c6935fc 100644 --- a/rpcs3/Emu/Cell/lv2/sys_net/lv2_socket.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_net/lv2_socket.cpp @@ -186,3 +186,6 @@ lv2_socket& lv2_socket::operator=(thread_state s) noexcept return *this; } +lv2_socket::~lv2_socket() noexcept +{ +} diff --git a/rpcs3/Emu/Cell/lv2/sys_net/lv2_socket.h b/rpcs3/Emu/Cell/lv2/sys_net/lv2_socket.h index 4703f31d5f..f0e3b61d00 100644 --- a/rpcs3/Emu/Cell/lv2/sys_net/lv2_socket.h +++ b/rpcs3/Emu/Cell/lv2/sys_net/lv2_socket.h @@ -64,7 +64,7 @@ public: lv2_socket(utils::serial&, lv2_socket_type type); static std::function load(utils::serial& ar); void save(utils::serial&, bool save_only_this_class = false); - ~lv2_socket() noexcept = default; + virtual ~lv2_socket() noexcept; lv2_socket& operator=(thread_state s) noexcept; std::unique_lock lock(); diff --git a/rpcs3/Emu/Cell/lv2/sys_net/lv2_socket_native.cpp b/rpcs3/Emu/Cell/lv2/sys_net/lv2_socket_native.cpp index 75fd375e5a..d0a735b178 100644 --- a/rpcs3/Emu/Cell/lv2/sys_net/lv2_socket_native.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_net/lv2_socket_native.cpp @@ -57,6 +57,11 @@ void lv2_socket_native::save(utils::serial& ar) ar(is_socket_connected()); } +lv2_socket_native::~lv2_socket_native() noexcept +{ + lv2_socket_native::close(); +} + s32 lv2_socket_native::create_socket() { ensure(family == SYS_NET_AF_INET); diff --git a/rpcs3/Emu/Cell/lv2/sys_net/lv2_socket_native.h b/rpcs3/Emu/Cell/lv2/sys_net/lv2_socket_native.h index e9a2b21bb6..808529356a 100644 --- a/rpcs3/Emu/Cell/lv2/sys_net/lv2_socket_native.h +++ b/rpcs3/Emu/Cell/lv2/sys_net/lv2_socket_native.h @@ -34,6 +34,7 @@ public: lv2_socket_native(lv2_socket_family family, lv2_socket_type type, lv2_ip_protocol protocol); lv2_socket_native(utils::serial& ar, lv2_socket_type type); + ~lv2_socket_native() noexcept override; void save(utils::serial& ar); s32 create_socket(); From 0cc655074d0b5389c7b7cc9723b2b94522e4bcbe Mon Sep 17 00:00:00 2001 From: Elad <18193363+elad335@users.noreply.github.com> Date: Wed, 25 Dec 2024 07:02:42 +0200 Subject: [PATCH 2/6] serialzation.hpp: Fix add_padding --- Utilities/StrFmt.cpp | 2 +- rpcs3/Emu/Cell/Modules/cellGem.cpp | 4 ---- rpcs3/Emu/Memory/vm.cpp | 3 +-- rpcs3/Emu/savestate_utils.cpp | 2 +- rpcs3/util/serialization.hpp | 16 +++++++++++----- 5 files changed, 14 insertions(+), 13 deletions(-) diff --git a/Utilities/StrFmt.cpp b/Utilities/StrFmt.cpp index e2c2198bdc..dd59303337 100644 --- a/Utilities/StrFmt.cpp +++ b/Utilities/StrFmt.cpp @@ -596,7 +596,7 @@ void fmt_class_string::format(std::string& out, u64 arg) } } - func = func.substr(0, index); + func = func.substr(0, index) + "()"; break; } diff --git a/rpcs3/Emu/Cell/Modules/cellGem.cpp b/rpcs3/Emu/Cell/Modules/cellGem.cpp index 57858dd3b3..f7d274c4d0 100644 --- a/rpcs3/Emu/Cell/Modules/cellGem.cpp +++ b/rpcs3/Emu/Cell/Modules/cellGem.cpp @@ -479,10 +479,6 @@ public: gem_config_data(utils::serial& ar) { save(ar); - - if (ar.is_writing()) - return; - load_configs(); } diff --git a/rpcs3/Emu/Memory/vm.cpp b/rpcs3/Emu/Memory/vm.cpp index 446d8d98a3..6ab0ecc71d 100644 --- a/rpcs3/Emu/Memory/vm.cpp +++ b/rpcs3/Emu/Memory/vm.cpp @@ -1749,8 +1749,7 @@ namespace vm if (is_memory_compatible_for_copy_from_executable_optimization(addr, shm.first)) { // Revert changes - ar.data.resize(ar.data.size() - (sizeof(u32) * 2 + sizeof(memory_page))); - ar.seek_end(); + ar.trunc(sizeof(u32) * 2 + sizeof(memory_page)); vm_log.success("Removed memory block matching the memory of the executable from savestate. (addr=0x%x, size=0x%x)", addr, shm.first); continue; } diff --git a/rpcs3/Emu/savestate_utils.cpp b/rpcs3/Emu/savestate_utils.cpp index 790da3b035..9559547260 100644 --- a/rpcs3/Emu/savestate_utils.cpp +++ b/rpcs3/Emu/savestate_utils.cpp @@ -393,7 +393,7 @@ namespace stx if ((saved ^ tag) & data_mask) { ensure(!ar.is_writing()); - fmt::throw_exception("serial_breathe_and_tag(%u): %s, object: '%s', next-object: '%s', expected/tag: 0x%x != 0x%x,", s_tls_call_count, ar, s_tls_object_name, name, tag, saved); + fmt::throw_exception("serial_breathe_and_tag(%u): %s\nobject: '%s', next-object: '%s', expected/tag: 0x%x != 0x%x,", s_tls_call_count, ar, s_tls_object_name, name, tag, saved); } s_tls_object_name = name; diff --git a/rpcs3/util/serialization.hpp b/rpcs3/util/serialization.hpp index bcc0fe8d97..120c70c606 100644 --- a/rpcs3/util/serialization.hpp +++ b/rpcs3/util/serialization.hpp @@ -108,10 +108,10 @@ public: { if (m_is_writing) return; - const u32 offset1 = ::offset32(first) + sizeof(first); + const u32 offset1 = ::offset32(first) + sizeof(T); const u32 offset2 = ::offset32(second); - AUDIT(offset2 >= offset1); + AUDIT(::offset32(first) <= ::offset32(second)); if (offset2 > offset1) { @@ -459,10 +459,16 @@ public: m_file_handler.reset(); } - usz seek_end(usz backwards = 0) + usz seek_end() { - ensure(data.size() + data_offset >= backwards); - pos = data.size() + data_offset - backwards; + pos = data.size() + data_offset; + return pos; + } + + usz trunc(usz count) + { + data.resize(data.size() - count); + seek_end(); return pos; } From cfeb0223400a0d6ec96b0f913762575dd365c8d9 Mon Sep 17 00:00:00 2001 From: Elad <18193363+elad335@users.noreply.github.com> Date: Wed, 25 Dec 2024 08:42:45 +0200 Subject: [PATCH 3/6] shared_ptr.hpp: Rewrite shared_ptr to single_ptr conversion Logic felt non-intuitive and this method should be very explicit. --- rpcs3/util/shared_ptr.hpp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/rpcs3/util/shared_ptr.hpp b/rpcs3/util/shared_ptr.hpp index 7685cfda91..06f1d2a380 100644 --- a/rpcs3/util/shared_ptr.hpp +++ b/rpcs3/util/shared_ptr.hpp @@ -451,23 +451,18 @@ namespace stx } } - // Converts to unique (single) ptr if reference is 1, otherwise returns null. Nullifies self. + // Converts to unique (single) ptr if reference is 1. Nullifies self on success. template requires PtrSame - explicit operator single_ptr() && noexcept + single_ptr try_convert_to_single_ptr() noexcept { - const auto o = d(); - - if (m_ptr && !--o->refs) + if (const auto o = m_ptr ? d() : nullptr; o && o->refs == 1u) { // Convert last reference to single_ptr instance. - o->refs.release(1); - single_ptr r; + single_ptr r; r.m_ptr = static_cast(std::exchange(m_ptr, nullptr)); return r; } - // Otherwise, both pointers are gone. Didn't seem right to do it in the constructor. - m_ptr = nullptr; return {}; } From 7a4e88c146b8dca7b9c036cee2431874a4305b45 Mon Sep 17 00:00:00 2001 From: Elad <18193363+elad335@users.noreply.github.com> Date: Wed, 25 Dec 2024 10:56:39 +0200 Subject: [PATCH 4/6] Savestates: Fix main_ppu_module definition --- rpcs3/Emu/Cell/PPUAnalyser.h | 4 ++++ rpcs3/Emu/savestate_utils.cpp | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/rpcs3/Emu/Cell/PPUAnalyser.h b/rpcs3/Emu/Cell/PPUAnalyser.h index 87a6de04d7..9d6f4ef9ed 100644 --- a/rpcs3/Emu/Cell/PPUAnalyser.h +++ b/rpcs3/Emu/Cell/PPUAnalyser.h @@ -186,6 +186,10 @@ struct main_ppu_module : public ppu_module u32 elf_entry{}; u32 seg0_code_end{}; std::vector applied_patches; + + // Disable inherited savestate ordering + void save(utils::serial&) = delete; + static constexpr double savestate_init_pos = double{}; }; // Aux diff --git a/rpcs3/Emu/savestate_utils.cpp b/rpcs3/Emu/savestate_utils.cpp index 9559547260..85a2a82574 100644 --- a/rpcs3/Emu/savestate_utils.cpp +++ b/rpcs3/Emu/savestate_utils.cpp @@ -42,7 +42,7 @@ static std::array s_serial_versions; return ::s_serial_versions[identifier].current_version;\ } -SERIALIZATION_VER(global_version, 0, 18) // For stuff not listed here +SERIALIZATION_VER(global_version, 0, 19) // For stuff not listed here SERIALIZATION_VER(ppu, 1, 1, 2/*PPU sleep order*/, 3/*PPU FNID and module*/) SERIALIZATION_VER(spu, 2, 1) SERIALIZATION_VER(lv2_sync, 3, 1) From 1d23be842915decf8a226e2399d3b67beaeaabc3 Mon Sep 17 00:00:00 2001 From: Megamouse Date: Sat, 28 Dec 2024 16:58:48 +0100 Subject: [PATCH 5/6] Qt: Add Operating system category --- rpcs3/rpcs3qt/category.h | 4 +++- rpcs3/rpcs3qt/gui_settings.cpp | 2 ++ rpcs3/rpcs3qt/gui_settings.h | 2 ++ rpcs3/rpcs3qt/main_window.cpp | 24 ++++++++++++--------- rpcs3/rpcs3qt/main_window.ui | 39 ++++++++-------------------------- 5 files changed, 30 insertions(+), 41 deletions(-) diff --git a/rpcs3/rpcs3qt/category.h b/rpcs3/rpcs3qt/category.h index 641af991b8..d87ebc1092 100644 --- a/rpcs3/rpcs3qt/category.h +++ b/rpcs3/rpcs3qt/category.h @@ -13,6 +13,7 @@ enum Category Home, Media, Data, + OS, Unknown_Cat, Others, }; @@ -50,5 +51,6 @@ namespace cat const QStringList psp_games = { cat_psp_game, cat_psp_mini, cat_psp_rema }; const QStringList media = { cat_app_photo, cat_app_video, cat_bc_video, cat_app_music, cat_app_store, cat_app_tv, cat_web_tv }; const QStringList data = { cat_ps3_data, cat_ps2_data, cat_ps3_save, cat_psp_save }; - const QStringList others = { cat_network, cat_store_fe, cat_ps3_os }; + const QStringList os = { cat_ps3_os }; + const QStringList others = { cat_network, cat_store_fe }; } diff --git a/rpcs3/rpcs3qt/gui_settings.cpp b/rpcs3/rpcs3qt/gui_settings.cpp index 54ed12391f..8b14e490f8 100644 --- a/rpcs3/rpcs3qt/gui_settings.cpp +++ b/rpcs3/rpcs3qt/gui_settings.cpp @@ -125,6 +125,7 @@ QStringList gui_settings::GetGameListCategoryFilters(bool is_list_mode) const if (GetCategoryVisibility(Category::Home, is_list_mode)) filterList.append(cat::cat_home); if (GetCategoryVisibility(Category::Media, is_list_mode)) filterList.append(cat::media); if (GetCategoryVisibility(Category::Data, is_list_mode)) filterList.append(cat::data); + if (GetCategoryVisibility(Category::OS, is_list_mode)) filterList.append(cat::os); if (GetCategoryVisibility(Category::Unknown_Cat, is_list_mode)) filterList.append(cat::cat_unknown); if (GetCategoryVisibility(Category::Others, is_list_mode)) filterList.append(cat::others); @@ -344,6 +345,7 @@ gui_save gui_settings::GetGuiSaveForCategory(int cat, bool is_list_mode) case Category::PSP_Game: return is_list_mode ? gui::cat_psp_game : gui::grid_cat_psp_game; case Category::Media: return is_list_mode ? gui::cat_audio_video : gui::grid_cat_audio_video; case Category::Data: return is_list_mode ? gui::cat_game_data : gui::grid_cat_game_data; + case Category::OS: return is_list_mode ? gui::cat_os : gui::grid_cat_os; case Category::Unknown_Cat: return is_list_mode ? gui::cat_unknown : gui::grid_cat_unknown; case Category::Others: return is_list_mode ? gui::cat_other : gui::grid_cat_other; default: diff --git a/rpcs3/rpcs3qt/gui_settings.h b/rpcs3/rpcs3qt/gui_settings.h index df56ffe730..82c6770d00 100644 --- a/rpcs3/rpcs3qt/gui_settings.h +++ b/rpcs3/rpcs3qt/gui_settings.h @@ -161,6 +161,7 @@ namespace gui const gui_save cat_home = gui_save(game_list, "categoryVisibleHome", true); const gui_save cat_audio_video = gui_save(game_list, "categoryVisibleAudioVideo", true); const gui_save cat_game_data = gui_save(game_list, "categoryVisibleGameData", false); + const gui_save cat_os = gui_save(game_list, "categoryVisibleOS", false); const gui_save cat_unknown = gui_save(game_list, "categoryVisibleUnknown", true); const gui_save cat_other = gui_save(game_list, "categoryVisibleOther", true); @@ -172,6 +173,7 @@ namespace gui const gui_save grid_cat_home = gui_save(game_list, "gridCategoryVisibleHome", true); const gui_save grid_cat_audio_video = gui_save(game_list, "gridCategoryVisibleAudioVideo", true); const gui_save grid_cat_game_data = gui_save(game_list, "gridCategoryVisibleGameData", false); + const gui_save grid_cat_os = gui_save(game_list, "gridCategoryVisibleOS", false); const gui_save grid_cat_unknown = gui_save(game_list, "gridCategoryVisibleUnknown", true); const gui_save grid_cat_other = gui_save(game_list, "gridCategoryVisibleOther", true); diff --git a/rpcs3/rpcs3qt/main_window.cpp b/rpcs3/rpcs3qt/main_window.cpp index 09a09ce221..d3206b7bdb 100644 --- a/rpcs3/rpcs3qt/main_window.cpp +++ b/rpcs3/rpcs3qt/main_window.cpp @@ -2391,6 +2391,7 @@ void main_window::UpdateFilterActions() ui->showCatHomeAct->setChecked(m_gui_settings->GetCategoryVisibility(Category::Home, m_is_list_mode)); ui->showCatAudioVideoAct->setChecked(m_gui_settings->GetCategoryVisibility(Category::Media, m_is_list_mode)); ui->showCatGameDataAct->setChecked(m_gui_settings->GetCategoryVisibility(Category::Data, m_is_list_mode)); + ui->showCatOSAct->setChecked(m_gui_settings->GetCategoryVisibility(Category::OS, m_is_list_mode)); ui->showCatUnknownAct->setChecked(m_gui_settings->GetCategoryVisibility(Category::Unknown_Cat, m_is_list_mode)); ui->showCatOtherAct->setChecked(m_gui_settings->GetCategoryVisibility(Category::Others, m_is_list_mode)); } @@ -2551,6 +2552,7 @@ void main_window::CreateActions() m_category_visible_act_group->addAction(ui->showCatHomeAct); m_category_visible_act_group->addAction(ui->showCatAudioVideoAct); m_category_visible_act_group->addAction(ui->showCatGameDataAct); + m_category_visible_act_group->addAction(ui->showCatOSAct); m_category_visible_act_group->addAction(ui->showCatUnknownAct); m_category_visible_act_group->addAction(ui->showCatOtherAct); m_category_visible_act_group->setExclusive(false); @@ -3227,16 +3229,17 @@ void main_window::CreateConnects() const auto get_cats = [this](QAction* act, int& id) -> QStringList { QStringList categories; - if (act == ui->showCatHDDGameAct) { categories += cat::cat_hdd_game; id = Category::HDD_Game; } - else if (act == ui->showCatDiscGameAct) { categories += cat::cat_disc_game; id = Category::Disc_Game; } - else if (act == ui->showCatPS1GamesAct) { categories += cat::cat_ps1_game; id = Category::PS1_Game; } - else if (act == ui->showCatPS2GamesAct) { categories += cat::ps2_games; id = Category::PS2_Game; } - else if (act == ui->showCatPSPGamesAct) { categories += cat::psp_games; id = Category::PSP_Game; } - else if (act == ui->showCatHomeAct) { categories += cat::cat_home; id = Category::Home; } - else if (act == ui->showCatAudioVideoAct) { categories += cat::media; id = Category::Media; } - else if (act == ui->showCatGameDataAct) { categories += cat::data; id = Category::Data; } - else if (act == ui->showCatUnknownAct) { categories += cat::cat_unknown; id = Category::Unknown_Cat; } - else if (act == ui->showCatOtherAct) { categories += cat::others; id = Category::Others; } + if (act == ui->showCatHDDGameAct) { categories.append(cat::cat_hdd_game); id = Category::HDD_Game; } + else if (act == ui->showCatDiscGameAct) { categories.append(cat::cat_disc_game); id = Category::Disc_Game; } + else if (act == ui->showCatPS1GamesAct) { categories.append(cat::cat_ps1_game); id = Category::PS1_Game; } + else if (act == ui->showCatPS2GamesAct) { categories.append(cat::ps2_games); id = Category::PS2_Game; } + else if (act == ui->showCatPSPGamesAct) { categories.append(cat::psp_games); id = Category::PSP_Game; } + else if (act == ui->showCatHomeAct) { categories.append(cat::cat_home); id = Category::Home; } + else if (act == ui->showCatAudioVideoAct) { categories.append(cat::media); id = Category::Media; } + else if (act == ui->showCatGameDataAct) { categories.append(cat::data); id = Category::Data; } + else if (act == ui->showCatOSAct) { categories.append(cat::os); id = Category::OS; } + else if (act == ui->showCatUnknownAct) { categories.append(cat::cat_unknown); id = Category::Unknown_Cat; } + else if (act == ui->showCatOtherAct) { categories.append(cat::others); id = Category::Others; } else { gui_log.warning("categoryVisibleActGroup: category action not found"); } return categories; }; @@ -3276,6 +3279,7 @@ void main_window::CreateConnects() set_cat_count(ui->showCatHomeAct, tr("Home")); set_cat_count(ui->showCatAudioVideoAct, tr("Audio/Video")); set_cat_count(ui->showCatGameDataAct, tr("Game Data")); + set_cat_count(ui->showCatOSAct, tr("Operating System")); set_cat_count(ui->showCatUnknownAct, tr("Unknown")); set_cat_count(ui->showCatOtherAct, tr("Other")); }); diff --git a/rpcs3/rpcs3qt/main_window.ui b/rpcs3/rpcs3qt/main_window.ui index 2d0396c499..ba29696974 100644 --- a/rpcs3/rpcs3qt/main_window.ui +++ b/rpcs3/rpcs3qt/main_window.ui @@ -355,6 +355,7 @@ + @@ -883,9 +884,6 @@ true - - true - HDD Games @@ -894,9 +892,6 @@ true - - true - Disc Games @@ -905,9 +900,6 @@ true - - true - PS1 Games @@ -916,9 +908,6 @@ true - - true - PS2 Games @@ -927,9 +916,6 @@ true - - true - PSP Games @@ -938,9 +924,6 @@ true - - true - Home @@ -949,9 +932,6 @@ true - - true - Audio/Video @@ -960,9 +940,6 @@ true - - true - Game Data @@ -971,9 +948,6 @@ true - - true - Unknown @@ -1090,9 +1064,6 @@ true - - true - Other @@ -1402,6 +1373,14 @@ PS Move + + + true + + + Operating System + + From 33c3e3fb0fbd9d1ae54bf45d10f3081fc2c05212 Mon Sep 17 00:00:00 2001 From: Megamouse Date: Sat, 28 Dec 2024 12:31:17 +0100 Subject: [PATCH 6/6] fix some warning --- rpcs3/Emu/IdManager.cpp | 4 ++-- rpcs3/Emu/IdManager.h | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/rpcs3/Emu/IdManager.cpp b/rpcs3/Emu/IdManager.cpp index 3621c50c66..b8225b07ef 100644 --- a/rpcs3/Emu/IdManager.cpp +++ b/rpcs3/Emu/IdManager.cpp @@ -33,7 +33,7 @@ std::vector>& id_manager::get_typeinfo_map return s_map; } -id_manager::id_key* idm::allocate_id(std::span keys, usz& highest_index, u32 type_id, u32 dst_id, u32 base, u32 step, u32 count, bool uses_lowest_id, std::pair invl_range) +id_manager::id_key* idm::allocate_id(std::span keys, u32& highest_index, u32 type_id, u32 dst_id, u32 base, u32 step, u32 count, bool uses_lowest_id, std::pair invl_range) { if (dst_id != (base ? 0 : u32{umax})) { @@ -41,7 +41,7 @@ id_manager::id_key* idm::allocate_id(std::span keys, usz& hi const u32 index = id_manager::get_index(dst_id, base, step, count, invl_range); ensure(index < count); - highest_index = std::max(highest_index, index + 1); + highest_index = std::max(highest_index, index + 1); if (keys[index].type() != umax) { diff --git a/rpcs3/Emu/IdManager.h b/rpcs3/Emu/IdManager.h index b555907d13..99082462f9 100644 --- a/rpcs3/Emu/IdManager.h +++ b/rpcs3/Emu/IdManager.h @@ -286,7 +286,7 @@ namespace id_manager std::array, T::id_count> vec_data{}; std::array, T::id_count> private_copy{}; std::array vec_keys{}; - usz highest_index = 0; + u32 highest_index = 0; shared_mutex mutex{}; // TODO: Use this instead of global mutex @@ -330,11 +330,11 @@ namespace id_manager // Simulate construction semantics (idm::last_id() value) g_id = id; - const usz object_index = get_index(id, info->base, info->step, info->count, info->invl_range); + const u32 object_index = get_index(id, info->base, info->step, info->count, info->invl_range); auto& obj = ::at32(vec_data, object_index); ensure(!obj); - highest_index = std::max(highest_index, object_index + 1); + highest_index = std::max(highest_index, object_index + 1); vec_keys[object_index] = id_key(id, static_cast(static_cast(type_init_pos >> 64))); info->load(ar)(&obj); @@ -383,7 +383,7 @@ namespace id_manager reader_lock lock(g_mutex); // Save all entries - for (usz i = 0; i < highest_index; i++) + for (u32 i = 0; i < highest_index; i++) { private_copy[i] = vec_data[i].load(); } @@ -489,7 +489,7 @@ class idm } // Prepare new ID (returns nullptr if out of resources) - static id_manager::id_key* allocate_id(std::span vec, usz& highest_index, u32 type_id, u32 dst_id, u32 base, u32 step, u32 count, bool uses_lowest_id, std::pair invl_range); + static id_manager::id_key* allocate_id(std::span keys, u32& highest_index, u32 type_id, u32 dst_id, u32 base, u32 step, u32 count, bool uses_lowest_id, std::pair invl_range); // Get object by internal index if exists (additionally check type if types are not equal) template