Momentary switches should not be bold
Memory overwrite in function switches (ersky9x)
This commit is contained in:
+1
-1
@@ -2243,7 +2243,7 @@ void menuProcFunctionSwitches(uint8_t event)
|
|||||||
uint8_t active = (attr && (s_editMode>0 || p1valdiff));
|
uint8_t active = (attr && (s_editMode>0 || p1valdiff));
|
||||||
switch (j) {
|
switch (j) {
|
||||||
case 0:
|
case 0:
|
||||||
putsSwitches(3, y, sd->swtch, attr | ((getSwitch(sd->swtch, 0) && (sd->func >= 16 || (FSW_PARAM(sd) & 1))) ? BOLD : 0));
|
putsSwitches(3, y, sd->swtch, attr | ((abs(sd->swtch) <= MAX_SWITCH && getSwitch(sd->swtch, 0) && (sd->func >= 16 || (FSW_PARAM(sd) & 1))) ? BOLD : 0));
|
||||||
if (active) {
|
if (active) {
|
||||||
CHECK_INCDEC_MODELSWITCH( event, sd->swtch, SWITCH_OFF-MAX_SWITCH, SWITCH_ON+MAX_SWITCH);
|
CHECK_INCDEC_MODELSWITCH( event, sd->swtch, SWITCH_OFF-MAX_SWITCH, SWITCH_ON+MAX_SWITCH);
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-2
@@ -1701,8 +1701,9 @@ void evalFunctions()
|
|||||||
else if (sd->func == FUNC_PLAY_TRACK) {
|
else if (sd->func == FUNC_PLAY_TRACK) {
|
||||||
if (!audioBusy()) {
|
if (!audioBusy()) {
|
||||||
char lfn[32] = SOUNDS_PATH "/";
|
char lfn[32] = SOUNDS_PATH "/";
|
||||||
strcat(lfn, sd->param);
|
strncpy(lfn+sizeof(SOUNDS_PATH), sd->param, sizeof(sd->param));
|
||||||
strcat(lfn, SOUNDS_EXT);
|
lfn[sizeof(SOUNDS_PATH)+sizeof(sd->param)] = '\0';
|
||||||
|
strcat(lfn+sizeof(SOUNDS_PATH), SOUNDS_EXT);
|
||||||
playFile(lfn);
|
playFile(lfn);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1727,6 +1728,7 @@ void evalFunctions()
|
|||||||
|
|
||||||
#if defined(DEBUG)
|
#if defined(DEBUG)
|
||||||
if (sd->func == FUNC_TEST) {
|
if (sd->func == FUNC_TEST) {
|
||||||
|
printf("%d ", sd->swtch);
|
||||||
testFunc();
|
testFunc();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user