Browse Source

wine related fixes

Signed-off-by: falkTX <falktx@falktx.com>
tags/v2.5.9
falkTX 8 months ago
parent
commit
2e43dda112
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
3 changed files with 24 additions and 2 deletions
  1. +7
    -0
      source/bridges-plugin/CarlaBridgePlugin.cpp
  2. +16
    -1
      source/discovery/carla-discovery.cpp
  3. +1
    -1
      source/native-plugins/external

+ 7
- 0
source/bridges-plugin/CarlaBridgePlugin.cpp View File

@@ -86,6 +86,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)
@@ -115,6 +120,8 @@ static void initSignalHandler()
sigaction(SIGUSR1, &sig, nullptr);
#elif defined(CARLA_OS_WIN)
SetConsoleCtrlHandler(winSignalHandler, TRUE);
SetErrorMode(SEM_NOGPFAULTERRORBOX);
SetUnhandledExceptionFilter(winExceptionFilter);
#endif
}



+ 16
- 1
source/discovery/carla-discovery.cpp View File

@@ -132,7 +132,6 @@ protected:

CarlaScopedPointer<DiscoveryPipe> gPipe;


// --------------------------------------------------------------------------------------------------------------------
// Don't print ELF/EXE related errors since discovery can find multi-architecture binaries

@@ -151,6 +150,16 @@ static void print_lib_error(const char* const filename)
}
}

#ifdef CARLA_OS_WIN
// --------------------------------------------------------------------------------------------------------------------
// Do not show error message box on Windows

static LONG WINAPI winExceptionFilter(_EXCEPTION_POINTERS*)
{
return EXCEPTION_EXECUTE_HANDLER;
}
#endif

// --------------------------------------------------------------------------------------------------------------------
// Plugin Checks

@@ -2305,13 +2314,19 @@ int main(int argc, const char* argv[])
#endif

#ifdef CARLA_OS_WIN
// init win32 stuff that plugins might use
OleInitialize(nullptr);
CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED);

# ifndef __WINPTHREADS_VERSION
// (non-portable) initialization of statically linked pthread library
pthread_win32_process_attach_np();
pthread_win32_thread_attach_np();
# endif

// do not show error message box on Windows
SetErrorMode(SEM_NOGPFAULTERRORBOX);
SetUnhandledExceptionFilter(winExceptionFilter);
#endif

// ---------------------------------------------------------------------------------------------------------------


+ 1
- 1
source/native-plugins/external

@@ -1 +1 @@
Subproject commit e32f21fe9947740592f29401ff2b3f1f951c1d56
Subproject commit 3c0026dad5d940abd52b9a8d73fcf271357a12fe

Loading…
Cancel
Save