mirror of
https://github.com/libretro/RetroArch
synced 2025-02-12 00:40:26 +00:00
proper init of ITaskbarList
This commit is contained in:
parent
5a12ca642c
commit
d3210b87ae
@ -44,6 +44,7 @@ static ITaskbarList3 *g_taskbarList = NULL;
|
|||||||
/* MSVC really doesn't want CINTERFACE to be used with shobjidl for some reason, but since we use C++ mode,
|
/* MSVC really doesn't want CINTERFACE to be used with shobjidl for some reason, but since we use C++ mode,
|
||||||
* we need a workaround... so use the names of the COBJMACROS functions instead. */
|
* we need a workaround... so use the names of the COBJMACROS functions instead. */
|
||||||
#if defined(__cplusplus) && !defined(CINTERFACE)
|
#if defined(__cplusplus) && !defined(CINTERFACE)
|
||||||
|
#define ITaskbarList3_HrInit(x) g_taskbarList->HrInit()
|
||||||
#define ITaskbarList3_Release(x) g_taskbarList->Release()
|
#define ITaskbarList3_Release(x) g_taskbarList->Release()
|
||||||
#define ITaskbarList3_SetProgressState(a, b, c) g_taskbarList->SetProgressState(b, c)
|
#define ITaskbarList3_SetProgressState(a, b, c) g_taskbarList->SetProgressState(b, c)
|
||||||
#define ITaskbarList3_SetProgressValue(a, b, c, d) g_taskbarList->SetProgressValue(b, c, d)
|
#define ITaskbarList3_SetProgressValue(a, b, c, d) g_taskbarList->SetProgressValue(b, c, d)
|
||||||
@ -98,7 +99,14 @@ static void* win32_display_server_init(void)
|
|||||||
CLSCTX_INPROC_SERVER, &IID_ITaskbarList3, (void**)&g_taskbarList);
|
CLSCTX_INPROC_SERVER, &IID_ITaskbarList3, (void**)&g_taskbarList);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!SUCCEEDED(hr))
|
if (SUCCEEDED(hr))
|
||||||
|
{
|
||||||
|
hr = ITaskbarList3_HrInit(g_taskbarList);
|
||||||
|
|
||||||
|
if (!SUCCEEDED(hr))
|
||||||
|
RARCH_ERR("[dispserv]: HrInit of ITaskbarList3 failed.\n");
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
g_taskbarList = NULL;
|
g_taskbarList = NULL;
|
||||||
RARCH_ERR("[dispserv]: CoCreateInstance of ITaskbarList3 failed.\n");
|
RARCH_ERR("[dispserv]: CoCreateInstance of ITaskbarList3 failed.\n");
|
||||||
@ -117,7 +125,7 @@ static void win32_display_server_destroy(void *data)
|
|||||||
win32_orig_refresh, (float)win32_orig_refresh, crt_center );
|
win32_orig_refresh, (float)win32_orig_refresh, crt_center );
|
||||||
|
|
||||||
#ifdef HAS_TASKBAR_EXT
|
#ifdef HAS_TASKBAR_EXT
|
||||||
if (g_taskbarList && win32_taskbar_is_created())
|
if (g_taskbarList)
|
||||||
{
|
{
|
||||||
ITaskbarList3_Release(g_taskbarList);
|
ITaskbarList3_Release(g_taskbarList);
|
||||||
g_taskbarList = NULL;
|
g_taskbarList = NULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user