kingm56 Posted February 17, 2022 Report Posted February 17, 2022 Evening Paul! First, I hope you're doing well. Concerning the title, do you know if this method works for MSFS? It seem to work for P3D, but does not register a button input in MSFS. Appreciate all your support, sir.
Paul Henty Posted February 17, 2022 Report Posted February 17, 2022 It doesn't look like these work in FSUIPC7. The dll uses the FSUIPC facilities at offsets 0x3210 (keypresses) and 0x2910 (joystick buttons). The offset status spreadsheet for FSUIPC7 says that 0x3210 is "Probably not working". 0x2910 has a status of 'unknown/untested'. You'll need to ask John if there are any plans to implement these features in FSUIPC7. Paul
kingm56 Posted February 26, 2022 Author Report Posted February 26, 2022 Paul, Checked with John, he states the offset x2910 is active and functioning properly. Any plans to update your dll to take advantage of said offset? -- Hot Button test at offset 0x2910 -- First, write to offset to signal the button I am interested in -- I will use my joystick #1 button #6 for both off to on and in to off ipc.writeUD(0x2910, 0x000681) -- where 0x81 (129) is joystick 1, 06 is button 6 and 00 is for off-to-on -- function to register change function hotButtonActivated(offset, value) if value ~= 0 then ipc.log("Hot button changed: " .. value) -- clear flag ipc.writeUB(offset, 0); end end -- event on trigger event.offset(0x2913, "UB", "hotButtonActivated")
Paul Henty Posted February 26, 2022 Report Posted February 26, 2022 Quote Any plans to update your dll to take advantage of said offset? There nothing for me to do; user input services is already in the DLL and works fine in FSUIPC4,5 and 6. To check if it works in FSUIPC7, please try the UserInput examples in my ExampleCode solution on the website: (Please update my DLL to the latest version as these solutions tend to restore a previous version). http://fsuipc.paulhenty.com/#downloads If those examples do not work with FSUIPC7 then let me know and I'll speak with John to see where the problem is. Let me know if there are any exceptions thrown. If they do work then compare the example code with your code. When you test your code, make sure you're not ignoring any Exceptions with blank Catch() blocks. Any exceptions thrown by the DLL could point to what the problem is. Paul
kingm56 Posted February 26, 2022 Author Report Posted February 26, 2022 Hey Paul, I assumed it doesn't work because I tested with your FSUIPCExampleCode_CS 1.2.0 with .dll 3.2.17. Clicking on Listen for Joystick Button Presses, and clicking on Button 1, does not impact the counter at all.... there's no exception thrown. The Respond to Key Presses' class/methods work perfectly; so, it could have something to do with the device ID; I know windows changed this methodology in Win10. I tried to change the Joystick ID from 0 to 5...no joy. -Matt
Paul Henty Posted February 26, 2022 Report Posted February 26, 2022 Hi Matt, Some things to check: 1. Your joystick/button IDs should be the same a FSUIPC displays on it's "Buttons and Switches" tab when you press the joystick button. 2.The buttons presses are only detected when the Flight Sim window has focus. It won't work if FSUIPC7 or your application are in focus. 3. Can you please let me know the values of offsets 0x2910 and 0x290C running under FSUIPC7, but *without* using any of the User Input features: (Both are 4-byte ints) I would test everything here myself but I don't have MSFS. Those offsets should tell me if there is a problem with FSUIPC7. If none of this helps I can prepare a version of the DLL with debug logging that should pin the problem down. Thanks, Paul
kingm56 Posted February 26, 2022 Author Report Posted February 26, 2022 58 minutes ago, Paul Henty said: Hi Matt, Some things to check: 1. Your joystick/button IDs should be the same a FSUIPC displays on it's "Buttons and Switches" tab when you press the joystick button. 2.The buttons presses are only detected when the Flight Sim window has focus. It won't work if FSUIPC7 or your application are in focus. 3. Can you please let me know the values of offsets 0x2910 and 0x290C running under FSUIPC7, but *without* using any of the User Input features: (Both are 4-byte ints) I would test everything here myself but I don't have MSFS. Those offsets should tell me if there is a problem with FSUIPC7. If none of this helps I can prepare a version of the DLL with debug logging that should pin the problem down. Thanks, Paul Hey Paul 1. Joystick is registering as 0 2. Button is 1 3. Offsets are 0 and 56 Don't worry, my friend. I went a head and wrote my own class using SharpDX dll. Thank you as always though! -Matt 2
The Captain Posted May 22, 2022 Report Posted May 22, 2022 Hey Matt, Question from a beginner. Can you please shed some light on how you were able to resolve this in MSFS? My offsets are: 0x2910 is 0 and 0x290C is 56 Thank you in advance! -Amine
kingm56 Posted May 27, 2022 Author Report Posted May 27, 2022 Hey Amine, I ended up writing my own class to capture joystick events; I'm not sure why those offsets no longer work. John and Paul could possibly offer an explanation, as well as fix them going forward.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now