1
0
Fork 0

Nicer line ends on Windows. Might break old mapper files with 0.74, which might actually be good.

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3605
This commit is contained in:
Peter Veenstra 2010-05-10 18:45:49 +00:00
parent e74f928982
commit 175b1c2b92

View file

@ -2117,7 +2117,7 @@ void MAPPER_AddHandler(MAPPER_Handler * handler,MapKeys key,Bitu mods,char const
}
static void MAPPER_SaveBinds(void) {
FILE * savefile=fopen(mapper.filename.c_str(),"wb+");
FILE * savefile=fopen(mapper.filename.c_str(),"wt+");
if (!savefile) {
LOG_MSG("Can't open %s for saving the mappings",mapper.filename.c_str());
return;
@ -2139,7 +2139,7 @@ static void MAPPER_SaveBinds(void) {
}
static bool MAPPER_LoadBinds(void) {
FILE * loadfile=fopen(mapper.filename.c_str(),"rb");
FILE * loadfile=fopen(mapper.filename.c_str(),"rt");
if (!loadfile) return false;
char linein[512];
while (fgets(linein,512,loadfile)) {