Skip to content
This repository has been archived by the owner on May 9, 2024. It is now read-only.

Commit

Permalink
Fix #47
Browse files Browse the repository at this point in the history
  • Loading branch information
pierr3 committed Jun 29, 2023
1 parent 510f6d9 commit d722a53
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions src/application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
namespace vector_audio::application {
using util::TextURL;

static void defaultLogger(const char* subsystem, const char* /*file*/, int /*line*/, const char* lineOut)
static void defaultLogger(const char* subsystem, const char* /*file*/, int /*line*/, const char* lineOut)
{
spdlog::info("[afv_native] {} {}", subsystem, lineOut);
}
Expand Down Expand Up @@ -326,6 +326,8 @@ void App::render_frame()
shared::FetchedStations.push_back(el);

this->mClient_->AddFrequency(shared::datafile::frequency, clean_callsign);
mClient_->SetEnableInputFilters(vector_audio::shared::mInputFilter);
mClient_->SetEnableOutputEffects(vector_audio::shared::mOutputEffects);
this->mClient_->UseTransceiversFromStation(clean_callsign,
shared::datafile::frequency);
this->mClient_->SetRx(shared::datafile::frequency, true);
Expand Down Expand Up @@ -401,7 +403,7 @@ void App::render_frame()
// Connect button logic

if (!mClient_->IsVoiceConnected() && !mClient_->IsAPIConnected()) {
style::push_disabled_on((!shared::datafile::is_connected && shared::slurper::is_unavailable) || (shared::slurper::is_unavailable && shared::datafile::is_unavailable) );
style::push_disabled_on((!shared::datafile::is_connected && shared::slurper::is_unavailable) || (shared::slurper::is_unavailable && shared::datafile::is_unavailable));

if (ImGui::Button("Connect")) {

Expand Down Expand Up @@ -474,7 +476,7 @@ void App::render_frame()
errorModal("Not connected to VATSIM!");
}
}
style::pop_disabled_on((!shared::datafile::is_connected && shared::slurper::is_unavailable) || (shared::slurper::is_unavailable && shared::datafile::is_unavailable) );
style::pop_disabled_on((!shared::datafile::is_connected && shared::slurper::is_unavailable) || (shared::slurper::is_unavailable && shared::datafile::is_unavailable));
} else {
ImGui::PushStyleColor(ImGuiCol_Button,
ImColor::HSV(4 / 7.0F, 0.6F, 0.6F).Value);
Expand All @@ -497,7 +499,6 @@ void App::render_frame()
shared::bootUpVccs = false;
}
ImGui::PopStyleColor(3);

}

ImGui::SameLine();
Expand Down Expand Up @@ -559,8 +560,8 @@ void App::render_frame()
ImGui::SameLine();

vector_audio::util::HelpMarker("The data source where VectorAudio\nchecks for your connection.\n"
"Click it to force usage of the datafile in\ncase the slurper does not detect your connection\n"
"Red text means vatsim servers could not be reached at all.");
"Click it to force usage of the datafile in\ncase the slurper does not detect your connection\n"
"Red text means vatsim servers could not be reached at all.");

ImGui::NewLine();

Expand Down Expand Up @@ -673,6 +674,8 @@ void App::render_frame()
}
} else {
mClient_->AddFrequency(el.freq, el.callsign);
mClient_->SetEnableInputFilters(vector_audio::shared::mInputFilter);
mClient_->SetEnableOutputEffects(vector_audio::shared::mOutputEffects);
mClient_->UseTransceiversFromStation(el.callsign, el.freq);
mClient_->SetRx(el.freq, true);
}
Expand All @@ -699,6 +702,8 @@ void App::render_frame()
mClient_->SetXc(el.freq, !xc_state);
} else {
mClient_->AddFrequency(el.freq, el.callsign);
mClient_->SetEnableInputFilters(vector_audio::shared::mInputFilter);
mClient_->SetEnableOutputEffects(vector_audio::shared::mOutputEffects);
mClient_->UseTransceiversFromStation(el.callsign, el.freq);
mClient_->SetTx(el.freq, true);
mClient_->SetRx(el.freq, true);
Expand Down Expand Up @@ -750,6 +755,8 @@ void App::render_frame()
mClient_->SetTx(el.freq, !tx_state);
} else {
mClient_->AddFrequency(el.freq, el.callsign);
mClient_->SetEnableInputFilters(vector_audio::shared::mInputFilter);
mClient_->SetEnableOutputEffects(vector_audio::shared::mOutputEffects);
mClient_->UseTransceiversFromStation(el.callsign, el.freq);
mClient_->SetTx(el.freq, true);
mClient_->SetRx(el.freq, true);
Expand Down Expand Up @@ -808,7 +815,6 @@ void App::render_frame()

ImGui::NewLine();


std::string rx_list = "Last RX: ";
rx_list.append(
received_callsigns.empty()
Expand All @@ -822,8 +828,6 @@ void App::render_frame()

ImGui::NewLine();



// Version
ImGui::TextUnformatted(vector_audio::shared::kClientName.c_str());

Expand Down

0 comments on commit d722a53

Please sign in to comment.