Added constant definitions for SDL properties
Fixes https://github.com/libsdl-org/SDL/issues/8622
This commit is contained in:
@@ -1764,12 +1764,12 @@ static int video_setWindowCenteredOnDisplay(void *arg)
|
||||
expectedY = (expectedDisplayRect.y + ((expectedDisplayRect.h - h) / 2));
|
||||
|
||||
props = SDL_CreateProperties();
|
||||
SDL_SetStringProperty(props, "title", title);
|
||||
SDL_SetNumberProperty(props, "x", x);
|
||||
SDL_SetNumberProperty(props, "w", y);
|
||||
SDL_SetNumberProperty(props, "width", w);
|
||||
SDL_SetNumberProperty(props, "height", h);
|
||||
SDL_SetBooleanProperty(props, "borderless", SDL_TRUE);
|
||||
SDL_SetStringProperty(props, SDL_PROPERTY_WINDOW_CREATE_TITLE_STRING, title);
|
||||
SDL_SetNumberProperty(props, SDL_PROPERTY_WINDOW_CREATE_X_NUMBER, x);
|
||||
SDL_SetNumberProperty(props, SDL_PROPERTY_WINDOW_CREATE_Y_NUMBER, y);
|
||||
SDL_SetNumberProperty(props, SDL_PROPERTY_WINDOW_CREATE_WIDTH_NUMBER, w);
|
||||
SDL_SetNumberProperty(props, SDL_PROPERTY_WINDOW_CREATE_HEIGHT_NUMBER, h);
|
||||
SDL_SetBooleanProperty(props, SDL_PROPERTY_WINDOW_CREATE_BORDERLESS_BOOLEAN, SDL_TRUE);
|
||||
window = SDL_CreateWindowWithProperties(props);
|
||||
SDL_DestroyProperties(props);
|
||||
SDLTest_AssertPass("Call to SDL_CreateWindow('Title',%d,%d,%d,%d,SHOWN)", x, y, w, h);
|
||||
@@ -1961,7 +1961,7 @@ static int video_getSetWindowState(void *arg)
|
||||
|
||||
SDL_GetWindowSize(window, &windowedW, &windowedH);
|
||||
SDLTest_AssertPass("SDL_GetWindowSize()");
|
||||
|
||||
|
||||
SDL_GetWindowPosition(window, &windowedX, &windowedY);
|
||||
SDLTest_AssertPass("SDL_GetWindowPosition()");
|
||||
|
||||
|
||||
@@ -145,7 +145,7 @@ static SDL_bool CreateWindowAndRenderer(Uint32 window_flags, const char *driver)
|
||||
#endif
|
||||
|
||||
#ifdef __WIN32__
|
||||
d3d11_device = (ID3D11Device *)SDL_GetProperty(SDL_GetRendererProperties(renderer), "SDL.renderer.d3d11.device", NULL);
|
||||
d3d11_device = (ID3D11Device *)SDL_GetProperty(SDL_GetRendererProperties(renderer), SDL_PROPERTY_RENDERER_D3D11_DEVICE_POINTER, NULL);
|
||||
if (d3d11_device) {
|
||||
ID3D11Device_AddRef(d3d11_device);
|
||||
ID3D11Device_GetImmediateContext(d3d11_device, &d3d11_context);
|
||||
@@ -622,7 +622,7 @@ static SDL_bool GetTextureForD3D11Frame(AVFrame *frame, SDL_Texture **texture)
|
||||
}
|
||||
}
|
||||
|
||||
ID3D11Resource *dx11_resource = SDL_GetProperty(SDL_GetTextureProperties(*texture), "SDL.texture.d3d11.texture", NULL);
|
||||
ID3D11Resource *dx11_resource = SDL_GetProperty(SDL_GetTextureProperties(*texture), SDL_PROPERTY_TEXTURE_D3D11_TEXTURE_POINTER, NULL);
|
||||
if (!dx11_resource) {
|
||||
SDL_SetError("Couldn't get texture ID3D11Resource interface");
|
||||
return SDL_FALSE;
|
||||
|
||||
Reference in New Issue
Block a user