chunkypixel / atari-dev-studio

Homebrew game creation for the Atari 8-bit consoles (VS Code Extension)
http://atariage.com/forums/topic/290365-atari-dev-studio-for-homebrew-development-release/
GNU General Public License v3.0
77 stars 8 forks source link

Stella autoclose & location #7

Closed mengstr closed 5 years ago

mengstr commented 5 years ago

Is there a way to have the old Stella window autoclose and reload when I press the rocket again? And also make Stella appear at a specified (or at least the previous) location on the screen?

I guess this might be very OS specific....

chunkypixel commented 5 years ago

I'll have to see if I can track what is opened by the run call - not sure... Otherwise there for way for Windows using APIs but not sure about how that might integrate into VSCode (if it even can).

chunkypixel commented 5 years ago

This may be difficult. The spawn process uses cmd (windows) or bash (linux/macOS) to then launch the emulators (or compilers) which ends up being 2 different processes with 2 different PIDs. I cannot read/get the 2nd one (emulator in this case) via the process I created. Will need to find another way...

mengstr commented 5 years ago

On macOS it seems to be just one of the two created processes that actually is there while Stella is running.

6951 ?? S 0:00.76 /usr/local/Cellar/stella/5.1.3/Stella.app/Contents/MacOS/Stella /Users/mats/Documents/2600/dev/joomper/bin/joomper.a.bin

This can easily be killed by a killall Stella on Mac/linux. It was quite a while since I coded anything low-level for Win so I don't know if there's anything similar available there...

chunkypixel commented 5 years ago

Completed for v0.1.7 I've found a library that will search for processes by name so I've added a check before (re)launching Stella.

chunkypixel commented 5 years ago

I'd missed the other request in relation to window location. Looking through the settings it appears you can only force to the centre (-center 1) or fullscreen (-fullscreen) from what I can tell. I would assume it uses whatever OS standard for opening a window is available unless you force those choices via the command line.

I might add these once in the settings there is proper settings ordering in VS Code (i've logged a feature request https://github.com/Microsoft/vscode/issues/72485) - a lot of settings already!

chunkypixel commented 5 years ago

Added an option in the settings to override autoclose.