|
|
@@ -1,6 +1,6 @@ |
|
|
|
/* |
|
|
|
* Carla Bridge Plugin |
|
|
|
* Copyright (C) 2012-2023 Filipe Coelho <falktx@falktx.com> |
|
|
|
* Copyright (C) 2012-2024 Filipe Coelho <falktx@falktx.com> |
|
|
|
* |
|
|
|
* This program is free software; you can redistribute it and/or |
|
|
|
* modify it under the terms of the GNU General Public License as |
|
|
@@ -84,6 +84,11 @@ static void saveSignalHandler(int) noexcept |
|
|
|
gSaveNow = true; |
|
|
|
} |
|
|
|
#elif defined(CARLA_OS_WIN) |
|
|
|
static LONG WINAPI winExceptionFilter(_EXCEPTION_POINTERS*) |
|
|
|
{ |
|
|
|
return EXCEPTION_EXECUTE_HANDLER; |
|
|
|
} |
|
|
|
|
|
|
|
static BOOL WINAPI winSignalHandler(DWORD dwCtrlType) noexcept |
|
|
|
{ |
|
|
|
if (dwCtrlType == CTRL_C_EVENT) |
|
|
@@ -113,6 +118,8 @@ static void initSignalHandler() |
|
|
|
sigaction(SIGUSR1, &sig, nullptr); |
|
|
|
#elif defined(CARLA_OS_WIN) |
|
|
|
SetConsoleCtrlHandler(winSignalHandler, TRUE); |
|
|
|
SetErrorMode(SEM_NOGPFAULTERRORBOX); |
|
|
|
SetUnhandledExceptionFilter(winExceptionFilter); |
|
|
|
#endif |
|
|
|
} |
|
|
|
|
|
|
|