Skip to content

Commit

Permalink
Merge branch 'praydog:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
joeyhodge authored May 26, 2024
2 parents 2250af9 + 654bac5 commit ae70e36
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/mods/LooseFileLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -268,13 +268,26 @@ bool LooseFileLoader::handle_path(const wchar_t* path, size_t hash) {
return false;
}

#if TDB_VER > 67
uint64_t LooseFileLoader::path_to_hash_hook(const wchar_t* path) {
#else
uint64_t LooseFileLoader::path_to_hash_hook(void* This, const wchar_t* path) {
#endif
const auto og = g_loose_file_loader->m_path_to_hash_hook->get_original<decltype(path_to_hash_hook)>();

#if TDB_VER > 67
const auto result = og(path);
#else
const auto result = og(This, path);
#endif

// true to skip.
if (g_loose_file_loader->handle_path(path, result)) {
#if TDB_VER > 67
return 4294967296;
#else
return 0xFFFFFFFF;
#endif
}

return result;
Expand Down
5 changes: 5 additions & 0 deletions src/mods/LooseFileLoader.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,12 @@ class LooseFileLoader : public Mod {
private:
void hook();
bool handle_path(const wchar_t* path, size_t hash);

#if TDB_VER > 67
static uint64_t path_to_hash_hook(const wchar_t* path);
#else
static uint64_t path_to_hash_hook(void* This, const wchar_t* path);
#endif

bool m_hook_success{false};
bool m_attempted_hook{false};
Expand Down
3 changes: 3 additions & 0 deletions src/mods/VR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3062,14 +3062,17 @@ void VR::on_end_rendering(void* entry) {
"UpdateMovie", // Causes movies to play twice as fast if ran again
"UpdateSpeedTree",
"UpdateHansoft",
"UpdatePuppet",
// The dynamics stuff causes a cloth physics step in the right eye
"BeginRenderingDynamics",
"BeginDynamics",
"EndRenderingDynamics",
"EndDynamics",
"EndPhysics",
"RenderDynamics",
#ifndef DD2
"RenderLandscape",
#endif
"DevelopRenderer",
"DrawWidget"
};
Expand Down

0 comments on commit ae70e36

Please sign in to comment.