From 05633d4b0ef72604af47f461b38d944c3d45cd05 Mon Sep 17 00:00:00 2001 From: Aaron Culliney Date: Sat, 17 Nov 2018 13:35:35 -0800 Subject: [PATCH] Unbreak Desktop Linux build --- Makefile.am | 1 + src/meta/debugger.c | 4 ++-- src/video/ntsc.c | 2 +- src/video/xvideo.c | 30 ++++++++++-------------------- 4 files changed, 14 insertions(+), 23 deletions(-) diff --git a/Makefile.am b/Makefile.am index 36ceb625..6a2bf81a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -76,6 +76,7 @@ apple2ix_SOURCES = \ src/test/sha1.c \ src/timing.c \ src/video/video.c \ + src/video/ntsc.c \ src/vm.c \ src/zlib-helpers.c diff --git a/src/meta/debugger.c b/src/meta/debugger.c index 6c34973c..80fa63f8 100644 --- a/src/meta/debugger.c +++ b/src/meta/debugger.c @@ -1093,8 +1093,8 @@ void fb_sha1() { uint8_t md[SHA_DIGEST_LENGTH]; char buf[(SHA_DIGEST_LENGTH*2)+1]; - uint8_t *fb = display_getCurrentFramebuffer(); - SHA1(fb, SCANWIDTH*SCANHEIGHT, md); + PIXEL_TYPE *fb = display_getCurrentFramebuffer(); + SHA1((const unsigned char *)fb, SCANWIDTH*SCANHEIGHT*PIXEL_STRIDE, md); int i=0; for (int j=0; jdata + j) ) = (uint32_t)( - ((uint32_t)(colormap[index].red) << red_shift) | - ((uint32_t)(colormap[index].green) << green_shift) | - ((uint32_t)(colormap[index].blue) << blue_shift) | - ((uint32_t)0xff /* alpha */ << alpha_shift) - ); - if (scale > 1) + if (scale <= 1) { + memcpy(/*dst:*/image->data, /*src:*/fb, SCANWIDTH*SCANHEIGHT*bitmap_pad); + } else { + unsigned int count = SCANWIDTH * SCANHEIGHT; + for (unsigned int i=0, j=0; idata + j) ) = pixel; j+=4; // duplicate pixel - *( (uint32_t*)(image->data + j) ) = (uint32_t)( - ((uint32_t)(colormap[index].red) << red_shift) | - ((uint32_t)(colormap[index].green) << green_shift) | - ((uint32_t)(colormap[index].blue) << blue_shift) | - ((uint32_t)0xff /* alpha */ << alpha_shift) - ); + *( (uint32_t*)(image->data + j) ) = pixel; if (((i+1) % SCANWIDTH) == 0) {