Updated SDL_syswm.h for SDL 3.0
* The header is no longer dependent on SDL build configuration * The structures are versioned separately from the rest of SDL * SDL_GetWindowWMInfo() now returns a standard result code and is passed the version expected by the application * Updated WhatsNew.txt and docs/README-migration.md with the first API changes in SDL 3.0
This commit is contained in:
parent
53ca1f7702
commit
b0840eb32e
57 changed files with 349 additions and 1411 deletions
|
@ -32,10 +32,12 @@
|
|||
#endif
|
||||
#include "SDL_hints.h"
|
||||
#include "SDL_loadso.h"
|
||||
#include "SDL_syswm.h"
|
||||
#include "../SDL_sysrender.h"
|
||||
#include "../SDL_d3dmath.h"
|
||||
|
||||
#define SDL_ENABLE_SYSWM_WINDOWS
|
||||
#include "SDL_syswm.h"
|
||||
|
||||
#include <d3d11_1.h>
|
||||
|
||||
#include "SDL_shaders_d3d11.h"
|
||||
|
@ -829,8 +831,13 @@ D3D11_CreateSwapChain(SDL_Renderer * renderer, int w, int h)
|
|||
} else {
|
||||
#if defined(__WIN32__) || defined(__WINGDK__)
|
||||
SDL_SysWMinfo windowinfo;
|
||||
SDL_VERSION(&windowinfo.version);
|
||||
SDL_GetWindowWMInfo(renderer->window, &windowinfo);
|
||||
|
||||
if (SDL_GetWindowWMInfo(renderer->window, &windowinfo, SDL_SYSWM_CURRENT_VERSION) < 0 ||
|
||||
windowinfo.subsystem != SDL_SYSWM_WINDOWS) {
|
||||
SDL_SetError("Couldn't get window handle");
|
||||
result = E_FAIL;
|
||||
goto done;
|
||||
}
|
||||
|
||||
result = IDXGIFactory2_CreateSwapChainForHwnd(data->dxgiFactory,
|
||||
(IUnknown *)data->d3dDevice,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue