Bug: Screenshots do not save to proper folder
Moderator: ZSNES Mods
Bug: Screenshots do not save to proper folder
ZSNES WIP July 10, Win Version
My screenshots (both png and bmp) save to the folder for SAVES instead of SCREENSHOTS. I have saves set to save to .\saves and screenshots to save to .\screens but the images go to .\saves instead.
Using Windows XP Home Edition SP2.
My screenshots (both png and bmp) save to the folder for SAVES instead of SCREENSHOTS. I have saves set to save to .\saves and screenshots to save to .\screens but the images go to .\saves instead.
Using Windows XP Home Edition SP2.
To truly own, you must own at all games.
-
- ZSNES Developer
- Posts: 3904
- Joined: Tue Jul 27, 2004 10:54 pm
- Location: Solar powered park bench
- Contact:
I'll have a look, till then, can anyone else replicate?
Also mention with methods you used to save screenshots.
Also mention with methods you used to save screenshots.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
_____________
Insane Coding
Re: Bug: Screenshots do not save to proper folder
Does the .\screens folder actually exist yet? As far as I can tell, this folder must first exist; ZSNES will not create it automatically. So if the folder doesn't exist, the snapshot will go into the save folder.rlbond wrote:I have saves set to save to .\saves and screenshots to save to .\screens
It works fine for me.
I FIGURED IT OUT!!
Nach, when using relative paths, ZSNES does not change back to its directory before changing directories.
Here's what I did:
I made a folder inside my \saves folder called \screens. Then, I took a screenshot, and VIOLA!! The screenshot appeared in \saves\screens; I.E. it followed the following logic:
1. Load the rom.
2. Change directories to read sram (or zst files, or whatever), basically the DOS command "cd .\saves", changing the directory to c:\emu\snes\saves
(Then I saved a screenshot)
3. WITHOUT changing back to c:\emu\snes, it once again changes directories using something akin to "cd .\screens", so now it is in c:\emu\snes\saves\screens (instead of just \screens). Since i had no saves\screens folder, it just saved the screenshots in the saves folder.
That's why it couldn't be replicated... you needed to have the relative paths set, and not absolute ones.
Hope this helps!
Nach, when using relative paths, ZSNES does not change back to its directory before changing directories.
Here's what I did:
I made a folder inside my \saves folder called \screens. Then, I took a screenshot, and VIOLA!! The screenshot appeared in \saves\screens; I.E. it followed the following logic:
1. Load the rom.
2. Change directories to read sram (or zst files, or whatever), basically the DOS command "cd .\saves", changing the directory to c:\emu\snes\saves
(Then I saved a screenshot)
3. WITHOUT changing back to c:\emu\snes, it once again changes directories using something akin to "cd .\screens", so now it is in c:\emu\snes\saves\screens (instead of just \screens). Since i had no saves\screens folder, it just saved the screenshots in the saves folder.
That's why it couldn't be replicated... you needed to have the relative paths set, and not absolute ones.
Hope this helps!
Last edited by rlbond on Wed Jul 13, 2005 6:06 am, edited 4 times in total.
To truly own, you must own at all games.
-
- ZSNES Developer
- Posts: 3904
- Joined: Tue Jul 27, 2004 10:54 pm
- Location: Solar powered park bench
- Contact:
The question is if it's a bug.
If you specified it in relative terms, perhaps you want it created in current location. Only thing I would need to add is an mkdir() before the chdir().
If you specified it in relative terms, perhaps you want it created in current location. Only thing I would need to add is an mkdir() before the chdir().
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
_____________
Insane Coding
Well as the user, I assumed that .\saves would be the same as c:\emu\snes\saves and .\screens would be c:\emu\snes\screens, instead of c:\emu\snes\saves\screens. If I wanted that, I would have made the screenshot directory .\saves\screens in the first place, right?Nach wrote:The question is if it's a bug.
If you specified it in relative terms, perhaps you want it created in current location. Only thing I would need to add is an mkdir() before the chdir().
To truly own, you must own at all games.
-
- Dark Wind
- Posts: 1271
- Joined: Thu Jul 29, 2004 8:58 pm
- Location: Texas
- Contact:
-
- ZSNES Developer
- Posts: 3904
- Joined: Tue Jul 27, 2004 10:54 pm
- Location: Solar powered park bench
- Contact:
No, you'd make it c:\emu\snes\saves\screensrlbond wrote:Well as the user, I assumed that .\saves would be the same as c:\emu\snes\saves and .\screens would be c:\emu\snes\screens, instead of c:\emu\snes\saves\screens. If I wanted that, I would have made the screenshot directory .\saves\screens in the first place, right?Nach wrote:The question is if it's a bug.
If you specified it in relative terms, perhaps you want it created in current location. Only thing I would need to add is an mkdir() before the chdir().
As I said, what should be the correct behavior? I'm sure some people want certain things to be saved whereever it is.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
_____________
Insane Coding
I don't think you are understanding, sorry I'm being confusing.
Here's what I have set for zsnes:
ZSNESW.exe is located in c:\emu\snes
I have the savegame directory set to ".\saves" because I want it to save to c:\emu\snes\saves, which it does.
Likewise, I have the snapshot directory set to ".\screens" because I want it to save to c:\emu\snes\screens, but it doesn't, it tries to save to c:\emu\snes\saves\screens instead, because zsnes has already changed to the .\saves directory and "forgot" to change back.
I hope this isn't as confusing.
Here's what I have set for zsnes:
ZSNESW.exe is located in c:\emu\snes
I have the savegame directory set to ".\saves" because I want it to save to c:\emu\snes\saves, which it does.
Likewise, I have the snapshot directory set to ".\screens" because I want it to save to c:\emu\snes\screens, but it doesn't, it tries to save to c:\emu\snes\saves\screens instead, because zsnes has already changed to the .\saves directory and "forgot" to change back.
I hope this isn't as confusing.
To truly own, you must own at all games.
-
- ZSNES Developer
- Posts: 3904
- Joined: Tue Jul 27, 2004 10:54 pm
- Location: Solar powered park bench
- Contact:
I understand you perfectly.
I asked if I should make it that c:\emu\snes\saves saves in c:\emu\snes\saves, c:\emu\snes\saves\screens saves in c:\emu\snes\saves\screens, c:\emu\snes\screens saves in c:\emu\snes\screens, and .\saves or \screens should save relative to whereever ZSNES is now and create the directory if needed.
I asked if I should make it that c:\emu\snes\saves saves in c:\emu\snes\saves, c:\emu\snes\saves\screens saves in c:\emu\snes\saves\screens, c:\emu\snes\screens saves in c:\emu\snes\screens, and .\saves or \screens should save relative to whereever ZSNES is now and create the directory if needed.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
_____________
Insane Coding
-
- ZNES Developer
- Posts: 215
- Joined: Mon Aug 02, 2004 11:22 pm
I'd expect this too.rlbond wrote:Well as the user, I assumed that .\saves would be the same as c:\emu\snes\saves and .\screens would be c:\emu\snes\screens, instead of c:\emu\snes\saves\screens. If I wanted that, I would have made the screenshot directory .\saves\screens in the first place, right?Nach wrote:The question is if it's a bug.
If you specified it in relative terms, perhaps you want it created in current location. Only thing I would need to add is an mkdir() before the chdir().
I'm not sure if that would fix the problem, because it doesn't seem to actually change to the correct directory if the paths are relative. But you're the programmer, you know more about zsnes than I do, obviously.Nach wrote:The question is if it's a bug.
If you specified it in relative terms, perhaps you want it created in current location. Only thing I would need to add is an mkdir() before the chdir().
yes, that is what needs to happen, although I'm not sure what creating the directory if needed has to do with the bug in the first place -- the directory already existed on my pc.Nach wrote:I understand you perfectly.
I asked if I should make it that c:\emu\snes\saves saves in c:\emu\snes\saves, c:\emu\snes\saves\screens saves in c:\emu\snes\saves\screens, c:\emu\snes\screens saves in c:\emu\snes\screens, and .\saves or \screens should save relative to whereever ZSNES is now and create the directory if needed.
Last edited by rlbond on Wed Jul 13, 2005 10:46 pm, edited 1 time in total.
To truly own, you must own at all games.
-
- ZSNES Developer
- Posts: 3904
- Joined: Tue Jul 27, 2004 10:54 pm
- Location: Solar powered park bench
- Contact:
Seems you're changing what you want.rlbond wrote:yes, that is what needs to happen.Nach wrote:I understand you perfectly.
I asked if I should make it that c:\emu\snes\saves saves in c:\emu\snes\saves, c:\emu\snes\saves\screens saves in c:\emu\snes\saves\screens, c:\emu\snes\screens saves in c:\emu\snes\screens, and .\saves or \screens should save relative to whereever ZSNES is now and create the directory if needed.
What do others want?
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
_____________
Insane Coding
Nach wrote:Seems you're changing what you want.rlbond wrote:yes, that is what needs to happen.Nach wrote:I understand you perfectly.
I asked if I should make it that c:\emu\snes\saves saves in c:\emu\snes\saves, c:\emu\snes\saves\screens saves in c:\emu\snes\saves\screens, c:\emu\snes\screens saves in c:\emu\snes\screens, and .\saves or \screens should save relative to whereever ZSNES is now and create the directory if needed.
What do others want?
I'm not changing what I want.
Here's what I want:
When I make the save directory called ".\saves", I want it to put all of my save files in {zsnes folder}\saves.
When I make the screenshot directory called ".\screens", I want it to put all of my screenshot files in {zsnes folder}\screens.
This is, logically, what should happen. But it doesn't.
Instead, the saves directory works (".\saves" puts all the save files in {zsnes folder}\saves) but the screenshot and spc directories do not. Instead, if I put, for example, ".\screens" as the folder to save my screenshots to, it does not save to {zsnes folder}\screens, like it should. After all, .\ means the current directory, and the current directory should be {zsnes folder}, so ".\screens" should be the same as {zsnes folder}\screens.
But, instead, if I put ".\screens" as the directory to save my screenshots, it saves to {zsnes folder}\saves\screens instead of the correct folder, which would be {zsnes folder}\screens. And since this folder wouldn't normally exist, since the user would expect the screenshots to go in the {zsnes folder}\screens folder, they would wind up in {zsnes folder}\saves instead of {zsnes folder}\screens.
Try it -- make your save and snapshots folders relative paths (and in different locations) and take a snapshot. It'll end up in the wrong place.
And I am not changing what I want.
That's what I said. It's a bug. When using relative paths, the screenshots and spcs do not save to the correct directories. And Agozer, no, it's not so hard to do that, but ZSNES should not have bugs. "Don't use relative paths anymore" shouldn't be a solution to this problem.rlbond wrote:ZSNES WIP July 10, Win Version
My screenshots (both png and bmp) save to the folder for SAVES instead of SCREENSHOTS. I have saves set to save to .\saves and screenshots to save to .\screens but the images go to .\saves instead.
Using Windows XP Home Edition SP2.
Nach, you said yourself:
THIS IS WHAT NEEDS TO HAPPEN, But this is not what happens. Try it.Nach wrote:
... .\saves or .\screens should save relative to whereever ZSNES is now...
To truly own, you must own at all games.
-
- ZSNES Developer
- Posts: 3904
- Joined: Tue Jul 27, 2004 10:54 pm
- Location: Solar powered park bench
- Contact:
Wherever ZSNES is now in it's stage of execution not where the ZSNES executable is stored.rlbond wrote: Nach, you said yourself:
Nach wrote:
... .\saves or .\screens should save relative to whereever ZSNES is now...
Since if you wanted it to be in an absolute place, you'd use an absolute directory path, right?
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
_____________
Insane Coding
-
- Seen it all
- Posts: 2302
- Joined: Mon Jan 03, 2005 5:04 pm
- Location: Germany
- Contact:
ZSNES changes the active directory?
Why?
Why?
vSNES | Delphi 10 BPLs
bsnes launcher with recent files list
bsnes launcher with recent files list
-
- ZSNES Developer
- Posts: 3904
- Joined: Tue Jul 27, 2004 10:54 pm
- Location: Solar powered park bench
- Contact:
It's better if you don't ask questions like that.creaothceann wrote:ZSNES changes the active directory?
Why?
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
_____________
Insane Coding
-
- Seen it all
- Posts: 2302
- Joined: Mon Jan 03, 2005 5:04 pm
- Location: Germany
- Contact:
I don't have a problem with that, just saying that I don't understand it.
vSNES | Delphi 10 BPLs
bsnes launcher with recent files list
bsnes launcher with recent files list
-
- ZSNES Developer
- Posts: 3904
- Joined: Tue Jul 27, 2004 10:54 pm
- Location: Solar powered park bench
- Contact:
There are two not understandings.creaothceann wrote:I don't have a problem with that, just saying that I don't understand it.
The first is where you don't understand it at all, does not compute.
The second is where you understand it, but you scratch your head wondering why.
ZSNES is a collection of the second. Don't question it, and hope or help the new people work it out.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
_____________
Insane Coding
Except, this would lead to problems.Nach wrote:Wherever ZSNES is now in it's stage of execution not where the ZSNES executable is stored.rlbond wrote: Nach, you said yourself:
Nach wrote:
... .\saves or .\screens should save relative to whereever ZSNES is now...
Since if you wanted it to be in an absolute place, you'd use an absolute directory path, right?
For example, let's say, once again, I have .\saves and .\screens set as my directories.
First I save state. That changes the current directory to {zsnes}\saves.
Then I take a screenshot. That changes it to {zsnes}\saves\screens.
Then I save state again. Now it's in {zsnes}\saves\screens\saves!
But if I load zsnes again, it would use my first savestate.
Logically, I think most people who would use relative paths would assume .\path would be relative to the zsnes executable. .\saves is just much easier to type, especially in zsnes where there is no "browse" button and you can't copy and paste from the other fields (remember that I would have to type the full path 11 times with the current gui! What if it was stored in some place like c:\program files\emulation\snes\zsnes? That would drive anyone nuts.
So here is what I propose:
When ZSNES starts, it stores its current (absolute) location to a string. Then, whenever it runs a chdir command, first it changes to this directory in the string, then does an mkdir command, then the chdir command. This would fix the problem. I honestly can't imagine anyone actually wanting their save directories to constantly change. The assumption when using relative paths is that they are RELATIVE to whatever directory you're in AT THE MOMENT. Maybe you could have zsnes convert these into absolute paths once you typed them in instead? That would work too.
To truly own, you must own at all games.