mgba-emu / mgba

mGBA Game Boy Advance Emulator
https://mgba.io/
Mozilla Public License 2.0
5.75k stars 794 forks source link

Screenshot counter isn't updating correctly with a separate directory as the path #1153

Open Miss-Inputs opened 6 years ago

Miss-Inputs commented 6 years ago

mGBA version: 0.7-5198-c5ff781e (revision c5ff781ed6cdf5d36b7e59748c1506709c5e2e5d) OS: Antergos Linux CPU/GPU: Intel i7-3720QM @ 2.6GHz, integrated Ivy Bridge graphics

If I have my screenshot folder set to a specific folder, as I like to do, instead of the same directory as the ROM, the screenshots don't increment correctly, in a way that's a bit hard to explain:

I open "Game A" (it does the same thing with any game I try, GB or GBA so I'm not being specific), and take a screenshot. This saves it to /screenshot/folder/Game A-0.jpg, as I would expect.

If I progress the game a bit and take the screenshot again, it should save the screenshot to /screenshot/folder/Game A-1.jpg, but it overwrites the earlier Game A-0.jpg instead.

If I open "Game B", and take screenshots there, it will still save to /screenshot/folder/Game B-0.jpg as expected. If I then open "Game A" again (or close mGBA and reopen it) it will save to /screenshot/folder/Game A-1.jpg this time as expected.

Everything works as expected when the screenshot path is set to "Same folder as the ROM".

The actual screenshot folder I use is /media/Stuff/Roms/GB and GBA Shared/Snaps/ and not /screenshot/folder in case that makes any difference.

Hopefully that all makes sense.

Miss-Inputs commented 6 years ago

Welp. I tried setting it to a folder that's not on a network drive, and the bug doesn't occur there. Having a slash at the end or not or having spaces in the name doesn't seem to matter.

endrift commented 6 years ago

What network filesystem type are you using? NFS? SMB/CIFS?

fancythedeveloper commented 6 years ago

Does the Windows and Wii versions of mGBA include network drive support?

endrift commented 6 years ago

The Windows version does, simply because Windows has native network drive support. The Wii version does not.

Miss-Inputs commented 6 years ago

I'm using SMB/CIFS v1 with _netdev,iocharset=utf8,x-systemd.automount,vers=1.0 as the mount options.

JMC47 commented 6 years ago

I know on Windows, it can't detect new changes to a network drive because it only checks every so often for performance reasons.