mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-04-24 00:06:10 +00:00
SDL_syswm.h has been removed and replaced with window properties
This commit is contained in:
@@ -28,8 +28,6 @@
|
||||
#include "../SDL_d3dmath.h"
|
||||
#include "../../video/windows/SDL_windowsvideo.h"
|
||||
|
||||
#include <SDL3/SDL_syswm.h>
|
||||
|
||||
#ifdef SDL_VIDEO_RENDER_D3D
|
||||
#define D3D_DEBUG_INFO
|
||||
#include <d3d9.h>
|
||||
@@ -1542,7 +1540,6 @@ SDL_Renderer *D3D_CreateRenderer(SDL_Window *window, Uint32 flags)
|
||||
{
|
||||
SDL_Renderer *renderer;
|
||||
D3D_RenderData *data;
|
||||
SDL_SysWMinfo windowinfo;
|
||||
HRESULT result;
|
||||
D3DPRESENT_PARAMETERS pparams;
|
||||
IDirect3DSwapChain9 *chain;
|
||||
@@ -1552,12 +1549,6 @@ SDL_Renderer *D3D_CreateRenderer(SDL_Window *window, Uint32 flags)
|
||||
SDL_DisplayID displayID;
|
||||
const SDL_DisplayMode *fullscreen_mode = NULL;
|
||||
|
||||
if (SDL_GetWindowWMInfo(window, &windowinfo, SDL_SYSWM_CURRENT_VERSION) < 0 ||
|
||||
windowinfo.subsystem != SDL_SYSWM_WINDOWS) {
|
||||
SDL_SetError("Couldn't get window handle");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
renderer = (SDL_Renderer *)SDL_calloc(1, sizeof(*renderer));
|
||||
if (renderer == NULL) {
|
||||
SDL_OutOfMemory();
|
||||
@@ -1611,7 +1602,7 @@ SDL_Renderer *D3D_CreateRenderer(SDL_Window *window, Uint32 flags)
|
||||
}
|
||||
|
||||
SDL_zero(pparams);
|
||||
pparams.hDeviceWindow = windowinfo.info.win.window;
|
||||
pparams.hDeviceWindow = (HWND)SDL_GetProperty(SDL_GetWindowProperties(window), "SDL.window.win32.hwnd");
|
||||
pparams.BackBufferWidth = w;
|
||||
pparams.BackBufferHeight = h;
|
||||
pparams.BackBufferCount = 1;
|
||||
|
||||
Reference in New Issue
Block a user