overlays/osk: handle input device change

This commit is contained in:
Megamouse 2023-01-21 15:42:10 +01:00
parent 5299061282
commit 641fadc1fb
3 changed files with 30 additions and 9 deletions

View file

@ -513,6 +513,7 @@ error_code cellOskDialogLoadAsync(u32 container, vm::ptr<CellOskDialogParam> dia
// Set device mask and event lock
osk->ignore_input_events = info.lock_ext_input.load();
osk->input_device = info.initial_input_device.load();
if (info.use_separate_windows)
{
@ -812,7 +813,7 @@ error_code cellOskDialogSetSeparateWindowOption(vm::ptr<CellOskDialogSeparateWin
error_code cellOskDialogSetInitialInputDevice(u32 inputDevice)
{
cellOskDialog.todo("cellOskDialogSetInitialInputDevice(inputDevice=%d)", inputDevice);
cellOskDialog.warning("cellOskDialogSetInitialInputDevice(inputDevice=%d)", inputDevice);
if (inputDevice > CELL_OSKDIALOG_INPUT_DEVICE_KEYBOARD)
{
@ -821,9 +822,6 @@ error_code cellOskDialogSetInitialInputDevice(u32 inputDevice)
g_fxo->get<osk_info>().initial_input_device = static_cast<CellOskDialogInputDevice>(inputDevice);
// TODO: use initial_input_device
// TODO: Signal CELL_SYSUTIL_OSKDIALOG_INPUT_DEVICE_CHANGED if the input device changed (probably only when the dialog is already open)
return CELL_OK;
}