Skip to content

Commit 9b789e6

Browse files
committed
Remove ".dll" suffix from LoadModule calls. #78
1 parent c9d84c1 commit 9b789e6

File tree

21 files changed

+42
-45
lines changed

21 files changed

+42
-45
lines changed

src/Layers/xrRender/HW.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,10 @@ void CHW::CreateD3D ()
9898
//#ifndef DEDICATED_SERVER
9999
// LPCSTR _name = "d3d9.dll";
100100
//#else
101-
// LPCSTR _name = "xrd3d9-null.dll";
101+
// LPCSTR _name = "xrD3D9-Null";
102102
//#endif
103103

104-
LPCSTR _name = "xrd3d9-null.dll";
104+
LPCSTR _name = "xrD3D9-Null";
105105

106106
#ifndef _EDITOR
107107
if (!g_dedicated_server)

src/editors/ECore/Editor/Engine.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ void CEngine::Initialize(void)
5151
#ifdef _EDITOR
5252
// Bind PSGP
5353
ZeroMemory (&PSGP,sizeof(PSGP));
54-
hPSGP = LoadLibrary("xrCPU_Pipe.dll");
55-
R_ASSERT2 (hPSGP,"Can't find 'xrCPU_Pipe.dll'");
54+
hPSGP = LoadLibrary("xrCPU_Pipe");
55+
R_ASSERT2 (hPSGP,"Can't find 'xrCPU_Pipe'");
5656

5757
xrBinder* bindCPU = (xrBinder*)GetProcAddress(hPSGP,"xrBind_PSGP"); R_ASSERT(bindCPU);
5858
bindCPU (&PSGP, CPU::ID.feature /*& CPU::ID.os_support*/);

src/editors/LevelEditor/Edit/ESceneSpawnTools.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#include "EditLibrary.h"
1313

1414
static HMODULE hXRSE_FACTORY = 0;
15-
static LPCSTR xrse_factory_library = "xrSE_Factory.dll";
15+
static LPCSTR xrse_factory_library = "xrSE_Factory";
1616
static LPCSTR create_entity_func = "_create_entity@4";
1717
static LPCSTR destroy_entity_func = "_destroy_entity@4";
1818
Tcreate_entity create_entity;

