mirror of https://github.com/OpenRCT2/OpenRCT2.git
Merge branch 'atmaxinger-settings-screenshot-enum-extension'
This commit is contained in:
commit
d4d9f09904
10
src/config.c
10
src/config.c
|
@ -223,7 +223,7 @@ static void config_create_default(char *path)
|
||||||
fp = fopen(path, "w");
|
fp = fopen(path, "w");
|
||||||
fprintf(fp, "[general]\n");
|
fprintf(fp, "[general]\n");
|
||||||
fprintf(fp, "game_path = %s\n", gConfig.game_path);
|
fprintf(fp, "game_path = %s\n", gConfig.game_path);
|
||||||
fprintf(fp, "screenshot_format = 1\n");
|
fprintf(fp, "screenshot_format = PNG\n");
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -245,10 +245,12 @@ static void config_parse_settings(FILE *fp)
|
||||||
if (strcmp(setting, "game_path") == 0){
|
if (strcmp(setting, "game_path") == 0){
|
||||||
strcpy(gConfig.game_path, value); // TODO: change to copy correct amount of bytes
|
strcpy(gConfig.game_path, value); // TODO: change to copy correct amount of bytes
|
||||||
} else if(strcmp(setting, "screenshot_format") == 0) {
|
} else if(strcmp(setting, "screenshot_format") == 0) {
|
||||||
if (strcmp(value, "1") == 0) {
|
if (strcmp(value, "png") == 0 || strcmp(value, "PNG") == 0) {
|
||||||
gConfig.screenshot_format = 1;
|
gConfig.screenshot_format = SCREENSHOT_FORMAT_PNG;
|
||||||
|
} else if (strcmp(value, "1") == 0) { // Maybe remove that? WARNING: Breaks existing config files
|
||||||
|
gConfig.screenshot_format = SCREENSHOT_FORMAT_PNG;
|
||||||
} else {
|
} else {
|
||||||
gConfig.screenshot_format = 0;
|
gConfig.screenshot_format = SCREENSHOT_FORMAT_BMP;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,6 +66,11 @@ enum {
|
||||||
SHORTCUT_COUNT
|
SHORTCUT_COUNT
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum {
|
||||||
|
SCREENSHOT_FORMAT_BMP,
|
||||||
|
SCREENSHOT_FORMAT_PNG
|
||||||
|
};
|
||||||
|
|
||||||
extern uint16 gShortcutKeys[SHORTCUT_COUNT];
|
extern uint16 gShortcutKeys[SHORTCUT_COUNT];
|
||||||
|
|
||||||
void config_reset_shortcut_keys();
|
void config_reset_shortcut_keys();
|
||||||
|
|
|
@ -29,10 +29,6 @@
|
||||||
#include "strings.h"
|
#include "strings.h"
|
||||||
#include "window_error.h"
|
#include "window_error.h"
|
||||||
|
|
||||||
enum {
|
|
||||||
SCREENSHOT_FORMAT_BMP,
|
|
||||||
SCREENSHOT_FORMAT_PNG
|
|
||||||
};
|
|
||||||
|
|
||||||
static int screenshot_dump_bmp();
|
static int screenshot_dump_bmp();
|
||||||
static int screenshot_dump_png();
|
static int screenshot_dump_png();
|
||||||
|
|
Loading…
Reference in New Issue