Fixed warning C4152: nonstandard extension, function/data pointer conversion in expression
parent
9fc1135e3b
commit
b566bfce07
|
@ -120,7 +120,7 @@ void WIN_CoUninitialize(void)
|
|||
}
|
||||
|
||||
#ifndef __WINRT__
|
||||
void *WIN_LoadComBaseFunction(const char *name)
|
||||
FARPROC WIN_LoadComBaseFunction(const char *name)
|
||||
{
|
||||
static SDL_bool s_bLoaded;
|
||||
static HMODULE s_hComBase;
|
||||
|
|
|
@ -134,7 +134,7 @@ extern int WIN_SetError(const char *prefix);
|
|||
|
||||
#ifndef __WINRT__
|
||||
/* Load a function from combase.dll */
|
||||
void *WIN_LoadComBaseFunction(const char *name);
|
||||
FARPROC WIN_LoadComBaseFunction(const char *name);
|
||||
#endif
|
||||
|
||||
/* Wrap up the oddities of CoInitialize() into a common function. */
|
||||
|
|
|
@ -60,7 +60,7 @@ void *SDL_LoadObject(const char *sofile)
|
|||
|
||||
SDL_FunctionPointer SDL_LoadFunction(void *handle, const char *name)
|
||||
{
|
||||
void *symbol = (void *)GetProcAddress((HMODULE)handle, name);
|
||||
SDL_FunctionPointer symbol = (SDL_FunctionPointer)GetProcAddress((HMODULE)handle, name);
|
||||
if (!symbol) {
|
||||
char errbuf[512];
|
||||
SDL_strlcpy(errbuf, "Failed loading ", SDL_arraysize(errbuf));
|
||||
|
|
|
@ -69,7 +69,7 @@ struct SDL_Thread
|
|||
int(SDLCALL *userfunc)(void *);
|
||||
void *userdata;
|
||||
void *data;
|
||||
void *endfunc; /* only used on some platforms. */
|
||||
SDL_FunctionPointer endfunc; /* only used on some platforms. */
|
||||
};
|
||||
|
||||
/* This is the function called to run a thread */
|
||||
|
|
|
@ -82,7 +82,7 @@ int SDL_SYS_CreateThread(SDL_Thread *thread)
|
|||
const DWORD flags = thread->stacksize ? STACK_SIZE_PARAM_IS_A_RESERVATION : 0;
|
||||
|
||||
/* Save the function which we will have to call to clear the RTL of calling app! */
|
||||
thread->endfunc = pfnEndThread;
|
||||
thread->endfunc = (SDL_FunctionPointer)pfnEndThread;
|
||||
|
||||
/* thread->stacksize == 0 means "system default", same as win32 expects */
|
||||
if (pfnBeginThread) {
|
||||
|
|
|
@ -271,7 +271,7 @@ int SDL_CalculateBlit(SDL_Surface *surface)
|
|||
blit = SDL_Blit_Slow;
|
||||
}
|
||||
}
|
||||
map->data = blit;
|
||||
map->data = (void *)blit;
|
||||
|
||||
/* Make sure we have a blit function */
|
||||
if (!blit) {
|
||||
|
|
|
@ -214,13 +214,13 @@ int WIN_GL_LoadLibrary(SDL_VideoDevice *_this, const char *path)
|
|||
|
||||
SDL_FunctionPointer WIN_GL_GetProcAddress(SDL_VideoDevice *_this, const char *proc)
|
||||
{
|
||||
void *func;
|
||||
SDL_FunctionPointer func;
|
||||
|
||||
/* This is to pick up extensions */
|
||||
func = _this->gl_data->wglGetProcAddress(proc);
|
||||
func = (SDL_FunctionPointer)_this->gl_data->wglGetProcAddress(proc);
|
||||
if (!func) {
|
||||
/* This is probably a normal GL function */
|
||||
func = GetProcAddress(_this->gl_config.dll_handle, proc);
|
||||
func = (SDL_FunctionPointer)GetProcAddress(_this->gl_config.dll_handle, proc);
|
||||
}
|
||||
return func;
|
||||
}
|
||||
|
|
|
@ -65,9 +65,9 @@ int WIN_Vulkan_LoadLibrary(SDL_VideoDevice *_this, const char *path)
|
|||
if (!vkGetInstanceProcAddr) {
|
||||
goto fail;
|
||||
}
|
||||
_this->vulkan_config.vkGetInstanceProcAddr = (void *)vkGetInstanceProcAddr;
|
||||
_this->vulkan_config.vkGetInstanceProcAddr = (SDL_FunctionPointer)vkGetInstanceProcAddr;
|
||||
_this->vulkan_config.vkEnumerateInstanceExtensionProperties =
|
||||
(void *)((PFN_vkGetInstanceProcAddr)_this->vulkan_config.vkGetInstanceProcAddr)(
|
||||
(SDL_FunctionPointer)vkGetInstanceProcAddr(
|
||||
VK_NULL_HANDLE, "vkEnumerateInstanceExtensionProperties");
|
||||
if (!_this->vulkan_config.vkEnumerateInstanceExtensionProperties) {
|
||||
goto fail;
|
||||
|
|
Loading…
Reference in New Issue