Browse Source

wine related fixes

Signed-off-by: falkTX <falktx@falktx.com>
pull/1658/merge
falkTX 8 months ago
parent
commit
776c936829
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
3 changed files with 11 additions and 3 deletions
  1. +8
    -1
      source/bridges-plugin/CarlaBridgePlugin.cpp
  2. +2
    -2
      source/discovery/carla-discovery.cpp
  3. +1
    -0
      source/jackbridge/Makefile

+ 8
- 1
source/bridges-plugin/CarlaBridgePlugin.cpp View File

@@ -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
}



+ 2
- 2
source/discovery/carla-discovery.cpp View File

@@ -176,7 +176,7 @@ static void print_lib_error(const char* const filename)
// --------------------------------------------------------------------------------------------------------------------
// Do not show error message box on Windows

static LONG win32ExceptionFilter(_EXCEPTION_POINTERS*)
static LONG WINAPI winExceptionFilter(_EXCEPTION_POINTERS*)
{
return EXCEPTION_EXECUTE_HANDLER;
}
@@ -2827,7 +2827,7 @@ int main(int argc, const char* argv[])

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

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


+ 1
- 0
source/jackbridge/Makefile View File

@@ -28,6 +28,7 @@ WINE_32BIT_FLAGS = $(32BIT_FLAGS) -fpermissive
WINE_64BIT_FLAGS = $(64BIT_FLAGS) -fpermissive
WINE_BUILD_FLAGS = $(filter-out -flto,$(BUILD_CXX_FLAGS))
WINE_LINK_FLAGS = $(filter-out -flto -static-libgcc -static-libstdc++,$(LINK_FLAGS))
WINE_LINK_FLAGS += -nostartfiles
WINE_LINK_FLAGS += $(LIBDL_LIBS)
WINE_LINK_FLAGS += -pthread
WINE_LINK_FLAGS += -lpthread


Loading…
Cancel
Save