mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-28 13:28:01 +03:00
sys_fs: Improved sys_fs_fcntl(0xc0000015&0xc000001c)
This commit is contained in:
parent
e0fe7989e9
commit
d2dc57585c
10 changed files with 36 additions and 104 deletions
|
@ -559,6 +559,18 @@ void cfg::log_entry::from_default()
|
|||
set_map({});
|
||||
}
|
||||
|
||||
std::pair<u16, u16> cfg::device_info::get_usb_ids() const
|
||||
{
|
||||
auto string_to_hex = [](const std::string& str) -> u16
|
||||
{
|
||||
u16 value = 0x0000;
|
||||
if (!str.empty() && std::from_chars(str.data(), str.data() + str.size(), value, 16).ec != std::errc{})
|
||||
cfg_log.error("Failed to parse hex from string \"%s\"", str);
|
||||
return value;
|
||||
};
|
||||
return {string_to_hex(vid), string_to_hex(pid)};
|
||||
}
|
||||
|
||||
void cfg::device_entry::set_map(map_of_type<device_info>&& map)
|
||||
{
|
||||
m_map = std::move(map);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue