Input: log interception and its source function

This commit is contained in:
Megamouse 2022-04-26 00:15:27 +02:00
parent 08ebc59db0
commit c8700dd246
3 changed files with 10 additions and 6 deletions

View File

@ -768,7 +768,7 @@ error_code cellOskDialogSetSeparateWindowOption(vm::ptr<CellOskDialogSeparateWin
// inputFieldLayoutInfo;
// inputPanelLayoutInfo;
cellOskDialog.warning("cellOskDialogSetSeparateWindowOption: continuousMode=%s)", osk.osk_continuous_mode.load());
cellOskDialog.warning("cellOskDialogSetSeparateWindowOption: use_separate_windows=true, continuous_mode=%s, device_mask=0x%x)", osk.osk_continuous_mode.load(), osk.device_mask.load());
return CELL_OK;
}

View File

@ -5,14 +5,18 @@
#include "Input/pad_thread.h"
#include "Emu/IdManager.h"
LOG_CHANNEL(input_log, "Input");
namespace input
{
atomic_t<bool> g_pads_intercepted{false};
atomic_t<bool> g_keyboards_intercepted{false};
atomic_t<bool> g_mice_intercepted{false};
void SetIntercepted(bool pads_intercepted, bool keyboards_intercepted, bool mice_intercepted)
void SetIntercepted(bool pads_intercepted, bool keyboards_intercepted, bool mice_intercepted, const char* func)
{
input_log.warning("SetIntercepted: pads=%d, keyboards=%d, mice=%d, src=%s)", pads_intercepted, keyboards_intercepted, mice_intercepted, func);
g_pads_intercepted = pads_intercepted;
g_keyboards_intercepted = keyboards_intercepted;
g_mice_intercepted = mice_intercepted;
@ -30,8 +34,8 @@ namespace input
}
}
void SetIntercepted(bool all_intercepted)
void SetIntercepted(bool all_intercepted, const char* func)
{
SetIntercepted(all_intercepted, all_intercepted, all_intercepted);
SetIntercepted(all_intercepted, all_intercepted, all_intercepted, func);
}
}

View File

@ -8,6 +8,6 @@ namespace input
extern atomic_t<bool> g_keyboards_intercepted;
extern atomic_t<bool> g_mice_intercepted;
void SetIntercepted(bool pads_intercepted, bool keyboards_intercepted, bool mice_intercepted);
void SetIntercepted(bool all_intercepted);
void SetIntercepted(bool pads_intercepted, bool keyboards_intercepted, bool mice_intercepted, const char* func = __builtin_FUNCTION());
void SetIntercepted(bool all_intercepted, const char* func = __builtin_FUNCTION());
}