diff options
| author | Admiral H. Curtiss <pikachu025@gmail.com> | 2023-06-09 15:07:07 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-06-09 15:07:07 +0200 |
| commit | 8f51a9d2d8a88993167cd1c3b8d447bee1ca6407 (patch) | |
| tree | 31ea53fda80c4e7e4476cd2a16b17de89102b9c7 /Source/Core/VideoCommon | |
| parent | 092773ad0cd31cb0f3d111254e4e0bdb24f2c795 (diff) | |
| parent | ac48b2eea43164349e6b112604d44490a4d731c5 (diff) | |
Merge pull request #11699 from Pokechu22/gl-check-maximum-samples
OpenGL: Check the list of supported AA modes instead of hardcoding
Diffstat (limited to 'Source/Core/VideoCommon')
| -rw-r--r-- | Source/Core/VideoCommon/VideoBackendBase.cpp | 8 | ||||
| -rw-r--r-- | Source/Core/VideoCommon/VideoBackendBase.h | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/Source/Core/VideoCommon/VideoBackendBase.cpp b/Source/Core/VideoCommon/VideoBackendBase.cpp index 9d6ff70664..6e466c8557 100644 --- a/Source/Core/VideoCommon/VideoBackendBase.cpp +++ b/Source/Core/VideoCommon/VideoBackendBase.cpp @@ -281,7 +281,7 @@ void VideoBackendBase::ActivateBackend(const std::string& name) g_video_backend = iter->get(); } -void VideoBackendBase::PopulateBackendInfo() +void VideoBackendBase::PopulateBackendInfo(const WindowSystemInfo& wsi) { g_Config.Refresh(); // Reset backend_info so if the backend forgets to initialize something it doesn't end up using @@ -289,18 +289,18 @@ void VideoBackendBase::PopulateBackendInfo() g_Config.backend_info = {}; ActivateBackend(Config::Get(Config::MAIN_GFX_BACKEND)); g_Config.backend_info.DisplayName = g_video_backend->GetDisplayName(); - g_video_backend->InitBackendInfo(); + g_video_backend->InitBackendInfo(wsi); // We validate the config after initializing the backend info, as system-specific settings // such as anti-aliasing, or the selected adapter may be invalid, and should be checked. g_Config.VerifyValidity(); } -void VideoBackendBase::PopulateBackendInfoFromUI() +void VideoBackendBase::PopulateBackendInfoFromUI(const WindowSystemInfo& wsi) { // If the core is running, the backend info will have been populated already. // If we did it here, the UI thread can race with the with the GPU thread. if (!Core::IsRunning()) - PopulateBackendInfo(); + PopulateBackendInfo(wsi); } void VideoBackendBase::DoState(PointerWrap& p) diff --git a/Source/Core/VideoCommon/VideoBackendBase.h b/Source/Core/VideoCommon/VideoBackendBase.h index 2ce235f8f8..f5222a1936 100644 --- a/Source/Core/VideoCommon/VideoBackendBase.h +++ b/Source/Core/VideoCommon/VideoBackendBase.h @@ -47,7 +47,7 @@ public: virtual std::string GetName() const = 0; virtual std::string GetDisplayName() const { return GetName(); } - virtual void InitBackendInfo() = 0; + virtual void InitBackendInfo(const WindowSystemInfo& wsi) = 0; virtual std::optional<std::string> GetWarningMessage() const { return {}; } // Prepares a native window for rendering. This is called on the main thread, or the @@ -69,9 +69,9 @@ public: static void ActivateBackend(const std::string& name); // Fills the backend_info fields with the capabilities of the selected backend/device. - static void PopulateBackendInfo(); + static void PopulateBackendInfo(const WindowSystemInfo& wsi); // Called by the UI thread when the graphics config is opened. - static void PopulateBackendInfoFromUI(); + static void PopulateBackendInfoFromUI(const WindowSystemInfo& wsi); // Wrapper function which pushes the event to the GPU thread. void DoState(PointerWrap& p); |
