X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fgui%2Fmainwin.cpp;h=90f192a464a69932108fe592b28bab75c3e0e971;hb=438d3a52ef0af04ac3279c0839fe6ffd7333b776;hp=24c3dc457a5476d8bc30999b0f28d9d03f91775b;hpb=bfca68337bb71d75f7848922c2d0a73837c923cb;p=virtualjaguar diff --git a/src/gui/mainwin.cpp b/src/gui/mainwin.cpp index 24c3dc4..90f192a 100644 --- a/src/gui/mainwin.cpp +++ b/src/gui/mainwin.cpp @@ -245,7 +245,8 @@ void MainWin::Timer(void) } #else JaguarExecuteNew(); - memcpy(videoWidget->buffer, backbuffer, videoWidget->rasterHeight * videoWidget->rasterWidth); +// memcpy(videoWidget->buffer, backbuffer, videoWidget->rasterHeight * videoWidget->rasterWidth); + memcpy(videoWidget->buffer, backbuffer, videoWidget->rasterHeight * videoWidget->textureWidth); // memcpy(surface->pixels, backbuffer, TOMGetVideoModeWidth() * TOMGetVideoModeHeight() * 4); #endif @@ -372,20 +373,23 @@ void MainWin::ToggleRunState(void) for(uint32_t y=0; yrasterHeight; y++) videoWidget->buffer[(y * videoWidget->textureWidth) + x] = 0x00000000; #else - for(uint32_t i=0; itextureWidth * 256; i++) { uint32_t pixel = backbuffer[i]; - uint8_t b = (pixel >> 16) & 0xFF, g = (pixel >> 8) & 0xFF, r = pixel & 0xFF; +// uint8_t b = (pixel >> 16) & 0xFF, g = (pixel >> 8) & 0xFF, r = pixel & 0xFF; + uint8_t r = (pixel >> 24) & 0xFF, g = (pixel >> 16) & 0xFF, b = (pixel >> 8) & 0xFF; pixel = ((r + g + b) / 3) & 0x00FF; - backbuffer[i] = 0xFF000000 | (pixel << 16) | (pixel << 8); +// backbuffer[i] = 0xFF000000 | (pixel << 16) | (pixel << 8); + backbuffer[i] = 0x000000FF | (pixel << 16) | (pixel << 8); } - memcpy(videoWidget->buffer, backbuffer, videoWidget->rasterHeight * videoWidget->rasterWidth); +// memcpy(videoWidget->buffer, backbuffer, videoWidget->rasterHeight * videoWidget->rasterWidth); + memcpy(videoWidget->buffer, backbuffer, videoWidget->rasterHeight * videoWidget->textureWidth); #endif videoWidget->updateGL(); } - } void MainWin::SetZoom100(void)