Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Fix] Fixing input
#1
Wrote this up for RootSource on OGC, figured you guys could benefit from it?

Nean Wrote:I just spent the last two and a half hours working on this, so somebody better appreciate it. For spending so long, it's a very few lines of code. Anyways here goes

Add:
Code:
Public Declare Function GetForegroundWindow Lib "user32" () As Long
in ModInput

Then replace:
Code:
Call CheckInputKeys ' Check which keys were pressed

With:
Code:
If GetForegroundWindow() = frmMainGame.hwnd Then
            Call CheckInputKeys ' Check which keys were pressed
        End If

Voila, done. Now it only responds if the current window is RootSource
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)