mirror of
https://github.com/cathery/sys-con.git
synced 2024-12-24 15:13:45 +00:00
Update for FW 13.0.0
This commit is contained in:
parent
7686597006
commit
670968ac65
@ -45,7 +45,7 @@ Instead, clone the repository **recursively** using any git client you have. (Gi
|
||||
|
||||
Like all other switch projects, you need to have [devkitA64](https://switchbrew.org/wiki/Setting_up_Development_Environment) set up on your system.
|
||||
|
||||
For compatibility with the Atmosphere-libs dependency, this project currently uses a version of libnx at commit **[5509f8f](https://github.com/switchbrew/libnx/commit/5509f8f14bc87a41794855d2b965cf0c08e9dd6d)**. Clone the repository, checkout to that commit, and run `make install` to set it up.
|
||||
For compatibility with the Atmosphere-libs dependency, this project currently uses a version of libnx at commit **[b35d42f](https://github.com/switchbrew/libnx/commit/b35d42faaa60b02662aaaf0702614f6e4afcbbbc)**. Clone the repository, checkout to that commit, and run `make install` to set it up.
|
||||
|
||||
If you have **Visual Studio Code**, you can open the project as a folder and run the build tasks from inside the program. It also has Intellisense configured for switch development, if you have DEVKITPRO correctly defined in your environment variables. Handy!
|
||||
|
||||
|
@ -2,6 +2,8 @@
|
||||
#include "ControllerHelpers.h"
|
||||
#include <cmath>
|
||||
|
||||
static HiddbgHdlsSessionId g_hdlsSessionId;
|
||||
|
||||
SwitchHDLHandler::SwitchHDLHandler(std::unique_ptr<IController> &&controller)
|
||||
: SwitchVirtualGamepadHandler(std::move(controller))
|
||||
{
|
||||
@ -84,7 +86,7 @@ Result SwitchHDLHandler::UpdateHdlState()
|
||||
//Checks if the virtual device was erased, in which case re-attach the device
|
||||
bool isAttached;
|
||||
|
||||
if (R_SUCCEEDED(hiddbgIsHdlsVirtualDeviceAttached(m_hdlHandle, &isAttached)))
|
||||
if (R_SUCCEEDED(hiddbgIsHdlsVirtualDeviceAttached(GetHdlsSessionId(), m_hdlHandle, &isAttached)))
|
||||
{
|
||||
if (!isAttached)
|
||||
hiddbgAttachHdlsVirtualDevice(&m_hdlHandle, &m_deviceInfo);
|
||||
@ -196,4 +198,9 @@ void SwitchHDLHandler::UpdateOutput()
|
||||
}
|
||||
|
||||
svcSleepThread(1e+7L);
|
||||
}
|
||||
|
||||
HiddbgHdlsSessionId &SwitchHDLHandler::GetHdlsSessionId()
|
||||
{
|
||||
return g_hdlsSessionId;
|
||||
}
|
@ -34,4 +34,6 @@ public:
|
||||
void FillHdlState(const NormalizedButtonData &data);
|
||||
//Passes the HDL state to HID so that it could register the inputs
|
||||
Result UpdateHdlState();
|
||||
|
||||
static HiddbgHdlsSessionId &GetHdlsSessionId();
|
||||
};
|
@ -11,6 +11,8 @@
|
||||
"pool_partition": 2,
|
||||
"is_64_bit": true,
|
||||
"address_space_type": 1,
|
||||
"system_resource_size": "0",
|
||||
"disable_device_address_space_merge": true,
|
||||
"filesystem_access": {
|
||||
"permissions": "0xffffffffffffffff"
|
||||
},
|
||||
|
@ -55,7 +55,7 @@ namespace syscon::config
|
||||
|
||||
ControllerButton StringToKey(const char *text)
|
||||
{
|
||||
for (int i = 0; i != keyNames.size(); ++i)
|
||||
for (std::size_t i = 0; i != keyNames.size(); ++i)
|
||||
{
|
||||
if (strcmp(keyNames[i], text) == 0)
|
||||
{
|
||||
|
@ -6,8 +6,9 @@
|
||||
#include "controller_handler.h"
|
||||
#include "config_handler.h"
|
||||
#include "psc_module.h"
|
||||
#include "SwitchHDLHandler.h"
|
||||
|
||||
#define APP_VERSION "0.6.3"
|
||||
#define APP_VERSION "0.6.4"
|
||||
|
||||
// libnx fake heap initialization
|
||||
extern "C"
|
||||
@ -66,7 +67,7 @@ extern "C" void __appInit(void)
|
||||
|
||||
R_ABORT_UNLESS(hiddbgInitialize());
|
||||
if (hosversionAtLeast(7, 0, 0))
|
||||
R_ABORT_UNLESS(hiddbgAttachHdlsWorkBuffer());
|
||||
R_ABORT_UNLESS(hiddbgAttachHdlsWorkBuffer(&SwitchHDLHandler::GetHdlsSessionId()));
|
||||
R_ABORT_UNLESS(usbHsInitialize());
|
||||
R_ABORT_UNLESS(pscmInitialize());
|
||||
R_ABORT_UNLESS(fsInitialize());
|
||||
@ -81,7 +82,7 @@ extern "C" void __appExit(void)
|
||||
{
|
||||
pscmExit();
|
||||
usbHsExit();
|
||||
hiddbgReleaseHdlsWorkBuffer();
|
||||
hiddbgReleaseHdlsWorkBuffer(SwitchHDLHandler::GetHdlsSessionId());
|
||||
hiddbgExit();
|
||||
fsdevUnmountAll();
|
||||
fsExit();
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 44279dbac4cce6413faf5b44bd790b23aa323083
|
||||
Subproject commit dc52a32285c62fbb68e701393ec3b4efdc452343
|
Loading…
Reference in New Issue
Block a user