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

Method SetProperty

Feedback360/Feedback360.cpp:179–199  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

177}
178
179HRESULT Feedback360::SetProperty(FFProperty property, void *value)
180{
181 if(property != FFPROP_FFGAIN) {
182 return FFERR_UNSUPPORTED;
183 }
184
185 UInt32 NewGain = *((UInt32*)value);
186 __block HRESULT Result = FF_OK;
187
188 dispatch_sync(Queue, ^{
189 if (1 <= NewGain && NewGain <= 10000)
190 {
191 Gain = NewGain;
192 } else {
193 Gain = max((UInt32)1, min(NewGain, (UInt32)10000));
194 Result = FF_TRUNCATED;
195 }
196 });
197
198 return Result;
199}
200
201HRESULT Feedback360::StartEffect(FFEffectDownloadID EffectHandle, FFEffectStartFlag Mode, UInt32 Count)
202{

Callers 1

sSetPropertyMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected