diff --git a/libobs/obs-windows.c b/libobs/obs-windows.c index 75a927868..e6bbcb0bb 100644 --- a/libobs/obs-windows.c +++ b/libobs/obs-windows.c @@ -788,6 +788,13 @@ void reset_win32_symbol_paths(void) da_free(paths); } +extern void initialize_crash_handler(void); + +void obs_init_win32_crash_handler(void) +{ + initialize_crash_handler(); +} + void initialize_com(void) { CoInitializeEx(0, COINIT_MULTITHREADED); diff --git a/libobs/obs.c b/libobs/obs.c index f37d85462..d9704cc64 100644 --- a/libobs/obs.c +++ b/libobs/obs.c @@ -776,7 +776,6 @@ static bool obs_init(const char *locale, const char *module_config_path, } #ifdef _WIN32 -extern void initialize_crash_handler(void); extern void initialize_com(void); extern void uninitialize_com(void); #endif @@ -795,7 +794,6 @@ bool obs_startup(const char *locale, const char *module_config_path, } #ifdef _WIN32 - initialize_crash_handler(); initialize_com(); #endif diff --git a/libobs/obs.h b/libobs/obs.h index 6778246d6..bedff521e 100644 --- a/libobs/obs.h +++ b/libobs/obs.h @@ -276,6 +276,12 @@ EXPORT void obs_set_locale(const char *locale); /** @return the current locale */ EXPORT const char *obs_get_locale(void); +/** Initialize the Windows-specific crash handler */ + +#ifdef _WIN32 +EXPORT void obs_init_win32_crash_handler(void); +#endif + /** * Returns the profiler name store (see util/profiler.h) used by OBS, which is * either a name store passed to obs_startup, an internal name store, or NULL