You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 5, 2025. It is now read-only.
- Move `IDirect3D9Ex_CreateDevice` from server module -> main (device) thread
- Get rid of mutexes server-side
- Get rid of `extern`ed `unordered_map`s in Server module thread
constauto hresult = ((IDirect3D9Ex*) gpD3D)->CreateDeviceEx(IN Adapter, IN DeviceType, IN TRUNCATE_HANDLE(HWND, hFocusWindow), IN BehaviorFlags, IN OUT & PresentationParameters, IN pFullscreenDisplayMode, OUT & pD3DDevice);
325
+
if (!SUCCEEDED(hresult)) {
326
+
std::stringstream ss;
327
+
ss << format_string("CreateDeviceEx() call failed with error code 0x%x", hresult) << std::endl;
328
+
Logger::err(ss.str());
329
+
} else {
330
+
Logger::info("Server side D3D9 DeviceEx created successfully!");
331
+
gpD3DDevices[pHandle] = pD3DDevice;
332
+
remixapi::g_device = pD3DDevice;
333
+
}
334
+
335
+
// Send response back to the client
336
+
Logger::debug("Sending CreateDevice ack response back to client.");
constauto hresult = gpD3D->CreateDevice(IN Adapter, IN DeviceType, IN TRUNCATE_HANDLE(HWND, hFocusWindow), IN BehaviorFlags, IN OUT & PresentationParameters, OUT & pD3DDevice);
357
+
if (!SUCCEEDED(hresult)) {
358
+
std::stringstream ss;
359
+
ss << format_string("CreateDevice() call failed with error code 0x%x", hresult) << std::endl;
360
+
Logger::err(ss.str());
361
+
} else {
362
+
Logger::info("Server side D3D9 Device created successfully!");
constauto hresult = ((IDirect3D9Ex*) gpD3D)->CreateDeviceEx(IN Adapter, IN DeviceType, IN TRUNCATE_HANDLE(HWND, hFocusWindow), IN BehaviorFlags, IN OUT & PresentationParameters, IN pFullscreenDisplayMode, OUT & pD3DDevice);
364
-
if (!SUCCEEDED(hresult)) {
365
-
std::stringstream ss;
366
-
ss << format_string("CreateDeviceEx() call failed with error code 0x%x", hresult) << std::endl;
367
-
Logger::err(ss.str());
368
-
} else {
369
-
Logger::info("Server side D3D9 DeviceEx created successfully!");
370
-
gpD3DDevices[pHandle] = pD3DDevice;
371
-
remixapi::g_device = pD3DDevice;
372
-
}
373
-
374
-
// Send response back to the client
375
-
Logger::debug("Sending CreateDevice ack response back to client.");
constauto hresult = gpD3D->CreateDevice(IN Adapter, IN DeviceType, IN TRUNCATE_HANDLE(HWND, hFocusWindow), IN BehaviorFlags, IN OUT & PresentationParameters, OUT & pD3DDevice);
396
-
if (!SUCCEEDED(hresult)) {
397
-
std::stringstream ss;
398
-
ss << format_string("CreateDevice() call failed with error code 0x%x", hresult) << std::endl;
399
-
Logger::err(ss.str());
400
-
} else {
401
-
Logger::info("Server side D3D9 Device created successfully!");
0 commit comments