MCPcopy Create free account
hub / github.com/360Controller/360Controller / SetProperty

Method SetProperty

XBOBTFF/FFDriver.cpp:196–216  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

194}
195
196HRESULT FeedbackXBOBT::SetProperty(FFProperty property, void *value)
197{
198 if(property != FFPROP_FFGAIN) {
199 return FFERR_UNSUPPORTED;
200 }
201
202 UInt32 NewGain = *((UInt32*)value);
203 __block HRESULT Result = FF_OK;
204
205 dispatch_sync(Queue, ^{
206 if (1 <= NewGain && NewGain <= 10000)
207 {
208 Gain = NewGain;
209 } else {
210 Gain = max((UInt32)1, min(NewGain, (UInt32)10000));
211 Result = FF_TRUNCATED;
212 }
213 });
214
215 return Result;
216}
217
218HRESULT FeedbackXBOBT::StartEffect(FFEffectDownloadID EffectHandle, FFEffectStartFlag Mode, UInt32 Count)
219{

Callers 1

sSetPropertyMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected