Changeset - r47:fa8c334362cf
[Not reviewed]
master
0 1 0
dominik - 20 years ago 2004-08-13 22:33:48
dominik@openttd.org
(svn r48) Fix: Possible to disable some patches (e.g. default service interval) again by setting them to 0
1 file changed with 3 insertions and 1 deletions:
0 comments (0 inline, 0 general)
settings_gui.c
Show inline comments
 
@@ -816,6 +816,8 @@ static void WritePE(const PatchEntry *pe
 

	
 
	case PE_UINT16: if ((uint16)val > (uint16)pe->max) 
 
									*(uint16*)pe->variable = (uint16)pe->max;
 
								else if ( (pe->flags & PF_0ISDIS) && ((int16)val < (int16)pe->min) )
 
									*(int16*)pe->variable = 0;
 
								else if ((uint16)val < (uint16)pe->min)
 
									*(uint16*)pe->variable = (uint16)pe->min;
 
								else
 
@@ -940,10 +942,10 @@ static void PatchesSelectionWndProc(Wind
 
							val += pe->step;
 
						if (val > pe->max) val = pe->max;
 
					} else {
 
						// decrease
 
						if (val <= pe->min && pe->flags & PF_0ISDIS) {
 
							val = 0;
 
						} else {
 
							// decrease
 
							val -= pe->step;
 
							if (val < pe->min) val = pe->min;
 
						}
0 comments (0 inline, 0 general)