Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Chores] Format code #1630

Merged
merged 1 commit into from
Apr 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[Chores] Format code
  • Loading branch information
nicolasnoble committed Apr 2, 2024
commit 057f32af1b2c303626862f0acf37685e2b4956fa
2 changes: 1 addition & 1 deletion src/gui/gui.cc
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@
if (vg) {
g_system->findResource(
[vg](auto path) -> bool {
int res = nvgCreateFont(vg, "noto-sans-regular", (const char *)(path.u8string().c_str()));
int res = nvgCreateFont(vg, "noto-sans-regular", (const char*)(path.u8string().c_str()));

Check warning on line 548 in src/gui/gui.cc

View check run for this annotation

Codecov / codecov/patch

src/gui/gui.cc#L548

Added line #L548 was not covered by tests
return res >= 0;
},
MAKEU8("NotoSans-Regular.ttf"), "fonts", std::filesystem::path("third_party") / "noto");
Expand Down
19 changes: 8 additions & 11 deletions src/spu/registers.cc
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@
return spuIrq;
}

PCSX::PSXSPU_LOGGER::Log("SPU.read, regArea[%03x] = %04x\n",r, regArea[(r - 0xc00) >> 1]);
PCSX::PSXSPU_LOGGER::Log("SPU.read, regArea[%03x] = %04x\n", r, regArea[(r - 0xc00) >> 1]);

Check warning on line 569 in src/spu/registers.cc

View check run for this annotation

Codecov / codecov/patch

src/spu/registers.cc#L569

Added line #L569 was not covered by tests
return regArea[(r - 0xc00) >> 1];
}

Expand All @@ -586,7 +586,7 @@
void PCSX::SPU::impl::SoundOff(int start, int end, uint16_t val) {
for (int ch = start; ch < end; ch++, val >>= 1) {
if (val & 1) {
if(s_chan[ch].data.get<Chan::Stop>().value != true) {
if (s_chan[ch].data.get<Chan::Stop>().value != true) {

Check warning on line 589 in src/spu/registers.cc

View check run for this annotation

Codecov / codecov/patch

src/spu/registers.cc#L589

Added line #L589 was not covered by tests
PCSX::PSXSPU_LOGGER::Log("SPU.write, Voice %02i OFF\n", ch);
}
s_chan[ch].data.get<Chan::Stop>().value = true;
Expand All @@ -597,12 +597,12 @@
// Set pitch modulation for voices [start, end] depending on val
void PCSX::SPU::impl::FModOn(int start, int end, uint16_t val) {
for (int ch = start; ch < end; ch++, val >>= 1) {
if (val & 1) { // Check if modulation should be enabled for this voice
if (ch > 0) { // Pitch modulation doesn't work for voice 0
if (val & 1) { // Check if modulation should be enabled for this voice
if (ch > 0) { // Pitch modulation doesn't work for voice 0

Check warning on line 601 in src/spu/registers.cc

View check run for this annotation

Codecov / codecov/patch

src/spu/registers.cc#L600-L601

Added lines #L600 - L601 were not covered by tests
if (s_chan[ch].data.get<Chan::FMod>().value != 1) {
PCSX::PSXSPU_LOGGER::Log("SPU.write, Voice %02i Pitch Modulation ON\n", ch);
}
s_chan[ch].data.get<Chan::FMod>().value = 1; // sound channel
s_chan[ch].data.get<Chan::FMod>().value = 1; // sound channel

Check warning on line 605 in src/spu/registers.cc

View check run for this annotation

Codecov / codecov/patch

src/spu/registers.cc#L605

Added line #L605 was not covered by tests
s_chan[ch - 1].data.get<Chan::FMod>().value = 2; // freq channel
}
} else {
Expand All @@ -624,7 +624,7 @@
}
s_chan[ch].data.get<Chan::Noise>().value = true;
} else {
if(s_chan[ch].data.get<Chan::Noise>().value != false) {
if (s_chan[ch].data.get<Chan::Noise>().value != false) {

Check warning on line 627 in src/spu/registers.cc

View check run for this annotation

Codecov / codecov/patch

src/spu/registers.cc#L627

Added line #L627 was not covered by tests
PCSX::PSXSPU_LOGGER::Log("SPU.write, Voice %02i Noise OFF\n", ch);
}
s_chan[ch].data.get<Chan::Noise>().value = false;
Expand Down Expand Up @@ -735,15 +735,12 @@
PCSX::PSXSPU_LOGGER::Log("SPU.write, Voice %02i Reverb ON\n", ch);
}
s_chan[ch].data.get<Chan::Reverb>().value = true;

}
else
{

} else {
if (s_chan[ch].data.get<Chan::Reverb>().value != false) {
PCSX::PSXSPU_LOGGER::Log("SPU.write, Voice %02i Reverb OFF\n", ch);
}
s_chan[ch].data.get<Chan::Reverb>().value = false;
}

}
}
Loading