Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/cab/out/OutputControllerList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@ void OutputControllerList::Finish()
controller->Finish();

#ifdef __HIDAPI__
Pinscape::ClearDevices();
PinscapePico::ClearDevices();
DudesCab::ClearDevices();
UMXControllerAutoConfigurator::ClearDevices();
#endif
Expand Down
7 changes: 6 additions & 1 deletion src/cab/out/ps/Pinscape.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,12 @@ namespace DOF

std::vector<Pinscape::Device*> Pinscape::s_devices = { };

void Pinscape::Initialize() { FindDevices(); }
void Pinscape::Initialize()
{
if (!s_devices.empty())
return;
FindDevices();
}

Pinscape::Pinscape()
{
Expand Down
7 changes: 6 additions & 1 deletion src/cab/out/pspico/PinscapePico.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,12 @@ namespace DOF

std::vector<PinscapePico::Device*> PinscapePico::s_devices = { };

void PinscapePico::Initialize() { FindDevices(); }
void PinscapePico::Initialize()
{
if (!s_devices.empty())
return;
FindDevices();
}

PinscapePico::PinscapePico()
{
Expand Down
4 changes: 4 additions & 0 deletions src/general/IOConfigurator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

#ifdef __HIDAPI__
#include <hidapi/hidapi.h>
#include "../cab/out/ps/Pinscape.h"
#include "../cab/out/pspico/PinscapePico.h"
#endif

#include <string>
Expand Down Expand Up @@ -44,6 +46,8 @@ void IOConfigurator::Shutdown()
}
#endif
#ifdef __HIDAPI__
Pinscape::ClearDevices();
PinscapePico::ClearDevices();
hid_exit();
#endif
}
Expand Down