mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-05-18 05:47:01 +02:00
service: set: Fix GetSettingsItemValue
This commit is contained in:
parent
d953c2d880
commit
4e20a37a2b
3 changed files with 19 additions and 22 deletions
|
|
@ -26,12 +26,9 @@ Service::PSC::Time::SystemClockContext g_report_ephemeral_clock_context{};
|
|||
template <typename T>
|
||||
T GetSettingsItemValue(std::shared_ptr<Service::Set::ISystemSettingsServer>& set_sys,
|
||||
const char* category, const char* name) {
|
||||
std::vector<u8> interval_buf;
|
||||
auto res = set_sys->GetSettingsItemValueImpl(interval_buf, category, name);
|
||||
ASSERT(res == ResultSuccess);
|
||||
|
||||
T v{};
|
||||
std::memcpy(&v, interval_buf.data(), sizeof(T));
|
||||
auto res = set_sys->GetSettingsItemValueImpl(v, category, name);
|
||||
ASSERT(res == ResultSuccess);
|
||||
return v;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue