Commit Graph

26 Commits

Author SHA1 Message Date
Admiral H. Curtiss 5728ebf7ad
Merge pull request #12867 from AdmiralCurtiss/uicommon-dependency
CMake dependency fixes
2024-06-21 20:01:44 +02:00
LillyJadeKatrin 45563a872c Scale challenge icons based on screen height 2024-06-19 13:59:59 -04:00
JMC47 9886199cb1
Merge pull request #12859 from LillyJadeKatrin/retroachievements-challenge-hide
Hide Challenge Icons when OSD Messages Disabled
2024-06-19 02:29:08 -04:00
LillyJadeKatrin 9e1f5ed4b5 Stack Challenge Icons Horizontally 2024-06-15 22:42:40 -04:00
Admiral H. Curtiss c5a030e7ab
VideoCommon: Fix format string injection vulnerability from leaderboards 2024-06-15 23:12:19 +02:00
LillyJadeKatrin 3d5a1f7d33 Refactored Challenge Icons to handle icon updates
If an icon is displayed on screen before it downloads, it was displaying a default icon but it would fail to load the actual icon even after it was downloaded. This fixes that.
2024-06-15 07:36:49 -04:00
LillyJadeKatrin 7eec723f3f Hide Challenge Icons when OSD Messages Disabled 2024-06-14 00:19:45 -04:00
Admiral H. Curtiss 81b6bfaa1e
Merge pull request #12832 from JosJuice/retro-achievements-less-ifdefs
Use a stub AchivementManager when USE_RETRO_ACHIEVEMENTS isn't defined
2024-06-06 22:42:53 +02:00
JosJuice 22aa88109f Use a stub AchivementManager when USE_RETRO_ACHIEVEMENTS isn't defined
This lets us reduce the number of USE_RETRO_ACHIEVEMENTS ifdefs in the
code base, reducing visual clutter. In particular, needing an ifdef for
each call to IsHardcodeModeActive was annoying to me. This also reduces
the risk that someone writes code that accidentally fails to compile
with USE_RETRO_ACHIEVEMENTS disabled.

We could cut down on ifdefs even further by making HardcodeWarningWidget
always exist, but that would result in non-trivial code ending up in the
binary even with USE_RETRO_ACHIEVEMENTS disabled, so I'm leaving it out
of this PR. It's not a lot of code though, so I might end up revisiting
it at some point.
2024-06-06 08:26:20 +02:00
iwubcode 51b69bb339 VideoCommon: use imgui mouse position event when the mouse position changes 2024-05-31 22:31:54 -05:00
LillyJadeKatrin dc8f3f6eae Refactored Achievement Badges into Texture Layers
Achievement badges/icons are refactored into the type CustomTextureData::ArraySlice::Level as that is the data type images loaded from the filesystem will be. This includes everything that uses the badges in the Qt UI and OnScreenDisplay, and similarly removes the OSD::Icon type because Level already contains that information.
2024-05-23 10:41:45 -04:00
iwubcode d7a8ec4353 VideoCommon: use imgui input queue for mouse clicks, this helps keep input smooth regardless of frame-times and matches keyboard events, this system was introduced in 1.87 2024-05-18 11:49:19 -05:00
LillyJadeKatrin 7895b739ee Display active leaderboard data on screen
Up to four leaderboards are displayed in a window in the bottom right of the screen (vertically above challenge icons, if there are any). As per RetroAchievements standards, the markers only display the current leaderboard values with no further context necessary.
2024-05-01 06:43:19 -04:00
sowens99 3ab1334cd9 VideoCommon: Only show input count when recording 2024-04-26 20:06:57 -04:00
Admiral H. Curtiss 95cba6be2b
Core/Movie: Refactor to class, move to System.
A bit of global state remains (the `header` in `BeginRecordingInput()`) due to unclear lifetime requirements.
2024-01-15 08:05:30 +01:00
iwubcode 12dd15c8dd VideoBackends / VideoCommon: add type enum to dictate whether a texture is a 2D texture, a texture array, or a cube map; support 2D texture type across backends
Co-authored-by: TellowKrinkle <tellowkrinkle@gmail.com>
2023-12-15 11:06:02 -06:00
Lioncash d90537cc18 AchievementManager: Return by reference from GetLock()
This makes the API a little nicer to use, since you don't need to do
a mandatory dereference when passing the lock into any kind of scope
guard.
2023-12-11 13:51:50 -05:00
Lioncash e55f9ed102 AchievementManager: Make GetInstance() return a reference
The internal static member will always have a valid lifetime. Makes this
consistent with other instance based objects in our code.
2023-12-11 13:36:39 -05:00
LillyJadeKatrin e992225b88 Bugfix - small square in bottom right corner
Fixed a bug in OSUI created by the challenge icons that caused a small rectangle to appear in the bottom right corner of the screen.
2023-12-08 00:33:29 -05:00
LillyJadeKatrin caa729f84a Display Active Challenges On Screen
The active challenges, aka the primed achievements, are displayed on screen as a series of icons in the bottom right corner of the screen via OnScreenUI.
2023-12-07 16:02:15 -05:00
iwubcode 350e51951b VideoCommon: update imgui to 1.89.7 (and implot to 0.15); fix issues with upgrade; keep the demo code in case someone wants to reference it but don't compile it by enabling 'IMGUI_DISABLE_DEMO_WINDOWS' in config 2023-07-27 11:47:34 -05:00
Filoppi a2702c6e27 Video: implement color correction to match the NTSC and PAL color spaces (and gamma) that GC and Wii targeted.
To further increase the accuracy of the post process phase, I've added (scRGB) HDR support, which is necessary
to fully display the PAL and NTSC-J color spaces, and also to improve the quality of post process texture samplings and
do them in linear space instead of gamma space (which is very important when playing at low resolutions).
For SDR, the quality is also slightly increased, at least if any post process runs, as the buffer is now
R10G10B10A2 (on Vulkan, DX11 and DX12) if supported; previously it was R8G8B8A8 but the alpha bits were wasted.

