NES:codestyle

This commit is contained in:
tildearrow 2024-08-24 16:43:15 -05:00
parent efb89f7f94
commit c06759b235
3 changed files with 27 additions and 29 deletions

View file

@ -302,6 +302,7 @@ const char* aboutLine[]={
_N("NDS sound emulator by cam900"),
"",
_N("greetings to:"),
"floxy!",
"NEOART Costa Rica",
"Xenium Demoparty",
"@party",

View file

@ -253,8 +253,7 @@ void FurnaceGUI::drawSampleEdit() {
SAMPLE_WARN(warnLength,"QSound: maximum sample length is 65535");
}
break;
case DIV_SYSTEM_NES:
{
case DIV_SYSTEM_NES: {
if (sample->loop) {
if (sample->loopStart&511) {
int tryWith=(sample->loopStart)&(~511);
@ -263,7 +262,8 @@ void FurnaceGUI::drawSampleEdit() {
SAMPLE_WARN(warnLoopStart,alignHint);
}
if ((sample->loopEnd)&127) {
int tryWith=(sample->loopEnd + 1)&(~127); //+1 bc of how sample length is treated: https://www.nesdev.org/wiki/APU_DMC
// +1 bc of how sample length is treated: https://www.nesdev.org/wiki/APU_DMC
int tryWith=(sample->loopEnd + 1)&(~127);
if (tryWith>(int)sample->samples) tryWith-=128;
String alignHint=fmt::sprintf(_("NES: loop end must be a multiple of 128 (try with %d)"),tryWith);
SAMPLE_WARN(warnLoopEnd,alignHint);