mirror of
https://github.com/cathery/sys-con.git
synced 2024-09-28 14:40:46 +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.
|
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!
|
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 "ControllerHelpers.h"
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
|
||||||
|
static HiddbgHdlsSessionId g_hdlsSessionId;
|
||||||
|
|
||||||
SwitchHDLHandler::SwitchHDLHandler(std::unique_ptr<IController> &&controller)
|
SwitchHDLHandler::SwitchHDLHandler(std::unique_ptr<IController> &&controller)
|
||||||
: SwitchVirtualGamepadHandler(std::move(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
|
//Checks if the virtual device was erased, in which case re-attach the device
|
||||||
bool isAttached;
|
bool isAttached;
|
||||||
|
|
||||||
if (R_SUCCEEDED(hiddbgIsHdlsVirtualDeviceAttached(m_hdlHandle, &isAttached)))
|
if (R_SUCCEEDED(hiddbgIsHdlsVirtualDeviceAttached(GetHdlsSessionId(), m_hdlHandle, &isAttached)))
|
||||||
{
|
{
|
||||||
if (!isAttached)
|
if (!isAttached)
|
||||||
hiddbgAttachHdlsVirtualDevice(&m_hdlHandle, &m_deviceInfo);
|
hiddbgAttachHdlsVirtualDevice(&m_hdlHandle, &m_deviceInfo);
|
||||||
@ -196,4 +198,9 @@ void SwitchHDLHandler::UpdateOutput()
|
|||||||
}
|
}
|
||||||
|
|
||||||
svcSleepThread(1e+7L);
|
svcSleepThread(1e+7L);
|
||||||
|
}
|
||||||
|
|
||||||
|
HiddbgHdlsSessionId &SwitchHDLHandler::GetHdlsSessionId()
|
||||||
|
{
|
||||||
|
return g_hdlsSessionId;
|
||||||
}
|
}
|
@ -34,4 +34,6 @@ public:
|
|||||||
void FillHdlState(const NormalizedButtonData &data);
|
void FillHdlState(const NormalizedButtonData &data);
|
||||||
//Passes the HDL state to HID so that it could register the inputs
|
//Passes the HDL state to HID so that it could register the inputs
|
||||||
Result UpdateHdlState();
|
Result UpdateHdlState();
|
||||||
|
|
||||||
|
static HiddbgHdlsSessionId &GetHdlsSessionId();
|
||||||
};
|
};
|
@ -11,6 +11,8 @@
|
|||||||
"pool_partition": 2,
|
"pool_partition": 2,
|
||||||
"is_64_bit": true,
|
"is_64_bit": true,
|
||||||
"address_space_type": 1,
|
"address_space_type": 1,
|
||||||
|
"system_resource_size": "0",
|
||||||
|
"disable_device_address_space_merge": true,
|
||||||
"filesystem_access": {
|
"filesystem_access": {
|
||||||
"permissions": "0xffffffffffffffff"
|
"permissions": "0xffffffffffffffff"
|
||||||
},
|
},
|
||||||
|
@ -55,7 +55,7 @@ namespace syscon::config
|
|||||||
|
|
||||||
ControllerButton StringToKey(const char *text)
|
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)
|
if (strcmp(keyNames[i], text) == 0)
|
||||||
{
|
{
|
||||||
|
@ -6,8 +6,9 @@
|
|||||||
#include "controller_handler.h"
|
#include "controller_handler.h"
|
||||||
#include "config_handler.h"
|
#include "config_handler.h"
|
||||||
#include "psc_module.h"
|
#include "psc_module.h"
|
||||||
|
#include "SwitchHDLHandler.h"
|
||||||
|
|
||||||
#define APP_VERSION "0.6.3"
|
#define APP_VERSION "0.6.4"
|
||||||
|
|
||||||
// libnx fake heap initialization
|
// libnx fake heap initialization
|
||||||
extern "C"
|
extern "C"
|
||||||
@ -66,7 +67,7 @@ extern "C" void __appInit(void)
|
|||||||
|
|
||||||
R_ABORT_UNLESS(hiddbgInitialize());
|
R_ABORT_UNLESS(hiddbgInitialize());
|
||||||
if (hosversionAtLeast(7, 0, 0))
|
if (hosversionAtLeast(7, 0, 0))
|
||||||
R_ABORT_UNLESS(hiddbgAttachHdlsWorkBuffer());
|
R_ABORT_UNLESS(hiddbgAttachHdlsWorkBuffer(&SwitchHDLHandler::GetHdlsSessionId()));
|
||||||
R_ABORT_UNLESS(usbHsInitialize());
|
R_ABORT_UNLESS(usbHsInitialize());
|
||||||
R_ABORT_UNLESS(pscmInitialize());
|
R_ABORT_UNLESS(pscmInitialize());
|
||||||
R_ABORT_UNLESS(fsInitialize());
|
R_ABORT_UNLESS(fsInitialize());
|
||||||
@ -81,7 +82,7 @@ extern "C" void __appExit(void)
|
|||||||
{
|
{
|
||||||
pscmExit();
|
pscmExit();
|
||||||
usbHsExit();
|
usbHsExit();
|
||||||
hiddbgReleaseHdlsWorkBuffer();
|
hiddbgReleaseHdlsWorkBuffer(SwitchHDLHandler::GetHdlsSessionId());
|
||||||
hiddbgExit();
|
hiddbgExit();
|
||||||
fsdevUnmountAll();
|
fsdevUnmountAll();
|
||||||
fsExit();
|
fsExit();
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 44279dbac4cce6413faf5b44bd790b23aa323083
|
Subproject commit dc52a32285c62fbb68e701393ec3b4efdc452343
|
Loading…
Reference in New Issue
Block a user