forked from cafeberry/4JLibs
fix: pad 0 signed in when keyboard focused (KBM without gamepad)
This commit is contained in:
@@ -344,6 +344,11 @@ bool C_4JInput::IsMouseCaptured() const
|
||||
return InternalKeyboard.IsMouseCaptured();
|
||||
}
|
||||
|
||||
bool C_4JInput::IsWindowFocused() const
|
||||
{
|
||||
return InternalKeyboard.IsWindowFocused();
|
||||
}
|
||||
|
||||
void C_4JInput::SetMousePos(int x, int y)
|
||||
{
|
||||
InternalKeyboard.SetMousePos(x, y);
|
||||
|
||||
@@ -90,6 +90,7 @@ public:
|
||||
void SetMouseCaptured(bool captured);
|
||||
void SetWindowFocused(bool focused);
|
||||
bool IsMouseCaptured() const { return m_mouseCaptured; }
|
||||
bool IsWindowFocused() const { return m_windowFocused; }
|
||||
|
||||
void SetMousePos(int x, int y) { m_mouseX = x; m_mouseY = y; }
|
||||
|
||||
|
||||
@@ -7,12 +7,18 @@ wchar_t fakeGamerTagW[16] = L"PlayerName";
|
||||
|
||||
bool CSys::IsSignedIn(int iQuadrant)
|
||||
{
|
||||
return InputManager.IsPadConnected(iQuadrant); //str1k3r - since we dont sign in like consoles just check if the pad is connected
|
||||
if (InputManager.IsPadConnected(iQuadrant))
|
||||
return true;
|
||||
//str1k3r - since we dont sign in like consoles just check if the pad is connected
|
||||
//kbm - pad 0 also counts as signed in when the keyboard is available
|
||||
return iQuadrant == 0 && InputManager.IsWindowFocused();
|
||||
}
|
||||
|
||||
bool CSys::IsSignedInLive(int iProf)
|
||||
{
|
||||
return InputManager.IsPadConnected(iProf);
|
||||
if (InputManager.IsPadConnected(iProf))
|
||||
return true;
|
||||
return iProf == 0 && InputManager.IsWindowFocused();
|
||||
}
|
||||
|
||||
//str1k3r - set every pad that isnt pad 0 as a guest
|
||||
|
||||
@@ -190,6 +190,7 @@ public:
|
||||
void SetMouseCaptured(bool captured);
|
||||
void SetWindowFocused(bool focused);
|
||||
bool IsMouseCaptured() const;
|
||||
bool IsWindowFocused() const;
|
||||
|
||||
void SetMousePos(int x, int y);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user