mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-05 06:26:49 +00:00
input: implement HidDevice::close
Preparing for further ps move additions down the line.
This commit is contained in:
parent
eab1c1260c
commit
289b70d276
6 changed files with 23 additions and 20 deletions
|
|
@ -204,7 +204,7 @@ skateboard_pad_handler::DataStatus skateboard_pad_handler::get_data(skateboard_d
|
|||
if (res == -1)
|
||||
{
|
||||
// looks like controller disconnected or read error
|
||||
skateboard_log.error("get_data ReadError", device->path);
|
||||
skateboard_log.error("get_data ReadError: %s", hid_error(device->hidDevice));
|
||||
return DataStatus::ReadError;
|
||||
}
|
||||
|
||||
|
|
@ -254,8 +254,7 @@ PadHandlerBase::connection skateboard_pad_handler::update_connection(const std::
|
|||
if (get_data(skateboard_dev) == DataStatus::ReadError)
|
||||
{
|
||||
// this also can mean disconnected, either way deal with it on next loop and reconnect
|
||||
hid_close(skateboard_dev->hidDevice);
|
||||
skateboard_dev->hidDevice = nullptr;
|
||||
skateboard_dev->close();
|
||||
|
||||
return connection::no_data;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue