AZO234 / NP2kai

Neko Project II kai
http://domisan.sakura.ne.jp/article/np2kai/np2kai.html
MIT License
255 stars 61 forks source link

There's a np2.cfg file in my home dir #11

Open sergiobenrocha2 opened 6 years ago

sergiobenrocha2 commented 6 years ago

There's a np2.cfg file in my home dir, every time I open this core it creates this file at /home/my_user/

It may be at System/BIOS directory I guess (RETRO_ENVIRONMENT_GET_SYSTEM_DIRECTORY)?

AZO234 commented 6 years ago

I fixed cfg file creation at 'current directory'. It can be created at System/BIOS directory, so you said.

File creation was operating faster than getting System directory.

Thanks to your report!

2017-11-25 13:06 GMT+09:00 sergio-br2 notifications@github.com:

There's a np2.cfg file in my home dir, every time I open this core it creates this file at /home/my_user/

It may be at System/BIOS directory I guess (RETRO_ENVIRONMENT_GETSYSTEM DIRECTORY)?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/AZO234/NP2kai/issues/11, or mute the thread https://github.com/notifications/unsubscribe-auth/AE5BtdPmZvQ0YlSX6855IAtrWoxIY_BLks5s55JHgaJpZM4QqTKK .

tokumeiwokiboushimasu commented 6 years ago

I think that this fix is not UNIX standard. I suggest that the config file locates in ~/.np2/, ~/.config/np2/, or somewhere like that. It's better that one can specify the config file by command parameter like

$ np2 --config-file ~/.np2/np2.cfg

With this function, one can install the excutable binary to /usr/local/bin/. One can write

alias np2='/usr/local/bin/np2 --config-file ~/.np2/np2.cfg'

in ~/.basrc in order to omit the specification every time.

sergiobenrocha2 commented 6 years ago

Saving cfg files in System/BIOS directory is the standard in RetroArch

tokumeiwokiboushimasu commented 6 years ago

I don't know much about RetroArch, but System/CONFIG or something like that is standard, isn't it? I think in most settings the two (BIOS and CONFIG) are the same directory. In any case, at least in the case of the SDL version, like the X11 version in which the config file is ~/.np2/np2rc, the config file should be placed in ~/.np2/, ~/.config/np2/ or somewhere like that. BTW, why is the name of the config file "np2.cfg", while that of the X11 version is "np2rc"?

AZO234 commented 6 years ago

I changed config/BIOS files location of SDL2 and X11 NP2kai to ~./config. SDL2 : ~./config/np2kai X11 : ~./config/xnp2kai

Regard.