@@ -41,7 +41,6 @@ CEngineAPI::~CEngineAPI()
4141}
4242
4343extern u32 renderer_value; // con cmd
44- ENGINE_API int g_current_renderer = 0 ;
4544
4645bool is_enough_address_space_available ()
4746{
@@ -54,26 +53,23 @@ void CEngineAPI::InitializeNotDedicated()
5453{
5554 if (psDeviceFlags.test (rsR4))
5655 {
57-
5856 if (hRenderR4->exist ())
5957 {
60- g_current_renderer = 4 ;
58+ GEnv. CurrentRenderer = 4 ;
6159 GEnv.SetupCurrentRenderer = GEnv.SetupR4 ;
6260 }
6361 else
6462 {
6563 psDeviceFlags.set (rsR4, false );
6664 psDeviceFlags.set (rsR3, true );
6765 }
68-
69-
7066 }
7167
7268 if (psDeviceFlags.test (rsR3))
7369 {
7470 if (hRenderR3->exist ())
7571 {
76- g_current_renderer = 3 ;
72+ GEnv. CurrentRenderer = 3 ;
7773 GEnv.SetupCurrentRenderer = GEnv.SetupR3 ;
7874 }
7975 else
@@ -85,10 +81,9 @@ void CEngineAPI::InitializeNotDedicated()
8581
8682 if (psDeviceFlags.test (rsR2))
8783 {
88-
8984 if (hRenderR2->exist ())
9085 {
91- g_current_renderer = 2 ;
86+ GEnv. CurrentRenderer = 2 ;
9287 GEnv.SetupCurrentRenderer = GEnv.SetupR2 ;
9388 }
9489 else
@@ -105,7 +100,7 @@ void CEngineAPI::InitializeRenderers()
105100 {
106101 R_ASSERT (hRenderR1);
107102 renderer_value = 0 ; // con cmd
108- g_current_renderer = 1 ;
103+ GEnv. CurrentRenderer = 1 ;
109104 GEnv.SetupCurrentRenderer = GEnv.SetupR1 ;
110105 }
111106
@@ -117,9 +112,6 @@ void CEngineAPI::InitializeRenderers()
117112void CEngineAPI::Initialize (void )
118113{
119114 hGame = std::make_unique<XRay::Module>(" xrGame" );
120-
121- if (!hGame->exist ())
122- R_CHK (GetLastError ());
123115 R_ASSERT2 (hGame, " Game DLL raised exception during loading or there is no game DLL at all" );
124116
125117 pCreate = (Factory_Create*)hGame->getProcAddress (" xrFactory_Create" );
0 commit comments