mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-10 03:46:27 +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(audioclient.h HAVE_AUDIOCLIENT_H)
|
||||||
check_include_file(sensorsapi.h HAVE_SENSORSAPI_H)
|
check_include_file(sensorsapi.h HAVE_SENSORSAPI_H)
|
||||||
check_include_file(shellscalingapi.h HAVE_SHELLSCALINGAPI_H)
|
check_include_file(shellscalingapi.h HAVE_SHELLSCALINGAPI_H)
|
||||||
check_include_file(shobjidl_core.h HAVE_SHOBJIDL_CORE_H)
|
|
||||||
check_c_source_compiles("
|
check_c_source_compiles("
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <mfapi.h>
|
#include <mfapi.h>
|
||||||
|
@@ -15,7 +15,6 @@ if(MSVC)
|
|||||||
set(HAVE_MMDEVICEAPI_H "1" CACHE INTERNAL "Have include mmdeviceapi.h")
|
set(HAVE_MMDEVICEAPI_H "1" CACHE INTERNAL "Have include mmdeviceapi.h")
|
||||||
set(HAVE_SENSORSAPI_H "1" CACHE INTERNAL "Have include sensorsapi.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_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_TPCSHRD_H "1" CACHE INTERNAL "Have include tpcshrd.h")
|
||||||
set(HAVE_WIN32_CC "1" CACHE INTERNAL "Test HAVE_WIN32_CC")
|
set(HAVE_WIN32_CC "1" CACHE INTERNAL "Test HAVE_WIN32_CC")
|
||||||
set(HAVE_XINPUT_H "1" CACHE INTERNAL "Test HAVE_XINPUT_H")
|
set(HAVE_XINPUT_H "1" CACHE INTERNAL "Test HAVE_XINPUT_H")
|
||||||
|
@@ -229,7 +229,6 @@
|
|||||||
#cmakedefine HAVE_TPCSHRD_H 1
|
#cmakedefine HAVE_TPCSHRD_H 1
|
||||||
#cmakedefine HAVE_ROAPI_H 1
|
#cmakedefine HAVE_ROAPI_H 1
|
||||||
#cmakedefine HAVE_SHELLSCALINGAPI_H 1
|
#cmakedefine HAVE_SHELLSCALINGAPI_H 1
|
||||||
#cmakedefine HAVE_SHOBJIDL_CORE_H 1
|
|
||||||
|
|
||||||
#cmakedefine USE_POSIX_SPAWN 1
|
#cmakedefine USE_POSIX_SPAWN 1
|
||||||
#cmakedefine HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR 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 */
|
#if defined(_WIN32_MAXVER) && _WIN32_MAXVER >= 0x0603 /* Windows 8.1 SDK */
|
||||||
#define HAVE_SHELLSCALINGAPI_H 1
|
#define HAVE_SHELLSCALINGAPI_H 1
|
||||||
#endif
|
#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_MMDEVICEAPI_H 1
|
||||||
#define HAVE_AUDIOCLIENT_H 1
|
#define HAVE_AUDIOCLIENT_H 1
|
||||||
#define HAVE_TPCSHRD_H 1
|
#define HAVE_TPCSHRD_H 1
|
||||||
|
@@ -43,7 +43,6 @@
|
|||||||
#define HAVE_D3D11_H 1
|
#define HAVE_D3D11_H 1
|
||||||
#define HAVE_ROAPI_H 1
|
#define HAVE_ROAPI_H 1
|
||||||
#define HAVE_SHELLSCALINGAPI_H 1
|
#define HAVE_SHELLSCALINGAPI_H 1
|
||||||
#define HAVE_SHOBJIDL_CORE_H 1
|
|
||||||
#define HAVE_MMDEVICEAPI_H 1
|
#define HAVE_MMDEVICEAPI_H 1
|
||||||
#define HAVE_AUDIOCLIENT_H 1
|
#define HAVE_AUDIOCLIENT_H 1
|
||||||
#define HAVE_TPCSHRD_H 1
|
#define HAVE_TPCSHRD_H 1
|
||||||
|
@@ -41,7 +41,6 @@
|
|||||||
/*#define HAVE_WINDOWS_GAMING_INPUT_H 1*/
|
/*#define HAVE_WINDOWS_GAMING_INPUT_H 1*/
|
||||||
/*#define HAVE_ROAPI_H 1*/
|
/*#define HAVE_ROAPI_H 1*/
|
||||||
/*#define HAVE_SHELLSCALINGAPI_H 1*/
|
/*#define HAVE_SHELLSCALINGAPI_H 1*/
|
||||||
/*#define HAVE_SHOBJIDL_CORE_H 1*/
|
|
||||||
#define HAVE_MMDEVICEAPI_H 1
|
#define HAVE_MMDEVICEAPI_H 1
|
||||||
#define HAVE_AUDIOCLIENT_H 1
|
#define HAVE_AUDIOCLIENT_H 1
|
||||||
/*#define HAVE_TPCSHRD_H 1*/
|
/*#define HAVE_TPCSHRD_H 1*/
|
||||||
|
@@ -51,8 +51,8 @@
|
|||||||
#include "wmmsg.h"
|
#include "wmmsg.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_SHOBJIDL_CORE_H
|
#if !(defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES))
|
||||||
#include <shobjidl_core.h>
|
#include <shobjidl.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef SDL_PLATFORM_GDK
|
#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)
|
#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) {
|
if (msg == data->videodata->WM_TASKBAR_BUTTON_CREATED) {
|
||||||
data->taskbar_button_created = true;
|
data->taskbar_button_created = true;
|
||||||
WIN_ApplyWindowProgress(SDL_GetVideoDevice(), data->window);
|
WIN_ApplyWindowProgress(SDL_GetVideoDevice(), data->window);
|
||||||
|
@@ -36,8 +36,8 @@
|
|||||||
#include "SDL_windowsrawinput.h"
|
#include "SDL_windowsrawinput.h"
|
||||||
#include "SDL_windowsvulkan.h"
|
#include "SDL_windowsvulkan.h"
|
||||||
|
|
||||||
#ifdef HAVE_SHOBJIDL_CORE_H
|
#if !(defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES))
|
||||||
#include <shobjidl_core.h>
|
#include <shobjidl.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef SDL_GDK_TEXTINPUT
|
#ifdef SDL_GDK_TEXTINPUT
|
||||||
@@ -553,7 +553,7 @@ static bool WIN_VideoInit(SDL_VideoDevice *_this)
|
|||||||
#if !defined(SDL_PLATFORM_XBOXONE) && !defined(SDL_PLATFORM_XBOXSERIES)
|
#if !defined(SDL_PLATFORM_XBOXONE) && !defined(SDL_PLATFORM_XBOXSERIES)
|
||||||
data->_SDL_WAKEUP = RegisterWindowMessageA("_SDL_WAKEUP");
|
data->_SDL_WAKEUP = RegisterWindowMessageA("_SDL_WAKEUP");
|
||||||
#endif
|
#endif
|
||||||
#if defined(HAVE_SHOBJIDL_CORE_H)
|
#if !defined(SDL_PLATFORM_XBOXONE) && !defined(SDL_PLATFORM_XBOXSERIES)
|
||||||
data->WM_TASKBAR_BUTTON_CREATED = RegisterWindowMessageA("TaskbarButtonCreated");
|
data->WM_TASKBAR_BUTTON_CREATED = RegisterWindowMessageA("TaskbarButtonCreated");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -579,12 +579,10 @@ void WIN_VideoQuit(SDL_VideoDevice *_this)
|
|||||||
WIN_QuitKeyboard(_this);
|
WIN_QuitKeyboard(_this);
|
||||||
WIN_QuitMouse(_this);
|
WIN_QuitMouse(_this);
|
||||||
|
|
||||||
#if defined(HAVE_SHOBJIDL_CORE_H)
|
|
||||||
if (data->taskbar_list) {
|
if (data->taskbar_list) {
|
||||||
IUnknown_Release(data->taskbar_list);
|
IUnknown_Release(data->taskbar_list);
|
||||||
data->taskbar_list = NULL;
|
data->taskbar_list = NULL;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
if (data->oleinitialized) {
|
if (data->oleinitialized) {
|
||||||
OleUninitialize();
|
OleUninitialize();
|
||||||
|
@@ -541,7 +541,7 @@ struct SDL_VideoData
|
|||||||
BYTE pre_hook_key_state[256];
|
BYTE pre_hook_key_state[256];
|
||||||
UINT _SDL_WAKEUP;
|
UINT _SDL_WAKEUP;
|
||||||
|
|
||||||
#ifdef HAVE_SHOBJIDL_CORE_H
|
#if !(defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES))
|
||||||
UINT WM_TASKBAR_BUTTON_CREATED;
|
UINT WM_TASKBAR_BUTTON_CREATED;
|
||||||
ITaskbarList3 *taskbar_list;
|
ITaskbarList3 *taskbar_list;
|
||||||
#endif
|
#endif
|
||||||
|
@@ -39,8 +39,8 @@
|
|||||||
// Dropfile support
|
// Dropfile support
|
||||||
#include <shellapi.h>
|
#include <shellapi.h>
|
||||||
|
|
||||||
#ifdef HAVE_SHOBJIDL_CORE_H
|
#if !(defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES))
|
||||||
#include <shobjidl_core.h>
|
#include <shobjidl.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Dark mode support
|
// Dark mode support
|
||||||
@@ -179,7 +179,7 @@ static DWORD GetWindowStyleEx(SDL_Window *window)
|
|||||||
return style;
|
return style;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_SHOBJIDL_CORE_H
|
#if !(defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES))
|
||||||
static ITaskbarList3 *GetTaskbarList(SDL_Window *window)
|
static ITaskbarList3 *GetTaskbarList(SDL_Window *window)
|
||||||
{
|
{
|
||||||
const SDL_WindowData *data = window->internal;
|
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)
|
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;
|
SDL_WindowData *data = window->internal;
|
||||||
if (!data->taskbar_button_created) {
|
if (!data->taskbar_button_created) {
|
||||||
return true;
|
return true;
|
||||||
|
Reference in New Issue
Block a user