BVE WorldWide
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Build OpenBVE

2 posters

Go down

Build OpenBVE Empty Build OpenBVE

Post by edgreenberg Fri May 26, 2017 7:35 pm

I was thinking of taking a whack at RailDriver support by reducing the number of supported buttons below 32. For instance, I could just mask off the bottom row.

Question:  Can I build OpenBVE on Linux with the mono c# compiler? 

If not, can I build it on Windows 7 using free tools, or do I have to buy a compiler?

I do C, Python, a bit of Java, etc., so C# doesn't seem to be all that different. 

Thanks, Ed

edgreenberg

Posts : 27
Join date : 2017-04-13

Back to top Go down

Build OpenBVE Empty Re: Build OpenBVE

Post by leezer3 Sat May 27, 2017 9:50 am

It'll absolutely build with Mono (SharpDevelop or Xamarin studio both tested)

There is also a makefile, which uses the command-line compiler if that floats your boat Smile

The 32-button limit:
This is internal to the current build of openTK, not openBVE itself.
To remove it (Probably):

  • Build openTK from scratch ( https://github.com/opentk/opentk ) from the current development version.
  • Change the reference within openBVE to the new openTK DLL.
  • The signature of openTK's state has changed marginally to use an int, rather than the custom JoystickButton enum. This wants changing in openBVE; IIRC this is the only place it's called: https://github.com/leezer3/OpenBVE/blob/a45da0c94f986e757fa3bd8d6a5db4c54ba02225/source/OpenBVE/OldCode/MainLoop.cs#L264


This hasn't been implemented into the main builds, as the changes within openTK are breaking if the new DLL is copied into an older installation, and because I have no physical device with 32+ buttons to test this, just a Windows based virtual joystick emulator.
(I actually wrote the openTK patch, but I've got *no* feedback from anyone with a physical device, hence why I don't want to just chuck it into the mix. Axis are also on the list of things to increase in the same way, but again need someone with a real device to test before doing so....)

If you don't manage to get this working, just let me know, and I'll knock up a quick experimental branch, & if this tests out OK, I'll patch the axis support in openTK the same way (IIRC they support a max of 16 axis ATM) and implement both into the main branch builds.

Cheers

leezer3

Posts : 1978
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Back to top Go down

Build OpenBVE Empty Re: Build OpenBVE

Post by leezer3 Sat May 27, 2017 11:34 am

OK, have made the changes in this branch here:
https://github.com/leezer3/OpenBVE/commits/MaxButtons

Pre-built experimental version:
https://vps.bvecornwall.co.uk/OpenBVE/Experimental/JoystickButtonsTest.zip

leezer3

Posts : 1978
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Back to top Go down

Build OpenBVE Empty Results of your Joystick Test BUild

Post by edgreenberg Sun Jun 04, 2017 8:21 pm

I'm sorry it took a long time to get this done. It's been a busy week.

I loaded up the JoystickBUttonTest build on Windows 7 and started it with the RailDriver plugged in. 

I did not get the warning message, but neither did I get a really good result  The screenshot at https://imagebin.ca/v/3OqYMDCNLOHo shows the controls screen. I see many buttons, but none of them light up when I press buttons on the RD.  I don't see any sliders at all.

Thanks for trying. If you have any other tests I can do, please let me know.

FYI, the rail driver states that it is a HID Compliant Consumer Control Device, and a USB Input Device.

Thanks,
Ed

edgreenberg

Posts : 27
Join date : 2017-04-13

Back to top Go down

Build OpenBVE Empty Re: Build OpenBVE

Post by leezer3 Sun Jun 04, 2017 9:33 pm

No matter Smile
That's a little better, but something is obviously not being interpreted right.

Have you tried enabling joystick & using the joystick grab box with an axis / button?
Not sure whether you're pressing is just stuck off-screen somewhere (I suspect if you enlarge the window, the axis may appear at the end, might have to tweak that....)

Best solution I can offer (just at the minute) is to try using PIE's MacroWorks. As the sim is now happy with it plugged in, IIRC this allows it to emulate a keyboard. Not really a solution per-se, but might get things working....

leezer3

Posts : 1978
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Back to top Go down

Build OpenBVE Empty Re: Build OpenBVE

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum