--- Daodan/src/Daodan_Config.c 2015/03/23 23:29:19 1017 +++ Daodan/src/Daodan_Config.c 2021/10/24 02:50:48 1163 @@ -251,11 +251,21 @@ ConfigSection_t config[] = { C_BOOL, {.intBoolVal = true}, {.intBoolVal = true} }, + { "daodaninput", + "New input system that reports input on every frame, supports Raw Input for mice.", + C_BOOL, + {.intBoolVal = true}, + {.intBoolVal = true} }, { "directinput", "Enforces the usage of DirectInput on every system. Should be off for Linux/Wine.", C_BOOL, {.intBoolVal = true}, {.intBoolVal = true} }, + { "mousesensitivity", + "Multiplier for Oni's mouse sensitivity. 1.0 is Oni's default.", + C_FLOAT, + {.floatVal = 1.0f}, + {.floatVal = 1.0f} }, { "disablecmdline", "Disables Oni's existing command line parser as Daodan has its own.", C_BOOL, @@ -299,6 +309,9 @@ void DDrConfig_Print() break; case C_CMD: break; + case C_FLOAT: + STARTUPMESSAGE("Option %s.%s = %f (def %f)", config[s].name, co->name, co->value.floatVal, co->defaultValue.floatVal); + break; default: STARTUPMESSAGE("Option %s.%s = %d (def %d)", config[s].name, co->name, co->value.intBoolVal, co->defaultValue.intBoolVal); } @@ -360,6 +373,8 @@ const char* DDrConfig_GetOptionTypeName( switch (type) { case C_INT: return "Int"; + case C_FLOAT: + return "Float"; case C_BOOL: return "Bool"; case C_STRING: @@ -390,6 +405,10 @@ const char* DDrConfig_GetOptionValueStri return (boolV ? "true" : "false"); case C_CMD: return 0; + case C_FLOAT: + val = malloc(50); + sprintf(val, "%f", optVal->floatVal); + return val; default: val = malloc(20); sprintf(val, "%d", boolV); @@ -410,6 +429,8 @@ char DDrConfig_NonDefaultOptionValue(Con return 0; case C_INT: return opt->defaultValue.intBoolVal != opt->value.intBoolVal; + case C_FLOAT: + return opt->defaultValue.floatVal != opt->value.floatVal; } return 0; } @@ -526,6 +547,9 @@ void DDrIniCallback(const char* section, case C_INT: co->value.intBoolVal = strtol(value, NULL, 0); break; + case C_FLOAT: + co->value.floatVal = strtof(value, NULL); + break; case C_BOOL: co->value.intBoolVal = !_stricmp(value, "true"); break;