mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-07 15:31:26 +12:00
cellOskDialog fix
This commit is contained in:
parent
aa357b9ae8
commit
d07ea31400
3 changed files with 9 additions and 6 deletions
|
@ -8,14 +8,13 @@
|
||||||
|
|
||||||
logs::channel cellOskDialog("cellOskDialog", logs::level::notice);
|
logs::channel cellOskDialog("cellOskDialog", logs::level::notice);
|
||||||
|
|
||||||
char16_t* osk_text;
|
static char16_t s_osk_text[CELL_OSKDIALOG_STRING_SIZE];
|
||||||
|
|
||||||
s32 cellOskDialogLoadAsync(u32 container, vm::ptr<CellOskDialogParam> dialogParam, vm::ptr<CellOskDialogInputFieldInfo> inputFieldInfo)
|
s32 cellOskDialogLoadAsync(u32 container, vm::ptr<CellOskDialogParam> dialogParam, vm::ptr<CellOskDialogInputFieldInfo> inputFieldInfo)
|
||||||
{
|
{
|
||||||
cellOskDialog.warning("cellOskDialogLoadAsync(container=0x%x, dialogParam=*0x%x, inputFieldInfo=*0x%x)", container, dialogParam, inputFieldInfo);
|
cellOskDialog.warning("cellOskDialogLoadAsync(container=0x%x, dialogParam=*0x%x, inputFieldInfo=*0x%x)", container, dialogParam, inputFieldInfo);
|
||||||
|
|
||||||
osk_text = new char16_t[CELL_OSKDIALOG_STRING_SIZE];
|
std::memset(s_osk_text, 0, sizeof(s_osk_text));
|
||||||
std::memset(osk_text, 0, sizeof(osk_text));
|
|
||||||
|
|
||||||
const auto osk = Emu.GetCallbacks().get_msg_dialog();
|
const auto osk = Emu.GetCallbacks().get_msg_dialog();
|
||||||
bool result = false;
|
bool result = false;
|
||||||
|
@ -33,7 +32,7 @@ s32 cellOskDialogLoadAsync(u32 container, vm::ptr<CellOskDialogParam> dialogPara
|
||||||
|
|
||||||
Emu.CallAfter([&]()
|
Emu.CallAfter([&]()
|
||||||
{
|
{
|
||||||
osk->CreateOsk("On Screen Keyboard", osk_text);
|
osk->CreateOsk("On Screen Keyboard", s_osk_text);
|
||||||
});
|
});
|
||||||
|
|
||||||
while (!result)
|
while (!result)
|
||||||
|
@ -51,7 +50,7 @@ s32 cellOskDialogUnloadAsync(vm::ptr<CellOskDialogCallbackReturnParam> OutputInf
|
||||||
OutputInfo->result = CELL_OSKDIALOG_INPUT_FIELD_RESULT_OK;
|
OutputInfo->result = CELL_OSKDIALOG_INPUT_FIELD_RESULT_OK;
|
||||||
|
|
||||||
for (int i = 0; i < OutputInfo->numCharsResultString; i++) {
|
for (int i = 0; i < OutputInfo->numCharsResultString; i++) {
|
||||||
*(OutputInfo->pResultString + i) = (be_t<u16>)*(osk_text + i);
|
*(OutputInfo->pResultString + i) = (be_t<u16>)*(s_osk_text + i);
|
||||||
}
|
}
|
||||||
|
|
||||||
return CELL_OSKDIALOG_OK;
|
return CELL_OSKDIALOG_OK;
|
||||||
|
|
|
@ -133,6 +133,7 @@
|
||||||
<ClCompile Include="Gui\MemoryStringSearcher.cpp" />
|
<ClCompile Include="Gui\MemoryStringSearcher.cpp" />
|
||||||
<ClCompile Include="Gui\MemoryViewer.cpp" />
|
<ClCompile Include="Gui\MemoryViewer.cpp" />
|
||||||
<ClCompile Include="Gui\MsgDialog.cpp" />
|
<ClCompile Include="Gui\MsgDialog.cpp" />
|
||||||
|
<ClCompile Include="Gui\OskDialog.cpp" />
|
||||||
<ClCompile Include="Gui\PADManager.cpp" />
|
<ClCompile Include="Gui\PADManager.cpp" />
|
||||||
<ClCompile Include="Gui\RegisterEditor.cpp" />
|
<ClCompile Include="Gui\RegisterEditor.cpp" />
|
||||||
<ClCompile Include="Gui\RSXDebugger.cpp" />
|
<ClCompile Include="Gui\RSXDebugger.cpp" />
|
||||||
|
|
|
@ -105,6 +105,9 @@
|
||||||
<ClCompile Include="Gui\InstructionEditor.cpp">
|
<ClCompile Include="Gui\InstructionEditor.cpp">
|
||||||
<Filter>Gui</Filter>
|
<Filter>Gui</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="Gui\OskDialog.cpp">
|
||||||
|
<Filter>Gui</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="..\Utilities\MTProgressDialog.h">
|
<ClInclude Include="..\Utilities\MTProgressDialog.h">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue