From ef71197d905235c8256172337a0f3952e0787151 Mon Sep 17 00:00:00 2001 From: Nathanne Isip Date: Sat, 18 May 2024 02:26:30 +0800 Subject: [PATCH] Fixed syscalls for Keyboard::layout_name() and Keyboard::layout_desc() --- src/rishka_syscalls.cpp | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/rishka_syscalls.cpp b/src/rishka_syscalls.cpp index 000f213..ce46856 100644 --- a/src/rishka_syscalls.cpp +++ b/src/rishka_syscalls.cpp @@ -721,22 +721,16 @@ size_t RishkaSyscall::I2C::bufsize(RishkaVM* vm) { } uint32_t RishkaSyscall::Keyboard::layout_name() { - auto name = (char*) String( - fabgl::PS2Controller::keyboard() - ->getLayout() - ->name - ).c_str(); + auto name = (char*) fabgl::PS2Controller::keyboard() + ->getLayout()->name; change_rt_strpass(name); return strlen(name); } uint32_t RishkaSyscall::Keyboard::layout_desc() { - auto name = (char*) String( - fabgl::PS2Controller::keyboard() - ->getLayout() - ->desc - ).c_str(); + auto name = (char*) fabgl::PS2Controller::keyboard() + ->getLayout()->desc; change_rt_strpass(name); return strlen(name);