Skip to content

Commit

Permalink
Change configuration directory to ~/.snes9x4d-ng
Browse files Browse the repository at this point in the history
  • Loading branch information
m45t3r committed Jun 3, 2020
1 parent 874d813 commit 0c86522
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sdlmenu/sdlmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,15 +156,15 @@ const char *S9xGetCfgName()
char ext[_MAX_EXT + 1];

_splitpath(rom_filename, drive, dir, fname, ext);
sprintf(filename, "%s/.snes9x4d/%s.cfg", GetHomeDirectory(), fname);
sprintf(filename, "%s/" CFG_DIRECTORY "/%s.cfg", GetHomeDirectory(), fname);

return (filename);
}

int is_home_created()
{
char home[PATH_MAX + 1];
sprintf(home, "%s/%s", GetHomeDirectory(), ".snes9x4d");
sprintf(home, "%s/%s", GetHomeDirectory(), CFG_DIRECTORY);
mkdir(home, 0777);
if (!errno)
return FALSE;
Expand Down
2 changes: 2 additions & 0 deletions src/sdlmenu/sdlmain.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#ifndef __MAIN_h_
#define __MAIN_h_

#define CFG_DIRECTORY ".snes9x4d-ng"

extern uint16 sfc_key[256];
extern short SaveSlotNum;
extern bool8_32 Scale;
Expand Down

0 comments on commit 0c86522

Please sign in to comment.