Fix DirectX5 build (#765)

This commit is contained in:
Christian Semmler 2026-01-04 09:46:53 -07:00 committed by GitHub
parent e4690a57b8
commit ae886612c5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -480,10 +480,13 @@ SDL_AppResult SDL_AppEvent(void* appstate, SDL_Event* event)
case SDL_EVENT_FINGER_UP:
case SDL_EVENT_FINGER_CANCELED:
IDirect3DRMMiniwinDevice* device = GetD3DRMMiniwinDevice();
if (device && !device->ConvertEventToRenderCoordinates(event)) {
SDL_Log("Failed to convert event coordinates: %s", SDL_GetError());
if (device) {
if (!device->ConvertEventToRenderCoordinates(event)) {
SDL_Log("Failed to convert event coordinates: %s", SDL_GetError());
}
device->Release();
}
device->Release();
#ifdef __EMSCRIPTEN__
Emscripten_ConvertEventToRenderCoordinates(event);