Fix T90868: Console window flash when exiting
If the console was hidden on windows, it would be made visible during shutdown in an effort not hide a potentially active interactive console session. This however did not take in account if blender was actually launched from an interactive console causing the console window to briefly flash during shutdown even when launched from the new launcher, the brief flash concerned some users. This change adjusts the behaviour to restore the console only when blender was started from the console. Reviewed By: LazyDodo Differential Revision: https://developer.blender.org/D14016
This commit is contained in:
parent
b3bb51dd83
commit
a5dd1bc53d
Notes:
blender-bot
2023-02-14 11:34:30 +01:00
Referenced by issue #90868, System Console Window briefly flashes when exiting Blender on Windows
|
@ -105,6 +105,8 @@
|
|||
*/
|
||||
#define BROKEN_PEEK_TOUCHPAD
|
||||
|
||||
static bool isStartedFromCommandPrompt();
|
||||
|
||||
static void initRawInput()
|
||||
{
|
||||
#ifdef WITH_INPUT_NDOF
|
||||
|
@ -166,7 +168,10 @@ GHOST_SystemWin32::~GHOST_SystemWin32()
|
|||
{
|
||||
// Shutdown COM
|
||||
OleUninitialize();
|
||||
toggleConsole(1);
|
||||
|
||||
if (isStartedFromCommandPrompt()) {
|
||||
toggleConsole(1);
|
||||
}
|
||||
}
|
||||
|
||||
uint64_t GHOST_SystemWin32::performanceCounterToMillis(__int64 perf_ticks) const
|
||||
|
|
Loading…
Reference in New Issue