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:
parent
e74f928982
commit
175b1c2b92
1 changed files with 2 additions and 2 deletions
|
@ -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)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue