summaryrefslogtreecommitdiff
path: root/plugins/dumb/dumb-kode54/studio/src/options.c
blob: e387db1348ca3b36b2a10bf260199fa1ca17efca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include <stdlib.h>
#include <allegro.h>
#include "options.h"



void load_options(void)
{
	{
		char ef[256], cf[256];

		get_executable_name(ef, 256);
		replace_filename(cf, ef, "studio.ini", 256);

		set_config_file(cf);
	}

	opt.gfx_w = get_config_int("options", "gfx_w", DEF_GFX_W);
	opt.gfx_h = get_config_int("options", "gfx_h", DEF_GFX_H);

	atexit(&save_options);
}



void save_options(void)
{
	set_config_int("options", "gfx_w", opt.gfx_w);
	set_config_int("options", "gfx_h", opt.gfx_h);
}