windows: replace shobjidl_core.h usage with shobjidl.h except for when targeting xbox

Closes https://github.com/libsdl-org/SDL/pull/13571
This commit is contained in:
Ozkan Sezer
2025-08-02 01:47:32 +03:00
committed by Sam Lantinga
parent 1c5c3b1479
commit f241e8e8fd
10 changed files with 13 additions and 23 deletions

View File

@@ -51,8 +51,8 @@
#include "wmmsg.h"
#endif
#ifdef HAVE_SHOBJIDL_CORE_H
#include <shobjidl_core.h>
#if !(defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES))
#include <shobjidl.h>
#endif
#ifdef SDL_PLATFORM_GDK
@@ -2412,7 +2412,7 @@ LRESULT CALLBACK WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara
#endif // !defined(SDL_PLATFORM_XBOXONE) && !defined(SDL_PLATFORM_XBOXSERIES)
}
#ifdef HAVE_SHOBJIDL_CORE_H
#if !defined(SDL_PLATFORM_XBOXONE) && !defined(SDL_PLATFORM_XBOXSERIES)
if (msg == data->videodata->WM_TASKBAR_BUTTON_CREATED) {
data->taskbar_button_created = true;
WIN_ApplyWindowProgress(SDL_GetVideoDevice(), data->window);

View File

@@ -36,8 +36,8 @@
#include "SDL_windowsrawinput.h"
#include "SDL_windowsvulkan.h"
#ifdef HAVE_SHOBJIDL_CORE_H
#include <shobjidl_core.h>
#if !(defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES))
#include <shobjidl.h>
#endif
#ifdef SDL_GDK_TEXTINPUT
@@ -553,7 +553,7 @@ static bool WIN_VideoInit(SDL_VideoDevice *_this)
#if !defined(SDL_PLATFORM_XBOXONE) && !defined(SDL_PLATFORM_XBOXSERIES)
data->_SDL_WAKEUP = RegisterWindowMessageA("_SDL_WAKEUP");
#endif
#if defined(HAVE_SHOBJIDL_CORE_H)
#if !defined(SDL_PLATFORM_XBOXONE) && !defined(SDL_PLATFORM_XBOXSERIES)
data->WM_TASKBAR_BUTTON_CREATED = RegisterWindowMessageA("TaskbarButtonCreated");
#endif
@@ -579,12 +579,10 @@ void WIN_VideoQuit(SDL_VideoDevice *_this)
WIN_QuitKeyboard(_this);
WIN_QuitMouse(_this);
#if defined(HAVE_SHOBJIDL_CORE_H)
if (data->taskbar_list) {
IUnknown_Release(data->taskbar_list);
data->taskbar_list = NULL;
}
#endif
if (data->oleinitialized) {
OleUninitialize();

View File

@@ -541,7 +541,7 @@ struct SDL_VideoData
BYTE pre_hook_key_state[256];
UINT _SDL_WAKEUP;
#ifdef HAVE_SHOBJIDL_CORE_H
#if !(defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES))
UINT WM_TASKBAR_BUTTON_CREATED;
ITaskbarList3 *taskbar_list;
#endif

View File

@@ -39,8 +39,8 @@
// Dropfile support
#include <shellapi.h>
#ifdef HAVE_SHOBJIDL_CORE_H
#include <shobjidl_core.h>
#if !(defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES))
#include <shobjidl.h>
#endif
// Dark mode support
@@ -179,7 +179,7 @@ static DWORD GetWindowStyleEx(SDL_Window *window)
return style;
}
#ifdef HAVE_SHOBJIDL_CORE_H
#if !(defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES))
static ITaskbarList3 *GetTaskbarList(SDL_Window *window)
{
const SDL_WindowData *data = window->internal;
@@ -2194,7 +2194,7 @@ bool WIN_FlashWindow(SDL_VideoDevice *_this, SDL_Window *window, SDL_FlashOperat
bool WIN_ApplyWindowProgress(SDL_VideoDevice *_this, SDL_Window *window)
{
#ifdef HAVE_SHOBJIDL_CORE_H
#if !(defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES))
SDL_WindowData *data = window->internal;
if (!data->taskbar_button_created) {
return true;