[Added] "Relaunch" option when GZDoom reports an coding error

Moderator: GZDoom Developers

"Relaunch" option when GZDoom reports an coding error

Postby Lord Misfit » Fri Jun 12, 2020 2:17 pm

If this isn't possible, I won't push the request, but I was curious if it's possible that when a modder encounters an error in their mod's code [the kind that prevents a full engine launch] and gets those messages, instead of just the "Quit" button showing up, a "Relaunch" button could also be there, which would basically relaunch GZDoom with the command line used previously [in order to be sure if their issue was fixed or not]. This might speed some things up when modders correct coding errors or issues, so they won't have to relaunch via shortcuts [or crap forbid, always having to retype the entire command-line] all the time.

I've noticed so many times when I've had this happen and have though about this idea, but never really thought to ask since I figured there were much more important issues being addressed. If this isn't possible at all, I won't ask about it anymore, but I wanted to know if it could be done at all. Unfortunately even if it is, I admit I don't know enough to code it myself for you. :\
User avatar
Lord Misfit
Servant of Aetherius? Servant of Siel?
 
Joined: 28 Dec 2006
Location: Canton, OH
Discord: Lord Misfit#9594

Re: "Relaunch" option when GZDoom reports an coding error

Postby Cherno » Fri Jun 12, 2020 5:55 pm

This is actually a good idea.
User avatar
Cherno
 
Joined: 06 Dec 2016

Re: "Relaunch" option when GZDoom reports an coding error

Postby phantombeta » Fri Jun 12, 2020 6:04 pm

I have the feeling this isn't really possible currently. Considering the "restart" console command is highly unstable and IIRC a hack, and this is basically just the same thing as that, I don't think it could work.
User avatar
phantombeta
In the meadow of sinful thoughts, every flower's a perfect one
 
Joined: 02 May 2013
Location: Brazil, South America, Earth, Orion-Cygnus Arm, Milky Way
Discord: phantombeta#2461
Twitch ID: phantombeta_
Github ID: Doom2fan
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: "Relaunch" option when GZDoom reports an coding error

Postby Enjay » Fri Jun 12, 2020 6:13 pm

I'm not entirely sure what the advantage here is.

If I've started via a shortcut, I don't see double clicking the shortcut again being much slower than pressing a restart button. If I've started via a launcher like ZDL, I just have to press launch again. Even if I'm at the command prompt, all I have to do is hit the up arrow and enter and I've restarted with the same parameters.

I don't really see GZDoom waiting there with a relaunch button being much quicker or more convenient than any of those. Am I missing something obvious?
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: "Relaunch" option when GZDoom reports an coding error

Postby Rachael » Fri Jun 12, 2020 6:24 pm

This would be a bit of a convenience feature, and to be quite honest I think it has merit.

phantombeta wrote:I have the feeling this isn't really possible currently. Considering the "restart" console command is highly unstable and IIRC a hack, and this is basically just the same thing as that, I don't think it could work.

std::system() calls are a wonderful thing.
User avatar
Rachael
Webmaster
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: "Relaunch" option when GZDoom reports an coding error

Postby Graf Zahl » Sat Jun 13, 2020 12:16 am

This would not be like "restart" but just letting the EXE start itself with its original command line again. Surely doable.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: "Relaunch" option when GZDoom reports an coding error

Postby Enjay » Sat Jun 13, 2020 6:09 am

If it does get added, I don't suppose it could be something that can be disabled could it? The reason I ask is that I can guarantee that I would do the following:

Start GZDoom via a shortcut (or some other method),
experience an error,
fix the error in some other program (GZDB, text editor, whatever)
forget that GZDoom is sitting there behind other programs waiting for a restart
Start via a shortcut again

I would now have two copies of GZDoom running: the one sitting waiting to restart and the newly started one.
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: "Relaunch" option when GZDoom reports an coding error

Postby Rachael » Sat Jun 13, 2020 7:57 am

If it gets added, the error window will just have a new "Restart" button, nothing more. You will still be able to exit out of that, just as always. Both buttons will function exactly the same, with the exception that "Restart" will invoke std::system to start a new GZDoom process before it exits.

Outside of changing the error window (which I have no experience with, I don't anticipate *too* much difficulty though) this seems like a really simple addition, so I should be able to code it myself later today, and do plan to try.
User avatar
Rachael
Webmaster
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: "Relaunch" option when GZDoom reports an coding error

Postby Nash » Sat Jun 13, 2020 8:33 am

If this does get added, please consider adding keyboard shortcuts because I'd to have to move the mouse to click the buttons. :D Like you know how in Windows, the underlined letter is the Alt + <whatever> shortcut for it, like: Quit, Restart...
User avatar
Nash
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes

Re: "Relaunch" option when GZDoom reports an coding error

Postby Enjay » Sat Jun 13, 2020 8:53 am

Rachael wrote:If it gets added, the error window will just have a new "Restart" button, nothing more. You will still be able to exit out of that, just as always. Both buttons will function exactly the same, with the exception that "Restart" will invoke std::system to start a new GZDoom process before it exits.

Ah yes, of course it would. Forget I mentioned it. :oops:
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: "Relaunch" option when GZDoom reports an coding error

Postby Rachael » Sat Jun 13, 2020 9:03 am

Nash wrote:If this does get added, please consider adding keyboard shortcuts because I'd to have to move the mouse to click the buttons. :D Like you know how in Windows, the underlined letter is the Alt + <whatever> shortcut for it, like: Quit, Restart...

That can easily be done. In Windows, all that's needed is adding "&" before the highlighted letter, i.e. "E&xit" "&Restart" - the gui takes care of the rest.
User avatar
Rachael
Webmaster
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: "Relaunch" option when GZDoom reports an coding error

Postby Rachael » Sun Jun 14, 2020 12:29 pm

Added

Keyboard accelerators have been added, as well - they didn't seem to be too invasive so I did it in the same commit.
User avatar
Rachael
Webmaster
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support


Return to Closed Feature Suggestions

Who is online

Users browsing this forum: No registered users and 1 guest