X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fgui%2Fmainwin.cpp;h=cc5dab1880c251e9001a5f55f60f717d89970007;hb=e310c1d53915d306d8aa9a1bed9bac489bd30b03;hp=713ec11abe9ec101dfe151d4abd71b1c6ed7741b;hpb=3b0e8e7d6be25106bcfa0ee0c78faed597e9a2c6;p=virtualjaguar diff --git a/src/gui/mainwin.cpp b/src/gui/mainwin.cpp index 713ec11..cc5dab1 100644 --- a/src/gui/mainwin.cpp +++ b/src/gui/mainwin.cpp @@ -330,7 +330,7 @@ MainWin::MainWin(bool autoRun): running(true), powerButtonOn(false), // Do this in case original size isn't correct (mostly for the first-run case) ResizeMainWindow(); - // Create our test pattern bitmap + // Create our test pattern bitmaps QImage tempImg(":/res/test-pattern.jpg"); QImage tempImgScaled = tempImg.scaled(VIRTUAL_SCREEN_WIDTH, VIRTUAL_SCREEN_HEIGHT_PAL, Qt::IgnoreAspectRatio, Qt::SmoothTransformation); @@ -345,6 +345,20 @@ MainWin::MainWin(bool autoRun): running(true), powerButtonOn(false), } } + QImage tempImg2(":/res/test-pattern-pal"); + QImage tempImgScaled2 = tempImg2.scaled(VIRTUAL_SCREEN_WIDTH, VIRTUAL_SCREEN_HEIGHT_PAL, Qt::IgnoreAspectRatio, Qt::SmoothTransformation); + + for(uint32_t y=0; yrasterHeight; y++) { - memcpy(videoWidget->buffer + (y * videoWidget->textureWidth), testPattern + (y * VIRTUAL_SCREEN_WIDTH), VIRTUAL_SCREEN_WIDTH * sizeof(uint32_t)); + if (vjs.hardwareTypeNTSC) + memcpy(videoWidget->buffer + (y * videoWidget->textureWidth), testPattern + (y * VIRTUAL_SCREEN_WIDTH), VIRTUAL_SCREEN_WIDTH * sizeof(uint32_t)); + else + memcpy(videoWidget->buffer + (y * videoWidget->textureWidth), testPattern2 + (y * VIRTUAL_SCREEN_WIDTH), VIRTUAL_SCREEN_WIDTH * sizeof(uint32_t)); } } } @@ -1084,7 +1101,10 @@ void MainWin::ResizeMainWindow(void) { for(uint32_t y=0; yrasterHeight; y++) { - memcpy(videoWidget->buffer + (y * videoWidget->textureWidth), testPattern + (y * VIRTUAL_SCREEN_WIDTH), VIRTUAL_SCREEN_WIDTH * sizeof(uint32_t)); + if (vjs.hardwareTypeNTSC) + memcpy(videoWidget->buffer + (y * videoWidget->textureWidth), testPattern + (y * VIRTUAL_SCREEN_WIDTH), VIRTUAL_SCREEN_WIDTH * sizeof(uint32_t)); + else + memcpy(videoWidget->buffer + (y * videoWidget->textureWidth), testPattern2 + (y * VIRTUAL_SCREEN_WIDTH), VIRTUAL_SCREEN_WIDTH * sizeof(uint32_t)); } } @@ -1191,7 +1211,7 @@ WriteLog("Pipelined DSP = %s\n", (vjs.usePipelinedDSP ? "ON" : "off")); ReadProfiles(&settings); } - + void MainWin::WriteSettings(void) { QSettings settings("Underground Software", "Virtual Jaguar");