AndersMalmgren / FreePIE

Programmable Input Emulator
650 stars 144 forks source link

Allow WindowPlugin polling interval to be changed #100

Closed Xuerian closed 7 years ago

AndersMalmgren commented 7 years ago

Hi, I think pollingInterval is a better name plus please make it a property on the plugin, try to avoid public none property members

Xuerian commented 7 years ago

Uh, sure. What's a good plugin to reference? New to C# and the project.

AndersMalmgren commented 7 years ago

https://github.com/AndersMalmgren/FreePIE/blob/master/FreePIE.Core.Plugins/OculusPlugin.cs#L57

You need a public setter though

Xuerian commented 7 years ago

@AndersMalmgren Sorry about that ping. I stared at it some more.

Is this what you meant?

AndersMalmgren commented 7 years ago

Yepp, but it should be pascal case :D We use camelCase on the script globals becasue camelCase is Python standard, on the internal C# code we sue the standard pascal case on properties

AndersMalmgren commented 7 years ago

yuo could have kept it as a property on the script global though

Xuerian commented 7 years ago

This is what you mean?

AndersMalmgren commented 7 years ago

That s it :) can I ask why you want it, is it to go slower or faster?

Xuerian commented 7 years ago

I don't need it very often, it seemed like an easy way to save a little bit of CPU time. (I figured if it's throttled to 100ms by default then it has to be at least comparatively costly)

zelmon64 commented 7 years ago

@Xuerian this has been merged, thank you. I also added the ability to return the polling interval in order to confirm it's value.