mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-10-02 14:19:22 +00:00
Minor fixup after #7068
This commit is contained in:
parent
5631382623
commit
5142d7c011
1 changed files with 12 additions and 5 deletions
|
@ -100,13 +100,20 @@ error_code sys_tty_write(s32 ch, vm::cptr<char> buf, u32 len, vm::ptr<u32> pwrit
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sys_tty.notice("sys_tty_write(ch=%d, buf=*0x%x(%s), len=%d, pwritelen=*0x%x)", ch, buf, msg, len, pwritelen);
|
sys_tty.notice("sys_tty_write(ch=%d, buf=*0x%x (“%s”), len=%d, pwritelen=*0x%x)", ch, buf, msg, len, pwritelen);
|
||||||
|
|
||||||
// Hack: write to tty even on CEX mode, but disable all error checks
|
// Hack: write to tty even on CEX mode, but disable all error checks
|
||||||
if ((ch < 0 || ch > 15) && g_cfg.core.debug_console_mode)
|
if (ch < 0 || ch > 15)
|
||||||
|
{
|
||||||
|
if (g_cfg.core.debug_console_mode)
|
||||||
{
|
{
|
||||||
return CELL_EINVAL;
|
return CELL_EINVAL;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
msg.clear();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (g_cfg.core.debug_console_mode)
|
if (g_cfg.core.debug_console_mode)
|
||||||
{
|
{
|
||||||
|
@ -128,13 +135,13 @@ error_code sys_tty_write(s32 ch, vm::cptr<char> buf, u32 len, vm::ptr<u32> pwrit
|
||||||
}
|
}
|
||||||
else if (g_cfg.core.debug_console_mode)
|
else if (g_cfg.core.debug_console_mode)
|
||||||
{
|
{
|
||||||
return CELL_EFAULT;
|
return {CELL_EFAULT, buf.addr()};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!pwritelen.try_write(len))
|
if (!pwritelen.try_write(len))
|
||||||
{
|
{
|
||||||
return CELL_EFAULT;
|
return {CELL_EFAULT, pwritelen};
|
||||||
}
|
}
|
||||||
|
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue