mirror of
https://gitlab.com/dosowisko.net/libsuperderpy.git
synced 2025-02-07 21:56:44 +01:00
don't dlclose gamestates when running on valgrind, so it can show its report correctly
This commit is contained in:
parent
04db328028
commit
b4d9d01c01
2 changed files with 7130 additions and 3 deletions
7126
src/3rdparty/valgrind.h
vendored
Normal file
7126
src/3rdparty/valgrind.h
vendored
Normal file
File diff suppressed because it is too large
Load diff
|
@ -28,12 +28,13 @@
|
||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <libgen.h>
|
#include <libgen.h>
|
||||||
|
#include "internal.h"
|
||||||
|
#include "libsuperderpy.h"
|
||||||
|
#include "3rdparty/valgrind.h"
|
||||||
#ifdef ALLEGRO_MACOSX
|
#ifdef ALLEGRO_MACOSX
|
||||||
#include <mach-o/dyld.h>
|
#include <mach-o/dyld.h>
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#endif
|
#endif
|
||||||
#include "internal.h"
|
|
||||||
#include "libsuperderpy.h"
|
|
||||||
|
|
||||||
SYMBOL_EXPORT struct Game* libsuperderpy_init(int argc, char** argv, const char* name, struct libsuperderpy_viewport viewport) {
|
SYMBOL_EXPORT struct Game* libsuperderpy_init(int argc, char** argv, const char* name, struct libsuperderpy_viewport viewport) {
|
||||||
|
|
||||||
|
@ -440,7 +441,7 @@ SYMBOL_EXPORT void libsuperderpy_destroy(struct Game *game) {
|
||||||
(*tmp->api->Gamestate_Unload)(game, tmp->data);
|
(*tmp->api->Gamestate_Unload)(game, tmp->data);
|
||||||
tmp->loaded = false;
|
tmp->loaded = false;
|
||||||
}
|
}
|
||||||
if (tmp->handle) {
|
if (tmp->handle && !RUNNING_ON_VALGRIND) {
|
||||||
PrintConsole(game, "Closing gamestate \"%s\"...", tmp->name);
|
PrintConsole(game, "Closing gamestate \"%s\"...", tmp->name);
|
||||||
dlclose(tmp->handle);
|
dlclose(tmp->handle);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue