Commit graph

117 commits

Author SHA1 Message Date
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
NostraThomas99
9d9326fd6d
Add support for PCT and VPR to Dalamud.Game.ClientState.JobGauge (#1890)
Added PCTGauge and VPRGauge to the job gauge definitions. Also updated JobGauge widget to support VPR and PCT.
2024-07-05 10:28:24 +02:00
srkizer
7a90921358
ISIT: remove api9 compat, IDAM: make Empty4X4 transparent (#1877)
* Remove api9 compat from texture stuff

* Make Empty4X4 actually transparent
2024-07-03 18:51:23 +02:00
Infi
3e950b09fe
Update MarketBoard related packet structs (#1868)
* Update MarketBoardHistory

* Update MarketBoardCurrentOfferings

* small fix

* Update other structs & update widget

* Mark obsolete fields as internal
2024-06-30 00:18:47 +02:00
goat
1d1b60b011 api10 todo: move IDalamudTextureWrap to Dalamud.Interface.Textures.TextureWraps 2024-06-29 00:45:16 +02:00
Blair
7947b896ea
Add interfaces to non public/sealed classes referenced in public interfaces (#1808)
* Add interfaces to non public/sealed classes referenced in public interfaces

* Fixed inheritdocs + made most classes internal

* Add missing properties to IFate and Fate, fix documentation

---------

Co-authored-by: goat <16760685+goaaats@users.noreply.github.com>
2024-06-28 23:05:34 +02:00
KazWolfe
c6b2f0d322
AddonLifecycle Performance Enhancement (#1834)
Co-authored-by: MidoriKami <9083275+midorikami@users.noreply.github.com>
2024-06-21 17:36:56 -07:00
Kaz Wolfe
28ff62e488
fix errors/warnings 2024-06-16 16:45:18 -07:00
Blair
e160746d42
Add MarketBoard service and associated interfaces, test and data widget (#1822)
* Add MarketBoard service and associated interfaces, test and data widget
* Dispose of events properly
* Make listings readonly lists + provide internal list for internal use
* Rename CatalogId to ItemId on interfaces, have kept CatalogId internally as it's technically correct
* Removed RetainerOwnerId from the public interface
* Removed NextCatalogId from the public interface
* Updated test text
* Null events in scoped service disposal
2024-06-16 10:40:48 -07:00
github-actions[bot]
4e331b1d85 Merge remote-tracking branch 'origin/master' into apiX-rollup 2024-06-08 23:34:08 +00:00
goat
31e541fae5 deps: upgrade StyleCop, fix warnings
...fixes new array initializer expression
2024-06-07 21:19:16 +02:00
Soreepeong
e2ea30c2fb Add TODO for PluginStats 2024-06-05 00:13:16 +09:00
Soreepeong
6d8102dc79 Move ShowTextureSaveMenuAsync to its own class 2024-06-05 00:08:05 +09:00
Soreepeong
0d7c0a0375 Merge remote-tracking branch 'upstream/apiX' into feature/itextureprovider-updates 2024-06-04 23:54:38 +09:00
aers
479049b78d
[apiX] dalamud fixes for CS updates (#1821)
* update CS & fix compilation issues

* update CS to latest commit

* update CS & change battlechara

* more CS updates and compilation fixes

* one last cs update
2024-06-03 12:49:44 -07:00
Kaz Wolfe
8d5f2bdf51
Disambiguate ObjectId to GameObjectId and EntityId 2024-06-03 11:19:39 -07:00
aers
d823db7930
[apiX] first pass update for new clientstructs (#1818)
* first pass update for new clientstructs

* track latest clientstructs & fix compilation errors

* fix GameInventory hook bug
rename Appartment
2024-05-31 09:09:28 -07:00
Soreepeong
20717cce3d more 2024-05-21 09:27:51 +09:00
Soreepeong
8c7771bf7d Merge branch 'apiX' into feature/itextureprovider-updates 2024-05-12 22:17:32 +09:00
Kaz Wolfe
b32ed39826
Merge branch 'refs/heads/master' into apiX
# Conflicts:
#	Dalamud/Game/Libc/LibcFunction.cs
#	Dalamud/Game/Libc/LibcFunctionAddressResolver.cs
#	Dalamud/Game/Libc/OwnedStdString.cs
#	Dalamud/Game/Libc/StdString.cs
#	Dalamud/Interface/UiBuilder.cs
2024-04-28 11:54:54 -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
srkizer
bd2c9b2258
Apply most of Api10ToDo (#1782) 2024-04-20 23:25:33 -07:00
goat
0d7c8f1bd2 add fixed-width font option to icon test widget 2024-04-15 00:45:01 +02:00
Soreepeong
9eb4584896 Fix ServicesWidget layout 2024-04-07 21:59:47 +09: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
55bd845a63
Add IconTexture/Wrap to INotification (#1738) (#1739)
* Add IconTexture/Wrap to INotification (#1738)

Notification record and IActiveNotification interface now supports
setting or updating the texture wraps being used, and SetIconTexture has
gotten more overloads to support leaveOpen mechanism that can commonly
be found with Stream wrappers.

ImGui widget is updated to support testing setting "leaveOpen" and
updating "IconTexture" property via setter, making it possible to check
whether IDTW.Dispose is being called under given conditions.

Some changes to doccomments are made.

* typo
2024-03-22 14:47:50 +01:00
srkizer
be63276a85
Rename to Framework.Run (#1728) 2024-03-19 08:04:21 -07:00
srkizer
5d473919a1
Hide scheduler from RunOnFrameworkThread (#1725)
* Hide scheduler from RunOnFrameworkThread

Creating new tasks via Task.Run and alike would fetch the current
scheduler, which we do not want in case of running stuff from the
framework thread. Change is to prevent the standard library from seeing
the "current scheduler". If one wants to use `await` with an async
function to be run in the framework thread, one can use
`RunOnFrameworkThreadAwaitable` instead now.

* TaskSchedulerWidget: test better stuff

* TaskSchedulerWidget: add freeze tests

* More comments

* Make TaskFactory a getter method instead of property to avoid bad suggestions

* Why are there stuff still not pushed
2024-03-18 20:10:47 -07: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
goat
dcec076ca7
Merge pull request #1681 from Soreepeong/feature/inotificationmanager
Implement INotificationManager
2024-03-16 16:46:12 +01:00
wolfcomp
3f4a91b726
Handle static declares in AddonLifecycleWidget (#1720)
* Handle static declares

old way: <https://learn.microsoft.com/en-us/dotnet/api/system.delegate.target?view=net-8.0#property-value>

new way: <https://learn.microsoft.com/en-us/dotnet/api/system.reflection.memberinfo.declaringtype?view=net-8.0#property-value>

* get full name instead of class name
2024-03-16 16:42:24 +01:00
Soreepeong
033a57d19d Merge remote-tracking branch 'upstream/master' into feature/inotificationmanager 2024-03-14 13:06:04 +09:00
Soreepeong
9724e511e9 Add INotification.RespectUiHidden 2024-03-14 13:05:46 +09:00
srkizer
cf4a9e3055
Easier SingleFontChooserDialog ctor, window pos/size/flags, and more docs (#1704)
* Make SingleFontChooserDialog ctor less confusing

The current constructor expects a new fresh instance of IFontAtlas,
which can be easy to miss, resulting in wasted time troubleshooting
without enough clues. New constructor is added that directly takes an
instance of UiBuilder, and the old constructor has been obsoleted and
should be changed to private on api 10.

* Add position, size, and window flags conf to SFCD

* Improve documentations

* Add test for PopupPosition/Size

---------

Co-authored-by: goat <16760685+goaaats@users.noreply.github.com>
2024-03-14 00:57:30 +01:00
srkizer
a26bb58fdb
Use custom TaskScheduler for Framework.RunOnTick (#1597)
* Use custom TaskScheduler for Framework.RunOnTick

* TaskSchedulerWidget: add example
2024-03-14 00:36:38 +01:00
Soreepeong
70eecdaaef more 2024-03-05 21:04:20 +09:00
Soreepeong
9ba0a297c9 Add texture vram usage estimation 2024-03-05 01:53:31 +09:00
Soreepeong
6a0f774625 Add texture leak tracker 2024-03-05 01:06:02 +09:00
Soreepeong
5ad8edbc04 Move save get/save functions to ITextureReadbackProvider 2024-03-03 21:00:37 +09:00
Soreepeong
e1bdba06de cleanup 2024-03-03 20:41:41 +09:00
Soreepeong
c04ce36b9c Add CreateFromGameScreen 2024-03-03 20:08:52 +09:00
Soreepeong
3853191c48 More cleanup 2024-03-03 00:51:28 +09:00
Soreepeong
3415df5d40 Cleanup 2024-03-02 23:45:14 +09:00
Soreepeong
0aa75306d4 fixese 2024-03-02 07:50:37 +09:00
Soreepeong
5367d288d6 Use WIC to implement ITP.SaveAsImageFormatToStreamAsync 2024-03-02 06:57:12 +09:00
Soreepeong
1ae11440aa Add ITextureProvider.CreateFromExistingTextureAsync 2024-03-02 01:41:11 +09:00
Soreepeong
8fa8ca43b6 Rename ISharedImmediateTexture methods 2024-03-01 09:47:27 +09:00
Soreepeong
ca986b46a2 cleanup 2024-02-28 21:17:50 +09:00
Soreepeong
cc756c243c Add ITextureProvider.GetFromManifestResource(Assembly,string) 2024-02-28 21:04:57 +09:00
Soreepeong
35f3802471 Format 2024-02-28 20:10:31 +09:00