Skip to content

Commit

Permalink
Update visual studio version: 2020 -> 2022, Fix #231
Browse files Browse the repository at this point in the history
  • Loading branch information
matanki-saito committed Jul 25, 2022
1 parent a9f6e78 commit 28066ed
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 13 deletions.
4 changes: 2 additions & 2 deletions Plugin/Plugin.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>false</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
Expand Down
8 changes: 4 additions & 4 deletions Plugin64/Plugin64.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,26 +29,26 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
Expand Down
26 changes: 26 additions & 0 deletions Plugin64/file_save.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ namespace FileSave {
void fileSaveProc6();
void fileSaveProc6V130();
void fileSaveProc7();
void fileSaveProc8();
uintptr_t fileSaveProc1ReturnAddress;
uintptr_t fileSaveProc2ReturnAddress;
uintptr_t fileSaveProc2CallAddress;
Expand Down Expand Up @@ -490,6 +491,30 @@ namespace FileSave {
return e;
}

DllError fileSaveProc8Injector(RunOptions options) {
DllError e = {};

switch (options.version) {
case v1_33_3_0:
// nop
BytePattern::temp_instance().find_pattern("90 48 8D 55 0F 48 8D 4D EF E8");
if (BytePattern::temp_instance().has_size(3, u8"ISSUE-231")) {
uintptr_t address = BytePattern::temp_instance().get(2).address();

Injector::MakeRangedNOP(address, address + 0xE);
}
else {
e.fileSave.unmatchdFileSaveProc8Injector = true;
}

break;
default:
e.fileSave.versionFileSaveProc8Injector = true;
}

return e;
}

DllError Init(RunOptions options) {
DllError result = {};

Expand All @@ -502,6 +527,7 @@ namespace FileSave {
result |= fileSaveProc5Injector(options);
result |= fileSaveProc6Injector(options);
result |= fileSaveProc7Injector(options);
result |= fileSaveProc8Injector(options);

return result;
}
Expand Down
6 changes: 5 additions & 1 deletion Plugin64/plugin_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ struct DllError{
bool versionFileSaveProc6Injector : 1;
bool unmatchdFileSaveProc7Injector : 1;
bool versionFileSaveProc7Injector : 1;
bool unmatchdFileSaveProc8Injector : 1;
bool versionFileSaveProc8Injector : 1;
};

std::string print() {
Expand All @@ -117,7 +119,9 @@ struct DllError{
+ PL(unmatchdFileSaveProc6Injector)
+ PL(versionFileSaveProc6Injector)
+ PL(unmatchdFileSaveProc7Injector)
+ PL(versionFileSaveProc7Injector);
+ PL(versionFileSaveProc7Injector)
+ PL(unmatchdFileSaveProc8Injector)
+ PL(versionFileSaveProc8Injector);
}
} fileSave;

Expand Down
4 changes: 2 additions & 2 deletions d3d9/d3d9.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
Expand Down
8 changes: 4 additions & 4 deletions version/version.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,26 +29,26 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
Expand Down

0 comments on commit 28066ed

Please sign in to comment.