From ae886612c5b140f1bc4b122e2e46b4ce2d0447ca Mon Sep 17 00:00:00 2001 From: Christian Semmler Date: Sun, 4 Jan 2026 09:46:53 -0700 Subject: [PATCH] Fix DirectX5 build (#765) --- ISLE/isleapp.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ISLE/isleapp.cpp b/ISLE/isleapp.cpp index 29f8334e..1df09cd8 100644 --- a/ISLE/isleapp.cpp +++ b/ISLE/isleapp.cpp @@ -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);