check for null device

Check to make sure device is null before creating it, avoids losing device due to unneeded recreation
This commit is contained in:
medievil1 2021-04-23 17:20:11 -04:00
parent e6e0d5da9e
commit cf8f2628c0
1 changed files with 5 additions and 0 deletions

View File

@ -3028,6 +3028,11 @@ void Direct3D_CreateDevice_Start
// create default device *before* calling Xbox Direct3D_CreateDevice trampoline
// to avoid hitting EMUPATCH'es that need a valid g_pD3DDevice
if (g_pD3DDevice != nullptr) { // Check to make sure device is null, otherwise no need to create it
return;
}
CreateDefaultD3D9Device(pPresentationParameters);
}