mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-09 19:36:29 +00:00
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:

committed by
Sam Lantinga

parent
1c5c3b1479
commit
f241e8e8fd
@@ -2016,7 +2016,6 @@ elseif(WINDOWS)
|
||||
check_include_file(audioclient.h HAVE_AUDIOCLIENT_H)
|
||||
check_include_file(sensorsapi.h HAVE_SENSORSAPI_H)
|
||||
check_include_file(shellscalingapi.h HAVE_SHELLSCALINGAPI_H)
|
||||
check_include_file(shobjidl_core.h HAVE_SHOBJIDL_CORE_H)
|
||||
check_c_source_compiles("
|
||||
#include <windows.h>
|
||||
#include <mfapi.h>
|
||||
|
@@ -15,7 +15,6 @@ if(MSVC)
|
||||
set(HAVE_MMDEVICEAPI_H "1" CACHE INTERNAL "Have include mmdeviceapi.h")
|
||||
set(HAVE_SENSORSAPI_H "1" CACHE INTERNAL "Have include sensorsapi.h")
|
||||
set(HAVE_SHELLSCALINGAPI_H "1" CACHE INTERNAL "Have include shellscalingapi.h")
|
||||
set(HAVE_SHOBJIDL_CORE_H "1" CACHE INTERNAL "Have include shobjidl_core.h")
|
||||
set(HAVE_TPCSHRD_H "1" CACHE INTERNAL "Have include tpcshrd.h")
|
||||
set(HAVE_WIN32_CC "1" CACHE INTERNAL "Test HAVE_WIN32_CC")
|
||||
set(HAVE_XINPUT_H "1" CACHE INTERNAL "Test HAVE_XINPUT_H")
|
||||
|
@@ -229,7 +229,6 @@
|
||||
#cmakedefine HAVE_TPCSHRD_H 1
|
||||
#cmakedefine HAVE_ROAPI_H 1
|
||||
#cmakedefine HAVE_SHELLSCALINGAPI_H 1
|
||||
#cmakedefine HAVE_SHOBJIDL_CORE_H 1
|
||||
|
||||
#cmakedefine USE_POSIX_SPAWN 1
|
||||
#cmakedefine HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR 1
|
||||
|
@@ -95,9 +95,6 @@ typedef unsigned int uintptr_t;
|
||||
#if defined(_WIN32_MAXVER) && _WIN32_MAXVER >= 0x0603 /* Windows 8.1 SDK */
|
||||
#define HAVE_SHELLSCALINGAPI_H 1
|
||||
#endif
|
||||
#if defined(_WIN32_MAXVER) && _WIN32_MAXVER >= 0x0601 /* Windows 7 SDK */
|
||||
#define HAVE_SHOBJIDL_CORE_H 1
|
||||
#endif
|
||||
#define HAVE_MMDEVICEAPI_H 1
|
||||
#define HAVE_AUDIOCLIENT_H 1
|
||||
#define HAVE_TPCSHRD_H 1
|
||||
|
@@ -43,7 +43,6 @@
|
||||
#define HAVE_D3D11_H 1
|
||||
#define HAVE_ROAPI_H 1
|
||||
#define HAVE_SHELLSCALINGAPI_H 1
|
||||
#define HAVE_SHOBJIDL_CORE_H 1
|
||||
#define HAVE_MMDEVICEAPI_H 1
|
||||
#define HAVE_AUDIOCLIENT_H 1
|
||||
#define HAVE_TPCSHRD_H 1
|
||||
|
@@ -41,7 +41,6 @@
|
||||
/*#define HAVE_WINDOWS_GAMING_INPUT_H 1*/
|
||||
/*#define HAVE_ROAPI_H 1*/
|
||||
/*#define HAVE_SHELLSCALINGAPI_H 1*/
|
||||
/*#define HAVE_SHOBJIDL_CORE_H 1*/
|
||||
#define HAVE_MMDEVICEAPI_H 1
|
||||
#define HAVE_AUDIOCLIENT_H 1
|
||||
/*#define HAVE_TPCSHRD_H 1*/
|
||||
|
@@ -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);
|
||||
|
@@ -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();
|
||||
|
@@ -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
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user