Merge remote-tracking branch 'upstream/master' into es5506_alt

This commit is contained in:
cam900 2022-05-30 22:20:24 +09:00
commit 02dbafb728
4 changed files with 10 additions and 1 deletions

View File

@ -2563,7 +2563,7 @@ struct ImGuiTableColumn
PrevEnabledColumn = NextEnabledColumn = -1;
SortOrder = -1;
SortDirection = ImGuiSortDirection_None;
DrawChannelCurrent = DrawChannelFrozen = DrawChannelUnfrozen = (ImU8)-1;
DrawChannelCurrent = DrawChannelFrozen = DrawChannelUnfrozen = (ImU32)-1;
}
};

View File

@ -1998,6 +1998,11 @@ void ImGui::TableBeginCell(ImGuiTable* table, int column_n)
{
// FIXME-TABLE: Could avoid this if draw channel is dummy channel?
SetWindowClipRectBeforeSetChannel(window, column->ClipRect);
if (column->DrawChannelCurrent==(ImGuiTableDrawChannelIdx)-1) {
// temporary workaround for #502
//printf("sorry!\n");
column->DrawChannelCurrent=column_n;
}
table->DrawSplitter->SetCurrentChannel(window->DrawList, column->DrawChannelCurrent);
}

View File

@ -1852,6 +1852,9 @@ bool DivEngine::addWaveFromFile(const char* path, bool addRaw) {
// read as .dmw
reader.seek(0,SEEK_SET);
int len=reader.readI();
if (len<=0 || len>256) {
throw EndOfFileException(&reader,reader.size());
}
wave->max=(unsigned char)reader.readC();
if (wave->max==255) { // new wavetable format
unsigned char waveVersion=reader.readC();

View File

@ -208,6 +208,7 @@ int DivPlatformZXBeeper::dispatch(DivCommand c) {
chan[c.chan].duty=c.value;
break;
case DIV_CMD_SAMPLE_MODE:
if (isMuted[c.chan]) break;
curSample=c.value;
curSamplePos=0;
curSamplePeriod=0;