mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-08-30 18:41:38 +00:00
Use consistent style for pointer declarations and casts
This commit is contained in:
@@ -46,7 +46,7 @@ HICON CreateIconFromSurface(SDL_Surface *surface)
|
||||
bmpInfo.bmiHeader.biCompression = BI_RGB;
|
||||
|
||||
HDC hdc = GetDC(NULL);
|
||||
void* pBits = NULL;
|
||||
void *pBits = NULL;
|
||||
HBITMAP hBitmap = CreateDIBSection(hdc, &bmpInfo, DIB_RGB_COLORS, &pBits, NULL, 0);
|
||||
if (!hBitmap) {
|
||||
ReleaseDC(NULL, hdc);
|
||||
|
||||
@@ -185,7 +185,7 @@ done:
|
||||
|
||||
static void CALLBACK GAMEINPUT_InternalDeviceCallback(
|
||||
_In_ GameInputCallbackToken callbackToken,
|
||||
_In_ void* context,
|
||||
_In_ void *context,
|
||||
_In_ IGameInputDevice *pDevice,
|
||||
_In_ uint64_t timestamp,
|
||||
_In_ GameInputDeviceStatus currentStatus,
|
||||
@@ -594,7 +594,7 @@ void WIN_QuitGameInput(SDL_VideoDevice *_this)
|
||||
|
||||
#else // !HAVE_GAMEINPUT_H
|
||||
|
||||
bool WIN_InitGameInput(SDL_VideoDevice* _this)
|
||||
bool WIN_InitGameInput(SDL_VideoDevice *_this)
|
||||
{
|
||||
return SDL_Unsupported();
|
||||
}
|
||||
@@ -604,12 +604,12 @@ bool WIN_UpdateGameInputEnabled(SDL_VideoDevice *_this)
|
||||
return SDL_Unsupported();
|
||||
}
|
||||
|
||||
void WIN_UpdateGameInput(SDL_VideoDevice* _this)
|
||||
void WIN_UpdateGameInput(SDL_VideoDevice *_this)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
void WIN_QuitGameInput(SDL_VideoDevice* _this)
|
||||
void WIN_QuitGameInput(SDL_VideoDevice *_this)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -696,8 +696,8 @@ static void ReadMouseCurve(int v, Uint64 xs[5], Uint64 ys[5])
|
||||
ys[0] = 0; // first node must always be origin
|
||||
int i;
|
||||
for (i = 1; i < 5; i++) {
|
||||
xs[i] = (7 * (Uint64)xbuff[i*2]);
|
||||
ys[i] = (v * (Uint64)ybuff[i*2]) << 17;
|
||||
xs[i] = (7 * (Uint64)xbuff[i * 2]);
|
||||
ys[i] = (v * (Uint64)ybuff[i * 2]) << 17;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -168,8 +168,8 @@ static SDL_VideoDevice *WIN_CreateDevice(void)
|
||||
data->GetDpiForWindow = (UINT (WINAPI *)(HWND))SDL_LoadFunction(data->userDLL, "GetDpiForWindow");
|
||||
data->AreDpiAwarenessContextsEqual = (BOOL (WINAPI *)(DPI_AWARENESS_CONTEXT, DPI_AWARENESS_CONTEXT))SDL_LoadFunction(data->userDLL, "AreDpiAwarenessContextsEqual");
|
||||
data->IsValidDpiAwarenessContext = (BOOL (WINAPI *)(DPI_AWARENESS_CONTEXT))SDL_LoadFunction(data->userDLL, "IsValidDpiAwarenessContext");
|
||||
data->GetDisplayConfigBufferSizes = (LONG (WINAPI *)(UINT32,UINT32*,UINT32* ))SDL_LoadFunction(data->userDLL, "GetDisplayConfigBufferSizes");
|
||||
data->QueryDisplayConfig = (LONG (WINAPI *)(UINT32,UINT32*,DISPLAYCONFIG_PATH_INFO*,UINT32*,DISPLAYCONFIG_MODE_INFO*,DISPLAYCONFIG_TOPOLOGY_ID*))SDL_LoadFunction(data->userDLL, "QueryDisplayConfig");
|
||||
data->GetDisplayConfigBufferSizes = (LONG (WINAPI *)(UINT32,UINT32 *,UINT32 *))SDL_LoadFunction(data->userDLL, "GetDisplayConfigBufferSizes");
|
||||
data->QueryDisplayConfig = (LONG (WINAPI *)(UINT32,UINT32 *,DISPLAYCONFIG_PATH_INFO*,UINT32 *,DISPLAYCONFIG_MODE_INFO*,DISPLAYCONFIG_TOPOLOGY_ID*))SDL_LoadFunction(data->userDLL, "QueryDisplayConfig");
|
||||
data->DisplayConfigGetDeviceInfo = (LONG (WINAPI *)(DISPLAYCONFIG_DEVICE_INFO_HEADER*))SDL_LoadFunction(data->userDLL, "DisplayConfigGetDeviceInfo");
|
||||
data->GetPointerType = (BOOL (WINAPI *)(UINT32, POINTER_INPUT_TYPE *))SDL_LoadFunction(data->userDLL, "GetPointerType");
|
||||
data->GetPointerPenInfo = (BOOL (WINAPI *)(UINT32, POINTER_PEN_INFO *))SDL_LoadFunction(data->userDLL, "GetPointerPenInfo");
|
||||
@@ -624,7 +624,7 @@ bool D3D_LoadDLL(void **pD3DDLL, IDirect3D9 **pDirect3D9Interface)
|
||||
if (*pD3DDLL) {
|
||||
/* *INDENT-OFF* */ // clang-format off
|
||||
typedef IDirect3D9 *(WINAPI *Direct3DCreate9_t)(UINT SDKVersion);
|
||||
typedef HRESULT (WINAPI* Direct3DCreate9Ex_t)(UINT SDKVersion, IDirect3D9Ex** ppD3D);
|
||||
typedef HRESULT (WINAPI* Direct3DCreate9Ex_t)(UINT SDKVersion, IDirect3D9Ex **ppD3D);
|
||||
/* *INDENT-ON* */ // clang-format on
|
||||
Direct3DCreate9_t Direct3DCreate9Func;
|
||||
|
||||
|
||||
@@ -448,8 +448,8 @@ struct SDL_VideoData
|
||||
BOOL (WINAPI *AreDpiAwarenessContextsEqual)(DPI_AWARENESS_CONTEXT, DPI_AWARENESS_CONTEXT);
|
||||
BOOL (WINAPI *IsValidDpiAwarenessContext)(DPI_AWARENESS_CONTEXT);
|
||||
// DisplayConfig functions
|
||||
LONG (WINAPI *GetDisplayConfigBufferSizes)( UINT32, UINT32*, UINT32* );
|
||||
LONG (WINAPI *QueryDisplayConfig)( UINT32, UINT32*, DISPLAYCONFIG_PATH_INFO*, UINT32*, DISPLAYCONFIG_MODE_INFO*, DISPLAYCONFIG_TOPOLOGY_ID*);
|
||||
LONG (WINAPI *GetDisplayConfigBufferSizes)( UINT32, UINT32 *, UINT32 *);
|
||||
LONG (WINAPI *QueryDisplayConfig)( UINT32, UINT32 *, DISPLAYCONFIG_PATH_INFO*, UINT32 *, DISPLAYCONFIG_MODE_INFO*, DISPLAYCONFIG_TOPOLOGY_ID*);
|
||||
LONG (WINAPI *DisplayConfigGetDeviceInfo)( DISPLAYCONFIG_DEVICE_INFO_HEADER*);
|
||||
/* *INDENT-ON* */ // clang-format on
|
||||
|
||||
|
||||
@@ -110,8 +110,7 @@ void WIN_Vulkan_UnloadLibrary(SDL_VideoDevice *_this)
|
||||
}
|
||||
}
|
||||
|
||||
char const* const* WIN_Vulkan_GetInstanceExtensions(SDL_VideoDevice *_this,
|
||||
Uint32 *count)
|
||||
char const * const *WIN_Vulkan_GetInstanceExtensions(SDL_VideoDevice *_this, Uint32 *count)
|
||||
{
|
||||
static const char *const extensionsForWin32[] = {
|
||||
VK_KHR_SURFACE_EXTENSION_NAME, VK_KHR_WIN32_SURFACE_EXTENSION_NAME
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
extern bool WIN_Vulkan_LoadLibrary(SDL_VideoDevice *_this, const char *path);
|
||||
extern void WIN_Vulkan_UnloadLibrary(SDL_VideoDevice *_this);
|
||||
extern char const* const* WIN_Vulkan_GetInstanceExtensions(SDL_VideoDevice *_this, Uint32 *count);
|
||||
extern char const * const *WIN_Vulkan_GetInstanceExtensions(SDL_VideoDevice *_this, Uint32 *count);
|
||||
extern bool WIN_Vulkan_CreateSurface(SDL_VideoDevice *_this,
|
||||
SDL_Window *window,
|
||||
VkInstance instance,
|
||||
|
||||
@@ -186,7 +186,7 @@ static DWORD GetWindowStyleEx(SDL_Window *window)
|
||||
}
|
||||
|
||||
#ifdef HAVE_SHOBJIDL_CORE_H
|
||||
static ITaskbarList3 *GetTaskbarList(SDL_Window* window)
|
||||
static ITaskbarList3 *GetTaskbarList(SDL_Window *window)
|
||||
{
|
||||
const SDL_WindowData *data = window->internal;
|
||||
SDL_assert(data->taskbar_button_created);
|
||||
@@ -2264,7 +2264,7 @@ bool WIN_FlashWindow(SDL_VideoDevice *_this, SDL_Window *window, SDL_FlashOperat
|
||||
return true;
|
||||
}
|
||||
|
||||
bool WIN_ApplyWindowProgress(SDL_VideoDevice *_this, SDL_Window* window)
|
||||
bool WIN_ApplyWindowProgress(SDL_VideoDevice *_this, SDL_Window *window)
|
||||
{
|
||||
#ifdef HAVE_SHOBJIDL_CORE_H
|
||||
SDL_WindowData *data = window->internal;
|
||||
|
||||
Reference in New Issue
Block a user