Merge branch 'bug_fixes' of https://github.com/duncanspumpkin/OpenRCT2 into duncanspumpkin-bug_fixes

This commit is contained in:
IntelOrca 2014-05-23 12:16:26 +01:00
commit 39581f265a
3 changed files with 11 additions and 10 deletions

View File

@ -193,4 +193,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>

View File

@ -282,8 +282,8 @@ static void config_create_default(char *path)
fprintf(fp, "play_intro = false\n");
fprintf(fp, "edge_scrolling = true\n");
fprintf(fp, "currency = GBP\n");
fprintf(fp, "use_imperial = false\n");
fprintf(fp, "use_farenheit = false\n");
fprintf(fp, "measurement_format = imperial\n");
fprintf(fp, "temperature_format = fahrenheit\n");
fprintf(fp, "[sound]\n");
fprintf(fp, "sound_quality = high\n");
fprintf(fp, "forced_software_buffering = false\n");
@ -359,7 +359,7 @@ static void config_general(char *setting, char *value){
strcpy(gGeneral_config.game_path, value);
}
else if (strcmp(setting, "screenshot_format") == 0) {
if (strcmp(value, "png") == 0 || strcmp(value, "PNG") == 0) {
if (strcmp(value, "png") == 0) {
gGeneral_config.screenshot_format = SCREENSHOT_FORMAT_PNG;
}
else if (strcmp(value, "1") == 0) { //TODO: REMOVE LINE AT LATER DATE WHEN EVERYONE HAS NEW CONFIG FORMAT
@ -380,16 +380,16 @@ static void config_general(char *setting, char *value){
gGeneral_config.edge_scrolling = 0;
}
}
else if (strcmp(setting, "use_imperial") == 0){
if (strcmp(value, "true") == 0){
else if (strcmp(setting, "measurement_format") == 0){
if (strcmp(value, "imperial") == 0){
gGeneral_config.measurement_format = MEASUREMENT_FORMAT_IMPERIAL;
}
else{
gGeneral_config.measurement_format = MEASUREMENT_FORMAT_METRIC;
}
}
else if (strcmp(setting, "use_farenheit") == 0){
if (strcmp(value, "true") == 0){
else if (strcmp(setting, "temperature_format") == 0){
if (strcmp(value, "fahrenheit") == 0){
gGeneral_config.temperature_format = TEMPERATURE_FORMAT_F;
}
else{
@ -528,7 +528,7 @@ static int config_parse_value(FILE *fp, char *value)
fseek(fp, start, SEEK_SET);
c = fgetc(fp);
while (c != EOF && c != '\n') {
value[pos] = (char)c;
value[pos] = (char)tolower(c);
c = fgetc(fp);
pos++;
}

View File

@ -629,7 +629,6 @@ static void input_leftmousedown(int x, int y, rct_window *w, int widgetIndex)
if (w != NULL) {
windowClass = w->classification;
windowNumber = w->number;
widget = &w->widgets[widgetIndex];
}
window_close_by_id(WC_ERROR, 0);
@ -643,6 +642,8 @@ static void input_leftmousedown(int x, int y, rct_window *w, int widgetIndex)
if (widgetIndex == -1)
return;
widget = &w->widgets[widgetIndex];
switch (widget->type) {
case WWT_FRAME:
case WWT_RESIZE: