Disable Keyboard by default

This commit is contained in:
Florian Märkl 2020-11-11 14:03:56 +01:00
commit a2ebf7e408
No known key found for this signature in database
GPG key ID: 125BC8A5A6A1E857
7 changed files with 9 additions and 3 deletions

View file

@ -76,6 +76,7 @@ typedef struct chiaki_connect_info_t
char regist_key[CHIAKI_SESSION_AUTH_SIZE]; // must be completely filled (pad with \0)
uint8_t morning[0x10];
ChiakiConnectVideoProfile video_profile;
bool enable_keyboard;
} ChiakiConnectInfo;
@ -157,6 +158,7 @@ typedef struct chiaki_session_t
uint8_t morning[CHIAKI_RPCRYPT_KEY_SIZE];
uint8_t did[CHIAKI_RP_DID_SIZE];
ChiakiConnectVideoProfile video_profile;
bool enable_keyboard;
} connect_info;
ChiakiTarget target;

View file

@ -488,7 +488,8 @@ static void ctrl_message_received(ChiakiCtrl *ctrl, uint16_t msg_type, uint8_t *
static void ctrl_enable_optional_features(ChiakiCtrl *ctrl)
{
// TODO: Make this optional.
if(!ctrl->session->connect_info.enable_keyboard)
return;
// TODO: Last byte of pre_enable request is random (?)
// TODO: Signature ?!
uint8_t enable = 1;

View file

@ -215,6 +215,7 @@ CHIAKI_EXPORT ChiakiErrorCode chiaki_session_init(ChiakiSession *session, Chiaki
memcpy(session->connect_info.did + sizeof(session->connect_info.did) - sizeof(did_suffix), did_suffix, sizeof(did_suffix));
session->connect_info.video_profile = connect_info->video_profile;
session->connect_info.enable_keyboard = connect_info->enable_keyboard;
return CHIAKI_ERR_SUCCESS;
error_stop_pipe: