Skip to content
This repository was archived by the owner on Jan 1, 2025. It is now read-only.

Commit 6f5d41a

Browse files
authored
VS 2019 compatibility fixes (#52)
* Split out Options, simplify KeyBinds * Split out everything * More cleaning * Move dynamic imports to init * Fix const char errors * Update all python scripts * Remove extra file
1 parent 20b7dc4 commit 6f5d41a

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

PythonSDK.vcxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,11 +186,11 @@
186186
<PropertyGroup Label="UserMacros" />
187187
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
188188
<LinkIncremental>true</LinkIncremental>
189-
<TargetName>PythonSDK</TargetName>
189+
<TargetName>ddraw</TargetName>
190190
<PreBuildEventUseInBuild>false</PreBuildEventUseInBuild>
191191
<IncludePath>$(PYTHONPATH)\include;$(IncludePath);$(VC_SourcePath)\src\include;</IncludePath>
192192
<LibraryPath>$(PYTHONPATH)\libs;$(LibraryPath)</LibraryPath>
193-
<OutDir>C:\Program Files (x86)\Steam\steamapps\common\Borderlands 2\Binaries\Win32\Plugins\</OutDir>
193+
<OutDir>C:\Program Files (x86)\Steam\steamapps\common\Borderlands 2\Binaries\Win32\</OutDir>
194194
<IntDir>build\$(Configuration)\</IntDir>
195195
<SourcePath>$(VC_SourcePath)\src;</SourcePath>
196196
</PropertyGroup>

src/CPythonInterface.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ bool VerifyPythonFunction(py::object funcHook, const char** expectedKeys) {
3535
}
3636
for (int x = 0; x < PyList_GET_SIZE(Keys) - 1; x++) {
3737
PyObject *Key = PyList_GET_ITEM(Keys, x);
38-
char *KeyString = PyUnicode_AsUTF8AndSize(Key, 0);
38+
const char *KeyString = PyUnicode_AsUTF8AndSize(Key, 0);
3939
if (strcmp(KeyString, expectedKeys[x]))
4040
{
4141
Logging::LogF("[Error] Got unexpected argument '%s'. Expected '%s'.\n", KeyString, expectedKeys[x]);

src/include/stdafx.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ namespace pybind11 {
320320
if (!isinstance<sequence>(src))
321321
return false;
322322
PyObject *source = src.ptr();
323-
char *tmp = PyUnicode_AsUTF8AndSize(source, nullptr);
323+
const char *tmp = PyUnicode_AsUTF8AndSize(source, nullptr);
324324
if (!tmp)
325325
return false;
326326
value = FString(tmp);
@@ -346,7 +346,7 @@ namespace pybind11 {
346346
if (!isinstance<sequence>(src))
347347
return false;
348348
PyObject *source = src.ptr();
349-
char *tmp = PyUnicode_AsUTF8AndSize(source, nullptr);
349+
const char *tmp = PyUnicode_AsUTF8AndSize(source, nullptr);
350350
if (!tmp)
351351
return false;
352352
value = UObject::FindClass(tmp, false);
@@ -369,7 +369,7 @@ namespace pybind11 {
369369
if (!isinstance<sequence>(src))
370370
return false;
371371
PyObject *source = src.ptr();
372-
char *tmp = PyUnicode_AsUTF8AndSize(source, nullptr);
372+
const char *tmp = PyUnicode_AsUTF8AndSize(source, nullptr);
373373
if (!tmp)
374374
return false;
375375
value = FName(tmp);

0 commit comments

Comments
 (0)