aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorcbdev <cb@cbcdn.com>2020-04-26 21:50:00 +0200
committercbdev <cb@cbcdn.com>2020-04-26 21:50:00 +0200
commit6503d83dee9c2c7dd30572b84f11b95f832e9309 (patch)
tree4c9765cbb948e6eaba66877820e16fd387f34150
parent5f2808188b71c6eea7440c70321ccfe7b3ccdd55 (diff)
downloadmidimonster-6503d83dee9c2c7dd30572b84f11b95f832e9309.tar.gz
midimonster-6503d83dee9c2c7dd30572b84f11b95f832e9309.tar.bz2
midimonster-6503d83dee9c2c7dd30572b84f11b95f832e9309.zip
Disable stop-the-world windows error messages
-rw-r--r--.travis-ci.sh1
-rw-r--r--midimonster.c3
-rw-r--r--plugin.c2
3 files changed, 4 insertions, 2 deletions
diff --git a/.travis-ci.sh b/.travis-ci.sh
index 5272fde..39652a1 100644
--- a/.travis-ci.sh
+++ b/.travis-ci.sh
@@ -73,7 +73,6 @@ elif [ "$TASK" = "windows" ]; then
fi
# Build the lua backend but disable it by default to avoid scary error messages
make -C backends lua.dll
- mv backends/lua.dll backends/lua.dll.disabled
travis_fold end "make_windows"
if [ "$(git describe)" == "$(git describe --abbrev=0)" ]; then
travis_fold start "deploy_windows"
diff --git a/midimonster.c b/midimonster.c
index 1065e5c..b418711 100644
--- a/midimonster.c
+++ b/midimonster.c
@@ -284,6 +284,9 @@ static int platform_initialize(){
if(WSAStartup(version, &wsa)){
return 1;
}
+
+ unsigned error_mode = SetErrorMode(0);
+ SetErrorMode(error_mode | SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX | SEM_NOOPENFILEERRORBOX);
#endif
return 0;
}
diff --git a/plugin.c b/plugin.c
index 56d6651..e7d8eba 100644
--- a/plugin.c
+++ b/plugin.c
@@ -51,7 +51,7 @@ static int plugin_attach(char* path, char* file){
char* error = NULL;
FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
NULL, GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR) &error, 0, NULL);
- fprintf(stderr, "Failed to load plugin %s: %s\n", lib, error);
+ fprintf(stderr, "Failed to load plugin %s, check that all supporting libraries are present: %s\n", lib, error);
LocalFree(error);
#else
fprintf(stderr, "Failed to load plugin %s: %s\n", lib, dlerror());