src/utils/xrAI/xrAI.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ int APIENTRY WinMain(HINSTANCE hInstance,
199199
Debug._initialize (false);
200200
Core._initialize ("xrai",0);
201201
HMODULE hFactory;
202-
LPCSTR g_name = "xrSE_Factory.dll";
202+
LPCSTR g_name = "xrSE_Factory";
203203
Log ("Loading DLL:",g_name);
204204
hFactory = LoadLibrary (g_name);
205205
if (0==hFactory) R_CHK (GetLastError());

src/utils/xrLC/xrLC.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ void Startup(LPSTR lpCmdLine)
139139
if (bModifyOptions)
140140
{
141141
Logger.Phase("Project options...");
142-
HMODULE L = LoadLibrary ("xrLC_Options.dll");
142+
HMODULE L = LoadLibrary ("xrLC_Options");
143143
void* P = GetProcAddress (L,"_frmScenePropertiesRun");
144144
R_ASSERT (P);
145145
xrOptions* O = (xrOptions*)P;

src/utils/xrSE_Factory/properties_list_helper_script.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ typedef IPropHelper& (__stdcall *TPHelper) ();
2222

2323
TPHelper _PHelper = 0;
2424
HMODULE prop_helper_module = 0;
25-
LPCSTR prop_helper_library = "xrEPropsB.dll", prop_helper_func = "PHelper";
25+
LPCSTR prop_helper_library = "xrEPropsB", prop_helper_func = "PHelper";
2626
CScriptPropertiesListHelper *g_property_list_helper = 0;
2727

2828
void load_prop_helper ()

src/xrCore/xrCore.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ void xrCore::_initialize(LPCSTR _ApplicationName, LogCallback cb, BOOL init_fs,
4646
string_path fn, dr, di;
4747

4848
// application path
49-
GetModuleFileName(GetModuleHandle(MODULE_NAME), fn, sizeof(fn));
49+
GetModuleFileName(GetModuleHandle("xrCore"), fn, sizeof(fn));
5050
_splitpath(fn, dr, di, 0, 0);
5151
strconcat(sizeof(ApplicationPath), ApplicationPath, dr, di);
5252
#ifndef _EDITOR

src/xrCore/xrCore.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@
102102
#endif
103103

104104
#include <time.h>
105-
#define MODULE_NAME "xrCore.dll"
106105

107106
// Warnings
108107
#pragma warning (disable : 4251 ) // object needs DLL interface

src/xrEngine/Device_Initialize.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ extern LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPar
1212
#ifdef INGAME_EDITOR
1313
void CRenderDevice::initialize_editor()
1414
{
15-
m_editor_module = LoadLibrary("xrWeatherEditor.dll");
15+
m_editor_module = LoadLibrary("xrWeatherEditor");
1616
if (!m_editor_module)
1717
{
18-
Msg("! cannot load library \"xrWeatherEditor.dll\"");
18+
Msg("! cannot load library \"xrWeatherEditor\"");
1919
return;
2020
}
2121
m_editor_initialize = (initialize_function_ptr)GetProcAddress(m_editor_module, "initialize");

src/xrEngine/EngineAPI.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ bool is_enough_address_space_available()
5555

5656
void CEngineAPI::InitializeNotDedicated()
5757
{
58-
LPCSTR r2_name = "xrRender_R2.dll";
59-
LPCSTR r3_name = "xrRender_R3.dll";
60-
LPCSTR r4_name = "xrRender_R4.dll";
58+
LPCSTR r2_name = "xrRender_R2";
59+
LPCSTR r3_name = "xrRender_R3";
60+
LPCSTR r4_name = "xrRender_R4";
6161

6262
if (psDeviceFlags.test(rsR4))
6363
{
@@ -110,7 +110,7 @@ void CEngineAPI::Initialize(void)
110110
{
111111
//////////////////////////////////////////////////////////////////////////
112112
// render
113-
LPCSTR r1_name = "xrRender_R1.dll";
113+
LPCSTR r1_name = "xrRender_R1";
114114

115115
#ifndef DEDICATED_SERVER
116116
InitializeNotDedicated();
@@ -132,7 +132,7 @@ void CEngineAPI::Initialize(void)
132132
}
133133
// game
134134
{
135-
LPCSTR g_name = "xrGame.dll";
135+
LPCSTR g_name = "xrGame";
136136
Log("Loading DLL:", g_name);
137137
hGame = LoadLibrary(g_name);
138138
if (0 == hGame) R_CHK(GetLastError());
@@ -148,7 +148,7 @@ void CEngineAPI::Initialize(void)
148148
tune_enabled = FALSE;
149149
if (strstr(Core.Params, "-tune"))
150150
{
151-
LPCSTR g_name = "vTuneAPI.dll";
151+
LPCSTR g_name = "vTuneAPI";
152152
Log("Loading DLL:", g_name);
153153
hTuner = LoadLibrary(g_name);
154154
if (0 == hTuner) R_CHK(GetLastError());
@@ -197,9 +197,9 @@ void CEngineAPI::CreateRendererList()
197197
bool bSupports_r3 = false;
198198
bool bSupports_r4 = false;
199199

200-
LPCSTR r2_name = "xrRender_R2.dll";
201-
LPCSTR r3_name = "xrRender_R3.dll";
202-
LPCSTR r4_name = "xrRender_R4.dll";
200+
LPCSTR r2_name = "xrRender_R2";
201+
LPCSTR r3_name = "xrRender_R3";
202+
LPCSTR r4_name = "xrRender_R4";
203203

204204
if (strstr(Core.Params, "-perfhud_hack"))
205205
{

0 commit comments

Comments
 (0)