diff --git a/src/platform/display_device.cpp b/src/platform/display_device.cpp index 84d730dca12..c83df68d319 100644 --- a/src/platform/display_device.cpp +++ b/src/platform/display_device.cpp @@ -398,7 +398,7 @@ namespace platf { } if (boost::get<boost::blank>(&recovery_config->data)) { - // Config was "applied" succesfully, but no changes were needed so nothing to recover from. + // Config was "applied" successfully, but no changes were needed so nothing to recover from. recovery_config = boost::none; return true; } @@ -542,17 +542,17 @@ namespace platf { if (boost::regex_match(trimmed_string, match, resolution_regex)) { try { if (match[2].matched) { - // We have a decimal point and will have to split it into numberator and denumerator. + // We have a decimal point and will have to split it into numerator and denominator. // For example: // 59.995: // numerator = 59995 - // denumerator = 1000 + // denominator = 1000 const std::string numerator_str { match[1].str() + match[2].str() }; const auto numerator { static_cast<unsigned int>(std::stol(numerator_str)) }; - const auto denumerator { static_cast<unsigned int>(std::pow(10, std::distance(match[2].first, match[2].second))) }; + const auto denominator { static_cast<unsigned int>(std::pow(10, std::distance(match[2].first, match[2].second))) }; - parsed_config.refresh_rate = refresh_rate_t { numerator, denumerator }; + parsed_config.refresh_rate = refresh_rate_t { numerator, denominator }; } else { parsed_config.refresh_rate = refresh_rate_t { static_cast<unsigned int>(std::stol(match[1])), 1 }; diff --git a/src/platform/display_device.h b/src/platform/display_device.h index 447ce786fac..67f70ee11b8 100644 --- a/src/platform/display_device.h +++ b/src/platform/display_device.h @@ -240,7 +240,7 @@ namespace platf { set_display_modes(const device_display_mode_map_t &modes); /*! - * Check whether the specified device is pripary. + * Check whether the specified device is primary. */ bool is_primary_device(const std::string &device_id); @@ -300,7 +300,7 @@ namespace platf { /*! * Parses the configuration and session parameters. * - * @returns config that is ready to be used or empty optional if some error has occured. + * @returns config that is ready to be used or empty optional if some error has occurred. */ boost::optional<parsed_config_t> parse_config(const config::video_t &config, const rtsp_stream::launch_session_t &session); @@ -311,7 +311,7 @@ namespace platf { * @note if a recovery config is returned, it should contain a valid data type * for the platform. If it contains blank, it means the configuration * did not need to be applied - no recovery to be done afterwards and - * we can still procceed. + * we can still proceed. */ boost::optional<recovery_config_t> apply_config(const parsed_config_t &config); diff --git a/src/platform/windows/display_device.cpp b/src/platform/windows/display_device.cpp index 90206fa1b40..180cd45f470 100644 --- a/src/platform/windows/display_device.cpp +++ b/src/platform/windows/display_device.cpp @@ -286,7 +286,7 @@ namespace platf { // only the whole group needs to be active if (primary_device_requested) { - // Condition !duplicated_devices.empty() should be already verified ouside the function + // Condition !duplicated_devices.empty() should be already verified outside the function if (current_topology.size() > 1) { // There are other topology groups other than the primary devices @@ -459,15 +459,15 @@ namespace platf { const auto current_topology { utils::parse_topology_from_paths(display_data->paths) }; for (const auto &topology : current_topology) { const auto &device_id { topology.first }; - const auto &tolopogy_info { topology.second }; + const auto &topology_info { topology.second }; - if (tolopogy_info.active_display) { - const auto &path { display_data->paths.at(tolopogy_info.active_display->path_index) }; + if (topology_info.active_display) { + const auto &path { display_data->paths.at(topology_info.active_display->path_index) }; const auto mode { utils::get_source_mode(utils::get_source_index(path, display_data->modes), display_data->modes) }; available_devices[device_id] = device_info_t { utils::get_display_name(path), - tolopogy_info.friendly_name, + topology_info.friendly_name, mode && utils::is_primary(*mode) ? device_state_e::PRIMARY : device_state_e::ACTIVE, utils::get_hdr_state(path) }; @@ -475,7 +475,7 @@ namespace platf { else { available_devices[device_id] = device_info_t { std::string {}, // Inactive device can have multiple display names, so it's just meaningless - tolopogy_info.friendly_name, + topology_info.friendly_name, device_state_e::INACTIVE, hdr_state_e::UNKNOWN }; @@ -558,7 +558,7 @@ namespace platf { const auto current_modes { get_modes(device_ids, NO_DUPLICATES) }; if (!original_modes.empty()) { bool all_modes_match { true }; - for (const auto &[device_id, requeted_mode] : modes) { + for (const auto &[device_id, requested_mode] : modes) { auto mode_it { current_modes.find(device_id) }; if (mode_it == std::end(current_modes)) { // I mean this race condition is technically possible... @@ -566,11 +566,11 @@ namespace platf { break; } - if (!fuzzy_compare_modes(mode_it->second, requeted_mode)) { + if (!fuzzy_compare_modes(mode_it->second, requested_mode)) { // We have a problem when using SetDisplayConfig with SDC_ALLOW_CHANGES (which we need to use as otherwise we to be very precise) // where it decides to use our new mode merely as a suggestion. This is good, since we don't have to be very precise with // refresh rate, but also bad since it can just ignore our specified mode. - // Thus, we need to revert changes if they deviate too much for the requested davice and any "duplicated" devices. + // Thus, we need to revert changes if they deviate too much for the requested device and any "duplicated" devices. all_modes_match = false; break; @@ -1049,7 +1049,7 @@ namespace platf { } if (recovery->initial_topology.empty()) { - // The config is currupted or smt... + // The config is corrupted or smt... BOOST_LOG(error) << "recovery config does not have initial topology!"; return; }