-
Notifications
You must be signed in to change notification settings - Fork 616
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
nsyshid: Emulated Backend, and Emulated Skylander Portal
- Loading branch information
1 parent
f3d2083
commit 21ed826
Showing
19 changed files
with
1,659 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#include "BackendEmulated.h" | ||
#include "Skylander.h" | ||
#include "config/CemuConfig.h" | ||
|
||
namespace nsyshid::backend::emulated | ||
{ | ||
BackendEmulated::BackendEmulated() | ||
{ | ||
cemuLog_logDebug(LogType::Force, "nsyshid::BackendEmulated: emulated backend initialised"); | ||
} | ||
|
||
BackendEmulated::~BackendEmulated() = default; | ||
|
||
bool BackendEmulated::IsInitialisedOk() | ||
{ | ||
return true; | ||
} | ||
|
||
void BackendEmulated::AttachVisibleDevices() | ||
{ | ||
if (GetConfig().emulated_usb_devices.emulate_skylander_portal && !FindDeviceById(0x1430, 0x0150)) | ||
{ | ||
cemuLog_logDebug(LogType::Force, "Attaching Emulated Portal"); | ||
// Add Skylander Portal | ||
auto device = std::make_shared<SkylanderPortalDevice>(); | ||
AttachDevice(device); | ||
} | ||
} | ||
} // namespace nsyshid::backend::emulated |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#include "nsyshid.h" | ||
#include "Backend.h" | ||
|
||
namespace nsyshid::backend::emulated | ||
{ | ||
class BackendEmulated : public nsyshid::Backend { | ||
public: | ||
BackendEmulated(); | ||
~BackendEmulated(); | ||
|
||
bool IsInitialisedOk() override; | ||
|
||
protected: | ||
void AttachVisibleDevices() override; | ||
}; | ||
} // namespace nsyshid::backend::emulated |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.