mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-04 14:08:37 +00:00
fixed_typemap.hpp: return reference
This commit is contained in:
parent
bbf52f3cea
commit
ea5e837bd6
87 changed files with 3028 additions and 2997 deletions
|
|
@ -53,11 +53,11 @@ struct osk_info
|
|||
// TODO: don't use this function
|
||||
std::shared_ptr<OskDialogBase> _get_osk_dialog(bool create = false)
|
||||
{
|
||||
const auto osk = g_fxo->get<osk_info>();
|
||||
auto& osk = g_fxo->get<osk_info>();
|
||||
|
||||
if (create)
|
||||
{
|
||||
const auto init = osk->init.init();
|
||||
const auto init = osk.init.init();
|
||||
|
||||
if (!init)
|
||||
{
|
||||
|
|
@ -67,25 +67,25 @@ std::shared_ptr<OskDialogBase> _get_osk_dialog(bool create = false)
|
|||
if (auto manager = g_fxo->try_get<rsx::overlays::display_manager>())
|
||||
{
|
||||
std::shared_ptr<rsx::overlays::osk_dialog> dlg = std::make_shared<rsx::overlays::osk_dialog>();
|
||||
osk->dlg = manager->add(dlg);
|
||||
osk.dlg = manager->add(dlg);
|
||||
}
|
||||
else
|
||||
{
|
||||
osk->dlg = Emu.GetCallbacks().get_osk_dialog();
|
||||
osk.dlg = Emu.GetCallbacks().get_osk_dialog();
|
||||
}
|
||||
|
||||
return osk->dlg;
|
||||
return osk.dlg;
|
||||
}
|
||||
else
|
||||
{
|
||||
const auto init = osk->init.access();
|
||||
const auto init = osk.init.access();
|
||||
|
||||
if (!init)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return osk->dlg;
|
||||
return osk.dlg;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -164,7 +164,7 @@ error_code cellOskDialogLoadAsync(u32 container, vm::ptr<CellOskDialogParam> dia
|
|||
|
||||
if (accepted)
|
||||
{
|
||||
if (auto ccb = g_fxo->get<osk_info>()->osk_confirm_callback.exchange({}))
|
||||
if (auto ccb = g_fxo->get<osk_info>().osk_confirm_callback.exchange({}))
|
||||
{
|
||||
vm::ptr<u16> string_to_send = vm::cast(vm::alloc(CELL_OSKDIALOG_STRING_SIZE * 2, vm::main));
|
||||
atomic_t<bool> done = false;
|
||||
|
|
@ -198,7 +198,7 @@ error_code cellOskDialogLoadAsync(u32 container, vm::ptr<CellOskDialogParam> dia
|
|||
}
|
||||
}
|
||||
|
||||
if (g_fxo->get<osk_info>()->use_separate_windows.load() && osk->osk_text[0] == 0)
|
||||
if (g_fxo->get<osk_info>().use_separate_windows.load() && osk->osk_text[0] == 0)
|
||||
{
|
||||
cellOskDialog.warning("cellOskDialogLoadAsync: input result is CELL_OSKDIALOG_INPUT_FIELD_RESULT_NO_INPUT_TEXT");
|
||||
osk->osk_input_result = CELL_OSKDIALOG_INPUT_FIELD_RESULT_NO_INPUT_TEXT;
|
||||
|
|
@ -214,7 +214,7 @@ error_code cellOskDialogLoadAsync(u32 container, vm::ptr<CellOskDialogParam> dia
|
|||
}
|
||||
|
||||
// Send OSK status
|
||||
if (g_fxo->get<osk_info>()->use_separate_windows.load() && (g_fxo->get<osk_info>()->osk_continuous_mode.load() != CELL_OSKDIALOG_CONTINUOUS_MODE_NONE))
|
||||
if (g_fxo->get<osk_info>().use_separate_windows.load() && (g_fxo->get<osk_info>().osk_continuous_mode.load() != CELL_OSKDIALOG_CONTINUOUS_MODE_NONE))
|
||||
{
|
||||
if (accepted)
|
||||
{
|
||||
|
|
@ -237,7 +237,7 @@ error_code cellOskDialogLoadAsync(u32 container, vm::ptr<CellOskDialogParam> dia
|
|||
{
|
||||
const auto osk = wptr.lock();
|
||||
|
||||
if (g_fxo->get<osk_info>()->use_separate_windows.load())
|
||||
if (g_fxo->get<osk_info>().use_separate_windows.load())
|
||||
{
|
||||
sysutil_send_system_cmd(CELL_SYSUTIL_OSKDIALOG_INPUT_ENTERED, 0);
|
||||
}
|
||||
|
|
@ -325,10 +325,10 @@ error_code getText(vm::ptr<CellOskDialogCallbackReturnParam> OutputInfo, bool is
|
|||
if (is_unload)
|
||||
{
|
||||
// Unload should be called last, so remove the dialog here
|
||||
if (const auto reset_lock = g_fxo->get<osk_info>()->init.reset())
|
||||
if (const auto reset_lock = g_fxo->get<osk_info>().init.reset())
|
||||
{
|
||||
// TODO
|
||||
g_fxo->get<osk_info>()->dlg.reset();
|
||||
g_fxo->get<osk_info>().dlg.reset();
|
||||
}
|
||||
|
||||
sysutil_send_system_cmd(CELL_SYSUTIL_OSKDIALOG_UNLOADED, 0);
|
||||
|
|
@ -422,10 +422,10 @@ error_code cellOskDialogSetSeparateWindowOption(vm::ptr<CellOskDialogSeparateWin
|
|||
return CELL_OSKDIALOG_ERROR_PARAM;
|
||||
}
|
||||
|
||||
if (const auto osk = g_fxo->get<osk_info>(); true)
|
||||
if (auto& osk = g_fxo->get<osk_info>(); true)
|
||||
{
|
||||
osk->use_separate_windows = true;
|
||||
osk->osk_continuous_mode = static_cast<CellOskDialogContinuousMode>(+windowOption->continuousMode);
|
||||
osk.use_separate_windows = true;
|
||||
osk.osk_continuous_mode = static_cast<CellOskDialogContinuousMode>(+windowOption->continuousMode);
|
||||
}
|
||||
|
||||
return CELL_OK;
|
||||
|
|
@ -583,9 +583,9 @@ error_code cellOskDialogExtRegisterConfirmWordFilterCallback(vm::ptr<cellOskDial
|
|||
return CELL_OSKDIALOG_ERROR_PARAM;
|
||||
}
|
||||
|
||||
if (const auto osk = g_fxo->get<osk_info>(); true)
|
||||
if (auto& osk = g_fxo->get<osk_info>(); true)
|
||||
{
|
||||
osk->osk_confirm_callback = pCallback;
|
||||
osk.osk_confirm_callback = pCallback;
|
||||
}
|
||||
|
||||
return CELL_OK;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue