File diff r4548:6a33e364fba5 → r4549:76b9213799ac
settings.c
Show inline comments
 
@@ -747,49 +747,49 @@ static void ini_save_settings(IniFile *i
 
		/* If the setting is not saved to the configuration
 
		 * file, just continue with the next setting */
 
		if (!SlIsObjectCurrentlyValid(sld->version_from, sld->version_to)) continue;
 
		if (sld->conv & SLF_CONFIG_NO) continue;
 

	
 
		// XXX - wtf is this?? (group override?)
 
		s = strchr(sdb->name, '.');
 
		if (s != NULL) {
 
			group = ini_getgroup(ini, sdb->name, s - sdb->name);
 
			s++;
 
		} else {
 
			if (group_def == NULL) group_def = ini_getgroup(ini, grpname, -1);
 
			s = sdb->name;
 
			group = group_def;
 
		}
 

	
 
		item = ini_getitem(group, s, true);
 
		ptr = ini_get_variable(sld, object);
 

	
 
		if (item->value != NULL) {
 
			// check if the value is the same as the old value
 
			const void *p = string_to_val(sdb, item->value);
 

	
 
			/* The main type of a variable/setting is in bytes 8-15
 
			* The subtype (what kind of numbers do we have there) is in 0-7 */
 
			 * The subtype (what kind of numbers do we have there) is in 0-7 */
 
			switch (sdb->cmd) {
 
			case SDT_BOOLX:
 
			case SDT_NUMX:
 
			case SDT_ONEOFMANY:
 
			case SDT_MANYOFMANY:
 
				switch (GetVarMemType(sld->conv)) {
 
				case SLE_VAR_BL:
 
				case SLE_VAR_I8:
 
				case SLE_VAR_U8:
 
					if (*(byte*)ptr == (byte)(unsigned long)p) continue;
 
					break;
 
				case SLE_VAR_I16:
 
				case SLE_VAR_U16:
 
					if (*(uint16*)ptr == (uint16)(unsigned long)p) continue;
 
					break;
 
				case SLE_VAR_I32:
 
				case SLE_VAR_U32:
 
					if (*(uint32*)ptr == (uint32)(unsigned long)p) continue;
 
					break;
 
				default: NOT_REACHED();
 
				}
 
				break;
 
			default: break; /* Assume the other types are always changed */
 
			}