added missing buttons and analog buttons to keyboard
This commit is contained in:
parent
19edb8155f
commit
7519d4610c
|
@ -52,8 +52,14 @@ int PS4_SYSV_ABI sceKernelOpen(const char* path, int flags, u16 mode) {
|
|||
bool direct = (flags & ORBIS_KERNEL_O_DIRECT) != 0;
|
||||
bool directory = (flags & ORBIS_KERNEL_O_DIRECTORY) != 0;
|
||||
|
||||
if (std::string_view{path} == "/dev/console" || std::string_view{path} == "/dev/deci_tty6") {
|
||||
return ORBIS_OK;
|
||||
if (std::string_view{path} == "/dev/console") {
|
||||
return 2000;
|
||||
}
|
||||
if (std::string_view{path} == "/dev/deci_tty6") {
|
||||
return 2001;
|
||||
}
|
||||
if (std::string_view{path} == "/dev/stdout") {
|
||||
return 2002;
|
||||
}
|
||||
u32 handle = h->CreateHandle();
|
||||
auto* file = h->GetFile(handle);
|
||||
|
|
|
@ -202,6 +202,41 @@ void WindowSDL::onKeyPress(const SDL_Event* event) {
|
|||
}
|
||||
ax = Input::GetAxis(-0x80, 0x80, axisvalue);
|
||||
break;
|
||||
case SDLK_x:
|
||||
button = OrbisPadButtonDataOffset::ORBIS_PAD_BUTTON_L3;
|
||||
break;
|
||||
case SDLK_m:
|
||||
button = OrbisPadButtonDataOffset::ORBIS_PAD_BUTTON_R3;
|
||||
break;
|
||||
case SDLK_q:
|
||||
button = OrbisPadButtonDataOffset::ORBIS_PAD_BUTTON_L1;
|
||||
break;
|
||||
case SDLK_u:
|
||||
button = OrbisPadButtonDataOffset::ORBIS_PAD_BUTTON_R1;
|
||||
break;
|
||||
case SDLK_e:
|
||||
button = OrbisPadButtonDataOffset::ORBIS_PAD_BUTTON_L2;
|
||||
axis = Input::Axis::TriggerLeft;
|
||||
if (event->type == SDL_EVENT_KEY_DOWN) {
|
||||
axisvalue += 255;
|
||||
} else {
|
||||
axisvalue = 0;
|
||||
}
|
||||
ax = Input::GetAxis(0, 0x80, axisvalue);
|
||||
break;
|
||||
case SDLK_o:
|
||||
button = OrbisPadButtonDataOffset::ORBIS_PAD_BUTTON_R2;
|
||||
axis = Input::Axis::TriggerRight;
|
||||
if (event->type == SDL_EVENT_KEY_DOWN) {
|
||||
axisvalue += 255;
|
||||
} else {
|
||||
axisvalue = 0;
|
||||
}
|
||||
ax = Input::GetAxis(0, 0x80, axisvalue);
|
||||
break;
|
||||
case SDLK_SPACE:
|
||||
button = OrbisPadButtonDataOffset::ORBIS_PAD_BUTTON_TOUCH_PAD;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue