include CWD when saving filename

This commit is contained in:
Kartik K. Agaram 2022-07-01 12:26:58 -07:00
parent 914d9c6f98
commit f311013200
1 changed files with 3 additions and 1 deletions

View File

@ -321,7 +321,9 @@ function love.quit()
local settings = {
x=x, y=y, displayindex=displayindex,
width=App.screen.width, height=App.screen.height,
font_height=Font_height, filename=Filename, screen_top=Screen_top1, cursor=Cursor1}
font_height=Font_height,
filename=love.filesystem.getWorkingDirectory()..'/'..Filename, -- '/' should work even on Windows
screen_top=Screen_top1, cursor=Cursor1}
love.filesystem.write('config', json.encode(settings))
end