mirror of
https://github.com/libretro/RetroArch
synced 2025-04-09 21:45:45 +00:00
Fix COM initialization on Qt builds
This commit is contained in:
parent
fed880bc33
commit
901c712e61
@ -36,6 +36,11 @@
|
|||||||
#include "../driver.h"
|
#include "../driver.h"
|
||||||
#include "../paths.h"
|
#include "../paths.h"
|
||||||
#include "../retroarch.h"
|
#include "../retroarch.h"
|
||||||
|
#include "../verbosity.h"
|
||||||
|
|
||||||
|
#if defined(_WIN32) && !defined(_XBOX) && !defined(__WINRT__)
|
||||||
|
#include <objbase.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
/* griffin hack */
|
/* griffin hack */
|
||||||
#ifdef HAVE_QT
|
#ifdef HAVE_QT
|
||||||
@ -44,15 +49,6 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef HAVE_MAIN
|
|
||||||
#include "../retroarch.h"
|
|
||||||
#include "../verbosity.h"
|
|
||||||
|
|
||||||
#if defined(_WIN32) && !defined(_XBOX) && !defined(__WINRT__)
|
|
||||||
#include <objbase.h>
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* main_exit:
|
* main_exit:
|
||||||
*
|
*
|
||||||
@ -94,6 +90,10 @@ void main_exit(void *args)
|
|||||||
driver_ctl(RARCH_DRIVER_CTL_DEINIT, NULL);
|
driver_ctl(RARCH_DRIVER_CTL_DEINIT, NULL);
|
||||||
ui_companion_driver_free();
|
ui_companion_driver_free();
|
||||||
frontend_driver_free();
|
frontend_driver_free();
|
||||||
|
|
||||||
|
#if defined(_WIN32) && !defined(_XBOX) && !defined(__WINRT__)
|
||||||
|
CoUninitialize();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -114,7 +114,7 @@ int rarch_main(int argc, char *argv[], void *data)
|
|||||||
const ui_application_t *ui_application = NULL;
|
const ui_application_t *ui_application = NULL;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(HAVE_MAIN) && defined(_WIN32) && !defined(_XBOX) && !defined(__WINRT__)
|
#if defined(_WIN32) && !defined(_XBOX) && !defined(__WINRT__)
|
||||||
if (FAILED(CoInitialize(NULL)))
|
if (FAILED(CoInitialize(NULL)))
|
||||||
{
|
{
|
||||||
RARCH_ERR("FATAL: Failed to initialize the COM interface\n");
|
RARCH_ERR("FATAL: Failed to initialize the COM interface\n");
|
||||||
@ -170,10 +170,6 @@ int rarch_main(int argc, char *argv[], void *data)
|
|||||||
ui_application->run(args);
|
ui_application->run(args);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(HAVE_MAIN) && defined(_WIN32) && !defined(_XBOX) && !defined(__WINRT__)
|
|
||||||
CoUninitialize();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user