Gamma correction is arguably the most important thing as Dolphin on Windows outputted in "sRGB" (implicitly)
as that's what Windows expects by default, though sRGB gamma is very different from the gamma commonly used
by video standards dating to the pre HDR era (roughly gamma 2.35).

Additionally, the addition of HDR support (which is pretty straight forward and minimal), added support for
our own custom AutoHDR shaders, which would allow us to achieve decent looking HDR in Dolphin games without
having to use SpecialK or Windows 11 AutoHDR. Both of which don't necessarily play nice with older games
with strongly different and simpler lighting. HDR should also be supported in Linux.
Development of my own AutoHDR shader is almost complete and will come next.

This has been carefully tested and there should be no regression in any of the different features that Dolphin
offers, like multisampling, stereo rendering, other post processes, etc etc.

Fixes: https://bugs.dolphin-emu.org/issues/8941

Co-authored-by: EndlesslyFlowering <EndlesslyFlowering@protonmail.com>
Co-authored-by: Dogway <lin_ares@hotmail.com>
2023-06-19 01:34:42 +03:00
TellowKrinkle d3110b9521 VideoCommon: Update imgui scale when dpi changes 2023-06-11 20:05:27 -05:00
Scott Mansell 9c1fe59cc9 Insert a more solid abstraction between Qt and Imgui 2023-02-09 18:36:20 +13:00
Scott Mansell 8a23629345 Split AbstractGfx out of Renderer
Almost all the virtual functions in Renderer are part of dolphin's
"graphics api abstraction layer", which has slowly formed over the
last decade or two.

Most of the work was done previously with the introduction of the
various "AbstractX" classes, associated with texture cache cleanups
and implementation of newer graphics APIs (Direct3D 12, Vulkan, Metal).
We are simply taking the last step and yeeting these functions out
of Renderer.

This "AbstractGfx" class is now completely agnostic of any details
from the flipper/hollywood GPU we are emulating, though somewhat
specialized.

(Will not build, this commit only contains changes outside VideoBackends)
2023-01-31 18:46:02 +13:00
Scott Mansell 0d4537d60f Move Presenting, Dumping and ImGui out of Renderer 2023-01-31 18:45:21 +13:00