rxi / lovedos

A framework for making 2D DOS games in Lua
MIT License
677 stars 47 forks source link

SAVE directory is initiated on current working directory instead game directory #15

Open gphg opened 3 years ago

gphg commented 3 years ago

Tested on DOSBox and DOSBox-X.

Assuming MYGAME.EXE is on C:\SOME\PATH\TO\THEGAME\ and the current directory is on C:\HOME\.

Run the game by either:

..\PATH\TO\THEGAME\MYGAME

or

..\PATH\TO\THEGAME\MYGAME

Then it creates SAVE directory on C:\HOME\ instead C:\SOME\PATH\TO\THEGAME\.

gphg commented 3 years ago

I suggest the path to be dirname from either the first or second arguments on love.argv.

Second or first argument. Because the first one can be either the lovedos or packed game binary.