mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 10:17:22 +01:00
Add option to use global import hook instead of MinHook for OpenProcess (#860)
This commit is contained in:
parent
d1e69ed6fd
commit
c5f84eb27d
13 changed files with 775 additions and 165 deletions
|
|
@ -3,8 +3,23 @@
|
|||
#include "utils.h"
|
||||
|
||||
namespace bootconfig {
|
||||
inline bool is_wait_messagebox() {
|
||||
return utils::get_env<bool>(L"DALAMUD_WAIT_MESSAGEBOX");
|
||||
enum WaitMessageboxFlags : int {
|
||||
None = 0,
|
||||
BeforeInitialize = 1 << 0,
|
||||
BeforeDalamudEntrypoint = 1 << 1,
|
||||
};
|
||||
|
||||
inline WaitMessageboxFlags wait_messagebox() {
|
||||
return static_cast<WaitMessageboxFlags>(utils::get_env<int>(L"DALAMUD_WAIT_MESSAGEBOX"));
|
||||
}
|
||||
|
||||
enum DotNetOpenProcessHookMode : int {
|
||||
ImportHooks = 0,
|
||||
DirectHook = 1,
|
||||
};
|
||||
|
||||
inline DotNetOpenProcessHookMode dotnet_openprocess_hook_mode() {
|
||||
return static_cast<DotNetOpenProcessHookMode>(utils::get_env<int>(L"DALAMUD_DOTNET_OPENPROCESS_HOOKMODE"));
|
||||
}
|
||||
|
||||
inline bool is_show_console() {
|
||||
|
|
@ -20,6 +35,18 @@ namespace bootconfig {
|
|||
}
|
||||
|
||||
inline bool is_veh_full() {
|
||||
return utils::get_env<bool>("DALAMUD_IS_VEH_FULL");
|
||||
return utils::get_env<bool>(L"DALAMUD_IS_VEH_FULL");
|
||||
}
|
||||
|
||||
inline bool gamefix_is_enabled(const wchar_t* name) {
|
||||
static const auto list = utils::get_env_list<std::wstring>(L"DALAMUD_GAMEFIX_LIST");
|
||||
for (const auto& item : list)
|
||||
if (item == name)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
inline std::vector<std::wstring> gamefix_unhookdll_list() {
|
||||
return utils::get_env_list<std::wstring>(L"DALAMUD_UNHOOK_DLLS");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue