Skip to content

Commit

Permalink
Actually init Remix API
Browse files Browse the repository at this point in the history
- Guard remix initialization in device thread by remix api exposure option
- Register most recent device with RemixApi
  • Loading branch information
nv-nfreybler committed Sep 19, 2024
2 parents e35aa2b + 08f9657 commit 6f20bf7
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/server/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,10 @@ void ProcessDeviceCommandQueue() {
} else {
Logger::info("Server side D3D9 DeviceEx created successfully!");
gpD3DDevices[pHandle] = pD3DDevice;
remixapi::g_device = pD3DDevice;
if(GlobalOptions::getExposeRemixApi()) {
remixapi::g_device = pD3DDevice;
remixapi::g_remix.dxvk_RegisterD3D9Device(remixapi::g_device);
}
}

// Send response back to the client
Expand Down Expand Up @@ -361,7 +364,10 @@ void ProcessDeviceCommandQueue() {
} else {
Logger::info("Server side D3D9 Device created successfully!");
gpD3DDevices[pHandle] = (IDirect3DDevice9Ex*) pD3DDevice;
remixapi::g_device = (IDirect3DDevice9Ex*) pD3DDevice;
if(GlobalOptions::getExposeRemixApi()) {
remixapi::g_device = (IDirect3DDevice9Ex*) pD3DDevice;
remixapi::g_remix.dxvk_RegisterD3D9Device(remixapi::g_device);
}
}

// Send response back to the client
Expand Down

0 comments on commit 6f20bf7

Please sign in to comment.