Skip to content

Commit

Permalink
winwrap更新
Browse files Browse the repository at this point in the history
  • Loading branch information
ePi5131 committed Jul 23, 2023
1 parent daf519b commit 33dddfa
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion patch/global_minimum.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include <bit>
#include <cstdint>
#include <Windows.h>
#include <winwrap.hpp>

namespace GLOBAL {
inline HMODULE aviutl_hmod;
Expand All @@ -25,6 +26,6 @@ namespace GLOBAL {

inline void init_minimum(HINSTANCE patch_hmod) {
GLOBAL::patchaul_hinst = patch_hmod;
GLOBAL::aviutl_base = std::bit_cast<uint32_t>(GetModuleHandleA(NULL));
GLOBAL::aviutl_base = std::bit_cast<uint32_t>(WinWrap::Module::getCallingProcessModule());
}
}
2 changes: 1 addition & 1 deletion patch/patch_exception_log.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ namespace patch {

public:
void operator()() {
log_dir = WinWrap::Module{}.getFileNameW();
log_dir = WinWrap::Module::getCallingProcessModule().getFileNameW();
log_dir.resize(log_dir.find_last_of(L"/\\") + 1);
log_dir += L"log\\";

Expand Down
2 changes: 1 addition & 1 deletion patch/patch_warning_duplicate_plugins.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ static bool warning_duplicate_message(


static HMODULE warning_duplicate_common(path_cache& map, LPCSTR lpLibFileName) {
static auto exe_dir = std::filesystem::path{ WinWrap::Module{GetModuleHandleA(NULL)}.getFileNameW() }.parent_path();
static auto exe_dir = std::filesystem::path{ WinWrap::Module::getCallingProcessModule().getFileNameW() }.parent_path();

const std::filesystem::path arg_path{ lpLibFileName };
const auto arg_filename = arg_path.filename();
Expand Down
2 changes: 1 addition & 1 deletion patch/winwrap

0 comments on commit 33dddfa

Please sign in to comment.