mirror of https://github.com/encounter/SDL.git
SDL_render_d3d12.c: Fix uninitialized warning for CreateEventExFunc
This commit is contained in:
parent
d86cb8ec9e
commit
c23fb235c8
|
@ -757,6 +757,7 @@ D3D12_CreateDeviceResources(SDL_Renderer* renderer)
|
||||||
/* CreateEventEx() arrived in Vista, so we need to load it with GetProcAddress for XP. */
|
/* CreateEventEx() arrived in Vista, so we need to load it with GetProcAddress for XP. */
|
||||||
{
|
{
|
||||||
HMODULE kernel32 = GetModuleHandle(TEXT("kernel32.dll"));
|
HMODULE kernel32 = GetModuleHandle(TEXT("kernel32.dll"));
|
||||||
|
CreateEventExFunc = NULL;
|
||||||
if (kernel32) {
|
if (kernel32) {
|
||||||
CreateEventExFunc = (PFN_CREATE_EVENT_EX) GetProcAddress(kernel32, "CreateEventExW");
|
CreateEventExFunc = (PFN_CREATE_EVENT_EX) GetProcAddress(kernel32, "CreateEventExW");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue