SDL_render_d3d12.c: Fix uninitialized warning for CreateEventExFunc

This commit is contained in:
Ozkan Sezer 2022-09-16 17:20:56 +03:00
parent d86cb8ec9e
commit c23fb235c8
1 changed files with 1 additions and 0 deletions

View File

@ -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");
} }