Skip to content

Commit af94340

Browse files
committed
Set the texture to nullptr on reset.
1 parent 9fd3ee6 commit af94340

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

RemoteInput/Platform/NativeHooks_Windows.cxx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1137,7 +1137,8 @@ void HookD3D9Device(IDirect3DDevice9* pDevice, bool force) noexcept
11371137
SAFE_RELEASE(debug_vertex_buffer);
11381138
SAFE_RELEASE(debug_shader);
11391139
SAFE_RELEASE(debug_constant_table);
1140-
SAFE_RELEASE(debug_texture);
1140+
//SAFE_RELEASE(debug_texture);
1141+
debug_texture = nullptr; // Set the texture to null because releasing it crashes on some devices. No idea why :S
11411142

11421143
// Hook EndScene
11431144
auto* endscene = reinterpret_cast<decltype(D3D9Device_EndScene)*>(vTable[42]);

0 commit comments

Comments
 (0)