Skip to content

Embedded resources for reduced dependency management#4

Closed
DavidRieman wants to merge 8 commits into
mogzol:masterfrom
DavidRieman:master
Closed

Embedded resources for reduced dependency management#4
DavidRieman wants to merge 8 commits into
mogzol:masterfrom
DavidRieman:master

Conversation

@DavidRieman

@DavidRieman DavidRieman commented Dec 4, 2017

Copy link
Copy Markdown
Contributor

Best to view in github with ?w=1 since I let VS fix our mixed tabs/spaces. (I had been avoiding letting commits include the VS C# standard of spaces since the code was tabs-only prior, but I see you've used spaces now.)

* Made an Uninstall which works similar to Install, with the improved
  error handling. Also makes way for silent uninstall mode, if wanted.
* Updated Install/Uninstall to use a temporary directory to extract
  the driver from embedded resources. This allows for the installer
  itself to be easy to embed/use automatically in apps needing ScpBus.
* Resolved conflict: ScpDriverInstaller/DriverInstaller.cs
* Allowed VS to fix spaces to fix mixing.
…ackage.

* Simplifies and abstracts "Use DIFx to install a driver" scenarios for reuse,
  via a simple 'using' syntax for DIFx.
* Eliminates the need to directly manage multiple dependencies for bitness; the
  correct version of DIFxAPI is extracted and used at run-time.
Also, other ScpDriverInterface cleanup and improvements:
* Removed unused references.
* Reduced minimum framework version needed to use ScpDriverInterface.
* Fixed a casting warning.
* Some improved error handling.
* Completes stand-alone single-file installer ScpDriverInstaller.exe!
* Fixes an issue where Win32Exception err code casting issues caused us to fail to identify already-uninstalled case.
@DavidRieman

Copy link
Copy Markdown
Contributor Author

I've achieved a 100% stand-alone ScpDriverInstaller.exe now -- one could distribute just that file and it will install/uninstall the driver correctly.

@DavidRieman

Copy link
Copy Markdown
Contributor Author

Bump?

@CircuitLord

Copy link
Copy Markdown

I've achieved a 100% stand-alone ScpDriverInstaller.exe now -- one could distribute just that file and it will install/uninstall the driver correctly.

This will work great for the program I developed/am developing. Creator's Camera.

In short it allows you to make cinematics in any game, by "scripting" camera paths, or flying around in-game to define camera paths for the program to playback smoothly.

And now a question:

Unfortunately this project seems to have been abandoned by the original developer, and I'm having a issue with the project, having to do with setting virtual controller values quickly and then waiting for x ms and setting them back to 0 (kind of hard to explain why). It gets pretty inaccurate as it does this. I've noticed from my testing that it seems to set one axis on a controller, then there's quite a bit of delay before the next axis that is included in the controller report is updated as well.

This might also just be a limitation with C# in general, but it would be awesome if this could be fixed.

I have no idea if you know anything about how this might be fixed, but I've been trying to find a solution for weeks now. I wasn't really sure what the best way to contact you was, so I figured I'd ask here. :)

@DavidRieman

DavidRieman commented Nov 3, 2018

Copy link
Copy Markdown
Contributor Author

It sounds to me like you're issuing Report after each value rather than updating multiple values and then issuing Report? For example, if you want to set multiple states at the same time with no lag between them, based on this project's readme, I think that would look like:

controller.LeftTrigger = 255;
controller.RightTrigger = 128;
controller.RightStickX = 32767;
controller.RightStickY = 32767;
scpBus.Report(2, controller.GetReport());

That said, I made a wrapper that I think is even easier to use than ScpBus directly, called SimWinGamepad: https://github.com/DavidRieman/SimWinInput#simulate-gamepad - that project
builds on ScpDriverInterface by embedding the installer in the DLL, automatically extracting and running it when the running system doesn't have the ScpBus driver installed yet. So it is super user-friendly.

Also, for a real-time input translation example using that: https://github.com/fqlx/XboxKeyboardMouse

@CircuitLord

Copy link
Copy Markdown

Yeah, I've been doing it like that, I set all of them then call a function that does the scpBus.Report(). I'll give that SimWinInput project a go though, it looks pretty nice :)

@CircuitLord

CircuitLord commented Nov 21, 2018

Copy link
Copy Markdown

So, I've fixed that problem I was having a few weeks ago.

I randomly started running into many issues with the driver itself, with both your all-in-one installer and the original found here. The all-in-one works great btw :)

Occasionally people, myself included, will get this or a similar error while trying to install it.
annotation 2018-11-21 141030

The temporary fix I've found seems to be to put windows into Test mode to install it. (which obviously isn't a great fix for the average consumer).

I've seen another person with a similar error here (one I've also gotten before):
fqlx/XboxKeyboardMouse#130

Any idea what might be causing the error? I've researched it myself a bit but there doesn't seem to be too much info on it from what I could tell.

@DavidRieman DavidRieman deleted the branch mogzol:master March 11, 2021 09:14
@DavidRieman DavidRieman deleted the master branch March 11, 2021 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants