Declare abstract is_equal method instead of operators

This commit is contained in:
Angie 2024-06-03 18:15:50 -04:00 committed by angie
parent b5af730a05
commit 4c19ff443d
2 changed files with 2 additions and 2 deletions

View file

@ -23,7 +23,7 @@ namespace ultramodern {
virtual std::string get_graphics_api_name() const = 0;
virtual std::optional<uint32_t> get_target_framerate() const = 0;
auto operator<=>(const GraphicsConfig& rhs) const = default;
virtual bool is_equal(const GraphicsConfig& rhs) const = 0;
};
enum class SetupResult {

View file

@ -308,7 +308,7 @@ void gfx_thread_func(uint8_t* rdram, moodycamel::LightweightSemaphore* thread_re
}
else if (const auto* config_action = std::get_if<UpdateConfigAction>(&action)) {
auto new_config = ultramodern::renderer::get_graphics_config();
if (*old_config != *new_config) {
if (!old_config->is_equal(*new_config)) {
renderer_context->update_config(old_config, new_config);
old_config = new_config;
}