Commit graph

97 commits

Author SHA1 Message Date
Kaz Wolfe
f63ee5cb76
Merge branch 'master' into imgui-bindings 2025-07-03 19:02:35 -07:00
srkizer
03e728e129
Use EnumerateInvocationList instead of GetInvocationList (#2303) 2025-06-23 22:09:48 +02:00
goaaats
95ec633cc5 merge 2025-06-22 21:39:38 +02:00
Haselnussbomber
2c735e9ec3
Do not throw ObjectDisposedException in IsEnabled and Disable (#2266) 2025-05-09 23:10:35 +02:00
goaaats
731d7e0f6e Un-whether-or-not the codebase 2025-04-25 22:49:05 +02:00
goaaats
672793b6c0 Add hook stress test 2025-04-17 17:23:23 +02:00
goaaats
4e724fbe45 Remove old PInvoke libs 2025-04-15 23:58:01 +02:00
goaaats
fe562e8cf3 Remove most hand-authored native functions 2025-04-12 22:20:55 +02:00
goaaats
ad3b0f0194 Fix some warnings 2025-04-08 22:21:04 +02:00
goaaats
0690cce995 wip bindings upgrade 2025-04-06 20:59:23 +02:00
KazWolfe
577977350f
fix: Attempt to better handle hook disposal (#1803)
- Use a Weak Concurrent Collection to track scoped hooks
- Make `Hook`s remove themselves from the Tracked Hook list.
2025-03-13 22:16:28 +01:00
Soreepeong
ebee2f151e add back DXGISwapChain::on_present hook as default for now 2024-07-25 18:14:06 +09:00
Soreepeong
3215b6dddf Add optional vtable swapchain hook mode 2024-07-23 10:57:09 +09:00
srkizer
1109e64552
Describe address for debugging, change PresentDetour viewport handling (#1943)
* Describe memory address when printed in log/debug utilities

* PresentDetour: Compare against game's internal copy of IDXGISwapChain

* Handle ReShade on_present function signature properly
2024-07-18 21:28:25 +02:00
KazWolfe
0c8c4bfdbf
chore: Remove the [InterfaceVersion] attribute (#1844) 2024-06-16 13:01:17 +02:00
MidoriKami
b5d52732e0
Add hooking overloads (#1820) 2024-06-01 15:04:06 -07:00
goat
448b0d16ea
Add "loading dialog" for service init, unify blocking logic (#1779)
* wip

* hacky fix for overlapping event text in profiler

* move IsResumeGameAfterPluginLoad logic to PluginManager

* fix some warnings

* handle exceptions properly

* remove ability to cancel, rename button to "hide" instead

* undo Dalamud.Service refactor for now

* warnings

* add explainer, show which plugins are still loading

* add some text if loading takes more than 3 minutes

* undo wrong CS merge
2024-04-21 17:28:37 +02:00
Soreepeong
7f5ef03917 Use EarlyLoadedService for anything that is not mandatory for kicking off plugin loader 2024-04-07 21:53:23 +09:00
srkizer
87b9edb448
Add IInternal/PublicDisposableService (#1696)
* Add IInternal/PublicDisposableService

Plugins are exposed interfaces that are not inherited from
`IDisposable`, but services implementing plugin interfaces often
implement `IDisposable`. Some plugins may try to call
`IDisposable.Dispose` on everything provided, and it also is possible to
use `using` clause too eagerly while working on Dalamud itself, such as
writing `using var smth = await Service<SomeService>.GetAsync();`. Such
behaviors often lead to a difficult-to-debug errors, and making those
services either not an `IDisposable` or making `IDisposable.Dispose` do
nothing if the object has been loaded would prevent such errors. As
`ServiceManager` must be the only class dealing with construction and
disposal of services, `IInternalDisposableService` has been added to
limit who can dispose the object. `IPublicDisposableService` also has
been added to classes that can be constructed and accessed directly by
plugins; for those, `Dispose` will be ignored if the instance is a
service instance, and only `DisposeService` will respond.

In addition, `DalamudPluginInterface` and `UiBuilder` also have been
changed so that their `IDisposable.Dispose` no longer respond, and
instead, internal functions have been added to only allow disposal from
Dalamud.

* Cleanup

* Postmerge fixes

* More explanation on RunOnFrameworkThread(ClearHooks)

* Mark ReliableFileStorage public ctor obsolete

---------

Co-authored-by: goat <16760685+goaaats@users.noreply.github.com>
2024-03-16 15:58:05 +00:00
Soreepeong
6fefc3bee0 Safer unload 2023-12-17 15:21:45 +09:00
Soreepeong
0afb3d2c8a Better WndProc handling 2023-12-17 13:59:47 +09:00
Ottermandias
a80ab30b4c
Add a log message for each leaked hook with its address. (#1543) 2023-11-25 12:24:08 -08:00
goat
ebabb7bd04
chore: make SigScanner public, have separate service TargetSigScanner that resolves via ISigScanner (closes #1426) 2023-09-24 01:49:34 +02:00
goat
e31234ffec
prefix methods with Hook to improve clarity 2023-09-21 22:09:38 +02:00
goat
173e9a3144
IHookProvider => IGameInteropProvider 2023-09-21 22:07:09 +02:00
goat
dc16d73baf
Merge branch 'ihookprovider' of github.com:goaaats/Dalamud into ihookprovider 2023-09-21 21:42:48 +02:00
goat
a59875bb77
Merge branch 'v9' into ihookprovider 2023-09-21 21:42:08 +02:00
github-actions[bot]
33868087ed Merge remote-tracking branch 'origin/master' into v9-rollup 2023-09-17 21:52:26 +00:00
MidoriKami
c9a5c7c4c5 Add AddonLifecycle to Self-Test 2023-09-09 20:21:26 -07:00
MidoriKami
4dabd07131 Prototype, untested 2023-09-06 13:08:04 -07:00
goat
3f764d2e40
pass on backend, spelling 2023-08-07 23:57:31 +02:00
goat
fe8ee19175
fix comment 2023-08-06 21:08:49 +02:00
goat
e1da238cb5
feat: IHookProvider service, no more static hook creation 2023-08-06 20:58:55 +02:00
goat
458ae57918
refactor: remove Hook<T>.compatHookImpl, make abstract 2023-08-04 21:52:57 +02:00
Ava Chaney
2e0e46384c Merge branch 'master' into v9 2023-06-18 00:45:43 -07:00
goat
166301f56f
fix warnings in Dalamud 2023-06-09 23:38:13 +02:00
nebel
60a29e36c2
Create RegisterUnhooker overload 2023-06-04 02:49:59 +09:00
nebel
429316747d
Add minBytes and maxBytes to Unhooker 2023-06-04 01:48:18 +09:00
nebel
64fddf10bb
Improve unhooking of hooked functions 2023-06-03 23:23:38 +09:00
Ava Chaney
276ad3733f cleanup: remove obsolete Hook ctors 2023-05-27 17:19:14 -07:00
Soreepeong
325b3d551d FunctionPointerVariableHook: use VirtualAlloc instead of HeapAlloc 2023-03-20 00:43:54 +09:00
Soreepeong
8aea170479 Use UsedImplicitly instead of resharper comments 2023-03-10 22:54:57 +09:00
Soreepeong
f16628beb0 another fix 2023-03-10 22:53:48 +09:00
Soreepeong
9ee8ad67b4 Fix import hook 2023-03-10 22:29:10 +09:00
Soreepeong
c0954035da Fail fast on trying to dispose import hook that has been overwritten by something else 2023-03-10 13:12:54 +09:00
Andrew Gilewsky
319ec14766 Fix Hook constructor not assigning address to a field. 2023-01-18 20:21:06 +02:00
goat
987ff8dc8f
chore: convert Dalamud to file-scoped namespaces 2022-10-29 15:23:22 +02:00
goat
b093323acc
chore: warnings pass 2022-10-29 15:19:52 +02:00
goat
2cfb9cc706
deps: switch to goaaats.Reloaded.Hooks until concurrency fix is upstreamed
7d03dac73d
2022-07-18 18:55:56 +02:00
goat
3de56c992f
fix: activate reloaded hook immediately after instantiation 2022-07-17 23:11:46 +02:00