mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-14 23:54:01 +00:00
Merge all occurances of __func__ and __FUNCTION__ to SDL_FUNCTION
(cherry picked from commit 8f8880a8eb)
This commit is contained in:
committed by
Sam Lantinga
parent
48e5fc7b69
commit
576c2d2f2c
@@ -40,9 +40,9 @@
|
||||
#include "SDL_shaders_d3d11.h"
|
||||
|
||||
#if defined(_MSC_VER) && !defined(__clang__)
|
||||
#define SDL_COMPOSE_ERROR(str) __FUNCTION__ ", " str
|
||||
#define SDL_COMPOSE_ERROR(str) SDL_FUNCTION ", " str
|
||||
#else
|
||||
#define SDL_COMPOSE_ERROR(str) SDL_STRINGIFY_ARG(__FUNCTION__) ", " str
|
||||
#define SDL_COMPOSE_ERROR(str) SDL_STRINGIFY_ARG(SDL_FUNCTION) ", " str
|
||||
#endif
|
||||
|
||||
#define SAFE_RELEASE(X) \
|
||||
@@ -932,7 +932,7 @@ static HRESULT D3D11_CreateSwapChain(SDL_Renderer *renderer, int w, int h)
|
||||
|
||||
IDXGIFactory_MakeWindowAssociation(data->dxgiFactory, hwnd, DXGI_MWA_NO_WINDOW_CHANGES);
|
||||
#else
|
||||
SDL_SetError(__FUNCTION__ ", Unable to find something to attach a swap chain to");
|
||||
SDL_SetError(SDL_FUNCTION ", Unable to find something to attach a swap chain to");
|
||||
goto done;
|
||||
#endif // defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_WINGDK) / else
|
||||
}
|
||||
@@ -1020,7 +1020,7 @@ static HRESULT D3D11_CreateWindowSizeDependentResources(SDL_Renderer *renderer)
|
||||
*/
|
||||
SDL_GetWindowSizeInPixels(renderer->window, &w, &h);
|
||||
data->rotation = D3D11_GetCurrentRotation();
|
||||
// SDL_Log("%s: windowSize={%d,%d}, orientation=%d", __FUNCTION__, w, h, (int)data->rotation);
|
||||
// SDL_Log("%s: windowSize={%d,%d}, orientation=%d", SDL_FUNCTION, w, h, (int)data->rotation);
|
||||
if (D3D11_IsDisplayRotated90Degrees(data->rotation)) {
|
||||
int tmp = w;
|
||||
w = h;
|
||||
@@ -1244,7 +1244,7 @@ static bool D3D11_CreateTexture(SDL_Renderer *renderer, SDL_Texture *texture, SD
|
||||
|
||||
if (textureFormat == DXGI_FORMAT_UNKNOWN) {
|
||||
return SDL_SetError("%s, An unsupported SDL pixel format (0x%x) was specified",
|
||||
__FUNCTION__, texture->format);
|
||||
SDL_FUNCTION, texture->format);
|
||||
}
|
||||
|
||||
textureData = (D3D11_TextureData *)SDL_calloc(1, sizeof(*textureData));
|
||||
@@ -2071,7 +2071,7 @@ static bool D3D11_UpdateViewport(SDL_Renderer *renderer)
|
||||
* SDL_CreateRenderer is calling it, and will call it again later
|
||||
* with a non-empty viewport.
|
||||
*/
|
||||
// SDL_Log("%s, no viewport was set!", __FUNCTION__);
|
||||
// SDL_Log("%s, no viewport was set!", SDL_FUNCTION);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -2138,7 +2138,7 @@ static bool D3D11_UpdateViewport(SDL_Renderer *renderer)
|
||||
d3dviewport.Height = orientationAlignedViewport.h;
|
||||
d3dviewport.MinDepth = 0.0f;
|
||||
d3dviewport.MaxDepth = 1.0f;
|
||||
// SDL_Log("%s: D3D viewport = {%f,%f,%f,%f}", __FUNCTION__, d3dviewport.TopLeftX, d3dviewport.TopLeftY, d3dviewport.Width, d3dviewport.Height);
|
||||
// SDL_Log("%s: D3D viewport = {%f,%f,%f,%f}", SDL_FUNCTION, d3dviewport.TopLeftX, d3dviewport.TopLeftY, d3dviewport.Width, d3dviewport.Height);
|
||||
ID3D11DeviceContext_RSSetViewports(data->d3dContext, 1, &d3dviewport);
|
||||
|
||||
data->viewportDirty = false;
|
||||
@@ -2774,13 +2774,13 @@ static SDL_Surface *D3D11_RenderReadPixels(SDL_Renderer *renderer, const SDL_Rec
|
||||
|
||||
renderTargetView = D3D11_GetCurrentRenderTargetView(renderer);
|
||||
if (!renderTargetView) {
|
||||
SDL_SetError("%s, ID3D11DeviceContext::OMGetRenderTargets failed", __FUNCTION__);
|
||||
SDL_SetError("%s, ID3D11DeviceContext::OMGetRenderTargets failed", SDL_FUNCTION);
|
||||
goto done;
|
||||
}
|
||||
|
||||
ID3D11View_GetResource(renderTargetView, (ID3D11Resource **)&backBuffer);
|
||||
if (!backBuffer) {
|
||||
SDL_SetError("%s, ID3D11View::GetResource failed", __FUNCTION__);
|
||||
SDL_SetError("%s, ID3D11View::GetResource failed", SDL_FUNCTION);
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
#include "SDL_shaders_d3d11.h"
|
||||
|
||||
#define SDL_COMPOSE_ERROR(str) SDL_STRINGIFY_ARG(__FUNCTION__) ", " str
|
||||
#define SDL_COMPOSE_ERROR(str) SDL_STRINGIFY_ARG(SDL_FUNCTION) ", " str
|
||||
|
||||
#if SDL_WINAPI_FAMILY_PHONE
|
||||
#error Need to build shaders with level_9_3
|
||||
|
||||
@@ -40,9 +40,9 @@
|
||||
#include "SDL_shaders_d3d12.h"
|
||||
|
||||
#if defined(_MSC_VER) && !defined(__clang__)
|
||||
#define SDL_COMPOSE_ERROR(str) __FUNCTION__ ", " str
|
||||
#define SDL_COMPOSE_ERROR(str) SDL_FUNCTION ", " str
|
||||
#else
|
||||
#define SDL_COMPOSE_ERROR(str) SDL_STRINGIFY_ARG(__FUNCTION__) ", " str
|
||||
#define SDL_COMPOSE_ERROR(str) SDL_STRINGIFY_ARG(SDL_FUNCTION) ", " str
|
||||
#endif
|
||||
|
||||
// Set up for C function definitions, even when using C++
|
||||
@@ -1642,7 +1642,7 @@ static bool D3D12_CreateTexture(SDL_Renderer *renderer, SDL_Texture *texture, SD
|
||||
}
|
||||
|
||||
if (textureFormat == DXGI_FORMAT_UNKNOWN) {
|
||||
return SDL_SetError("%s, An unsupported SDL pixel format (0x%x) was specified", __FUNCTION__, texture->format);
|
||||
return SDL_SetError("%s, An unsupported SDL pixel format (0x%x) was specified", SDL_FUNCTION, texture->format);
|
||||
}
|
||||
|
||||
textureData = (D3D12_TextureData *)SDL_calloc(1, sizeof(*textureData));
|
||||
@@ -2514,7 +2514,7 @@ static bool D3D12_UpdateViewport(SDL_Renderer *renderer)
|
||||
* SDL_CreateRenderer is calling it, and will call it again later
|
||||
* with a non-empty viewport.
|
||||
*/
|
||||
// SDL_Log("%s, no viewport was set!", __FUNCTION__);
|
||||
// SDL_Log("%s, no viewport was set!", SDL_FUNCTION);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -2579,7 +2579,7 @@ static bool D3D12_UpdateViewport(SDL_Renderer *renderer)
|
||||
d3dviewport.Height = orientationAlignedViewport.h;
|
||||
d3dviewport.MinDepth = 0.0f;
|
||||
d3dviewport.MaxDepth = 1.0f;
|
||||
// SDL_Log("%s: D3D viewport = {%f,%f,%f,%f}", __FUNCTION__, d3dviewport.TopLeftX, d3dviewport.TopLeftY, d3dviewport.Width, d3dviewport.Height);
|
||||
// SDL_Log("%s: D3D viewport = {%f,%f,%f,%f}", SDL_FUNCTION, d3dviewport.TopLeftX, d3dviewport.TopLeftY, d3dviewport.Width, d3dviewport.Height);
|
||||
ID3D12GraphicsCommandList_RSSetViewports(data->commandList, 1, &d3dviewport);
|
||||
|
||||
data->viewportDirty = false;
|
||||
|
||||
@@ -26,9 +26,9 @@
|
||||
#include <XGameRuntime.h>
|
||||
|
||||
#if defined(_MSC_VER) && !defined(__clang__)
|
||||
#define SDL_COMPOSE_ERROR(str) __FUNCTION__ ", " str
|
||||
#define SDL_COMPOSE_ERROR(str) SDL_FUNCTION ", " str
|
||||
#else
|
||||
#define SDL_COMPOSE_ERROR(str) SDL_STRINGIFY_ARG(__FUNCTION__) ", " str
|
||||
#define SDL_COMPOSE_ERROR(str) SDL_STRINGIFY_ARG(SDL_FUNCTION) ", " str
|
||||
#endif
|
||||
|
||||
static const GUID SDL_IID_ID3D12Device1 = { 0x77acce80, 0x638e, 0x4e65, { 0x88, 0x95, 0xc1, 0xf2, 0x33, 0x86, 0x86, 0x3e } };
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
#include "SDL_shaders_d3d12.h"
|
||||
|
||||
#define SDL_COMPOSE_ERROR(str) SDL_STRINGIFY_ARG(__FUNCTION__) ", " str
|
||||
#define SDL_COMPOSE_ERROR(str) SDL_STRINGIFY_ARG(SDL_FUNCTION) ", " str
|
||||
|
||||
// The shaders here were compiled with compile_shaders.bat
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
#include "SDL_shaders_d3d12.h"
|
||||
|
||||
#define SDL_COMPOSE_ERROR(str) SDL_STRINGIFY_ARG(__FUNCTION__) ", " str
|
||||
#define SDL_COMPOSE_ERROR(str) SDL_STRINGIFY_ARG(SDL_FUNCTION) ", " str
|
||||
|
||||
// Shader blob headers are generated with a pre-build step using compile_shaders_xbox.bat
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
#include "SDL_shaders_d3d12.h"
|
||||
|
||||
#define SDL_COMPOSE_ERROR(str) SDL_STRINGIFY_ARG(__FUNCTION__) ", " str
|
||||
#define SDL_COMPOSE_ERROR(str) SDL_STRINGIFY_ARG(SDL_FUNCTION) ", " str
|
||||
|
||||
|
||||
// Shader blob headers are generated with a pre-build step using compile_shaders_xbox.bat
|
||||
|
||||
@@ -2631,7 +2631,7 @@ static bool VULKAN_CreateTexture(SDL_Renderer *renderer, SDL_Texture *texture, S
|
||||
}
|
||||
|
||||
if (textureFormat == VK_FORMAT_UNDEFINED) {
|
||||
return SDL_SetError("%s, An unsupported SDL pixel format (0x%x) was specified", __FUNCTION__, texture->format);
|
||||
return SDL_SetError("%s, An unsupported SDL pixel format (0x%x) was specified", SDL_FUNCTION, texture->format);
|
||||
}
|
||||
|
||||
textureData = (VULKAN_TextureData *)SDL_calloc(1, sizeof(*textureData));
|
||||
@@ -3352,7 +3352,7 @@ static bool VULKAN_UpdateViewport(SDL_Renderer *renderer)
|
||||
* SDL_CreateRenderer is calling it, and will call it again later
|
||||
* with a non-empty viewport.
|
||||
*/
|
||||
// SDL_Log("%s, no viewport was set!", __FUNCTION__);
|
||||
// SDL_Log("%s, no viewport was set!", SDL_FUNCTION);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user