mirror of
https://github.com/opentx/opentx.git
synced 2025-07-26 01:35:21 +03:00
Warning removed
This commit is contained in:
parent
f77e6370cf
commit
b0bdaf6b65
1 changed files with 16 additions and 11 deletions
|
@ -457,22 +457,27 @@ int InputsPanel::gm_moveExpo(int idx, bool dir) //true=inc=down false=dec=up
|
||||||
if (!dir && tdx<0 && src.chn>0) {
|
if (!dir && tdx<0 && src.chn>0) {
|
||||||
src.chn--;
|
src.chn--;
|
||||||
return idx;
|
return idx;
|
||||||
} else if (!dir && tdx<0) {
|
}
|
||||||
|
else if (!dir && tdx<0) {
|
||||||
return idx;
|
return idx;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(memcmp(&src,&temp,sizeof(ExpoData))==0) return idx;
|
if (memcmp(&src, &temp, sizeof(ExpoData)) == 0) {
|
||||||
bool tgtempty=(memcmp(&tgt,&temp,sizeof(ExpoData))==0 ? 1:0);
|
return idx;
|
||||||
if(tgt.chn!=src.chn || tgtempty) {
|
|
||||||
if ((dir) && (src.chn<(inputsCount-1))) src.chn++;
|
|
||||||
if ((!dir) && (src.chn>0)) src.chn--;
|
|
||||||
return idx;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//flip between idx and tgt
|
bool tgtempty = (memcmp(&tgt, &temp, sizeof(ExpoData)) == 0);
|
||||||
memcpy(&temp,&src,sizeof(ExpoData));
|
|
||||||
memcpy(&src,&tgt,sizeof(ExpoData));
|
if (tgt.chn!=src.chn || tgtempty) {
|
||||||
memcpy(&tgt,&temp,sizeof(ExpoData));
|
if ((dir) && (src.chn<unsigned(inputsCount-1))) src.chn++;
|
||||||
|
if ((!dir) && (src.chn>0)) src.chn--;
|
||||||
|
return idx;
|
||||||
|
}
|
||||||
|
|
||||||
|
// flip between idx and tgt
|
||||||
|
memcpy(&temp, &src, sizeof(ExpoData));
|
||||||
|
memcpy(&src, &tgt, sizeof(ExpoData));
|
||||||
|
memcpy(&tgt, &temp, sizeof(ExpoData));
|
||||||
return tdx;
|
return tdx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue