mirror of https://github.com/mgba-emu/mgba.git
Test: Fix writing diffs
This commit is contained in:
parent
faceb902c8
commit
481f0f0b0e
|
@ -715,7 +715,7 @@ void CInemaTestRun(struct CInemaTest* test, struct Table* configTree) {
|
||||||
if (r | g | b) {
|
if (r | g | b) {
|
||||||
failed = true;
|
failed = true;
|
||||||
if (diffs && !diff) {
|
if (diffs && !diff) {
|
||||||
diff = calloc(expected.width * expected.height, BYTES_PER_PIXEL);
|
diff = calloc(expected.stride * expected.height, BYTES_PER_PIXEL);
|
||||||
}
|
}
|
||||||
CIlog(3, "Frame %u failed at pixel %" PRIz "ux%" PRIz "u with diff %i,%i,%i (expected %02x%02x%02x, got %02x%02x%02x)\n",
|
CIlog(3, "Frame %u failed at pixel %" PRIz "ux%" PRIz "u with diff %i,%i,%i (expected %02x%02x%02x, got %02x%02x%02x)\n",
|
||||||
frameCounter, x, y, r, g, b,
|
frameCounter, x, y, r, g, b,
|
||||||
|
@ -763,9 +763,9 @@ void CInemaTestRun(struct CInemaTest* test, struct Table* configTree) {
|
||||||
if (failed) {
|
if (failed) {
|
||||||
struct CInemaImage outdiff = {
|
struct CInemaImage outdiff = {
|
||||||
.data = diff,
|
.data = diff,
|
||||||
.width = image.width,
|
.width = expected.width,
|
||||||
.height = image.height,
|
.height = expected.height,
|
||||||
.stride = image.width,
|
.stride = expected.stride,
|
||||||
};
|
};
|
||||||
|
|
||||||
_writeDiff(test->name, &image, frame, "result");
|
_writeDiff(test->name, &image, frame, "result");
|
||||||
|
|
Loading…
Reference in New Issue