Skip to content

Commit

Permalink
Merge branch 'master' into add-move-mode
Browse files Browse the repository at this point in the history
  • Loading branch information
YourMJK committed Jan 30, 2024
2 parents 0d16ad3 + bef7dfc commit 32b4df5
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,7 @@ int main(int32_t argc, char** argv)
t_PCS pcs = {};
t_PDS pds = {};

size_t offesetCurrPCS = 0;
size_t offsetCurrPCS = 0;
bool fixPCS = false;

std::vector<t_compositionNumberToSaveInfo> cutMerge_compositionNumberToSave = {};
Expand Down Expand Up @@ -816,7 +816,7 @@ int main(int32_t argc, char** argv)
//std::printf("PCS\r\n");
if (doMove | doCrop || cmd.addZero || cmd.cutMerge.doCutMerge) {
pcs = ReadPCS(&buffer[start + HEADER_SIZE]);
offesetCurrPCS = start;
offsetCurrPCS = start;

if (doCrop) {
screenRect.x = 0 + cmd.crop.left;
Expand Down Expand Up @@ -1016,19 +1016,19 @@ int main(int32_t argc, char** argv)
wds.windows[i].WindowsVerPos -= (cmd.crop.top + corrVer);
}

if (corrVer != 0) {
pcs.compositionObject[i].objectVerPos -= corrVer;
fixPCS = true;
}
if (corrHor != 0) {
pcs.compositionObject[i].objectHorPos -= corrHor;
if (corrVer != 0 || corrHor != 0) {
for (int j = 0; j < pcs.numCompositionObject; j++) {
if (pcs.compositionObject[j].windowID != wds.windows[i].windowID) continue;
pcs.compositionObject[j].objectVerPos -= corrVer;
pcs.compositionObject[j].objectHorPos -= corrHor;
}
fixPCS = true;
}
}
}

if (fixPCS) {
WritePCS(pcs, &buffer[offesetCurrPCS + HEADER_SIZE]);
WritePCS(pcs, &buffer[offsetCurrPCS + HEADER_SIZE]);
}
WriteWDS(wds, &buffer[start + HEADER_SIZE]);

Expand Down

0 comments on commit 32b4df5

Please sign in to comment.