Update to v084 ninja bug-fix.

byuu says:

Hiding the viewport is necessary on Windows to prevent it from
overlapping the status bar. I've changed it to set the size to 1,1 when
nothing is loaded.
That still puts a 1x1 pixel over the status bar when you resize the
window to 1xHeight, but ... you know, don't do that.
Also corrected the mask overscan option for NES/SNES.

Silently updated the bsnes_v084-source.tar.bz2 archive with those fixes,
there were only 48 downloads.
This commit is contained in:
Tim Allen 2011-11-08 22:58:50 +11:00
parent 01750e9c83
commit ae6c3c377d
4 changed files with 13 additions and 14 deletions

View File

@ -94,7 +94,7 @@ void InterfaceGameBoy::videoRefresh(const uint16_t *data) {
}
}
interface->videoRefresh(output, 160 * 4, 160, 144);
interface->videoRefresh(output, 160 * sizeof(uint32_t), 160, 144);
}
void InterfaceGameBoy::audioSample(int16_t csample, int16_t lsample, int16_t rsample) {

View File

@ -120,15 +120,15 @@ void InterfaceNES::videoRefresh(const uint16_t *data) {
for(unsigned y = 0; y < 240; y++) {
uint32_t *dp = output + y * 256;
if(y < osh || y >= 240 - osh) {
memset(dp, 0, 256 * 2);
memset(dp, 0, 256 * sizeof(uint32_t));
} else {
memset(dp + 0, 0, osw * 2);
memset(dp + 256 - osw, 0, osw * 2);
memset(dp + 0, 0, osw * sizeof(uint32_t));
memset(dp + 256 - osw, 0, osw * sizeof(uint32_t));
}
}
}
interface->videoRefresh(output, 256 * 4, 256, 240);
interface->videoRefresh(output, 256 * sizeof(uint32_t), 256, 240);
}
void InterfaceNES::audioSample(int16_t sample) {

View File

@ -292,15 +292,15 @@ void InterfaceSNES::videoRefresh(const uint32_t *data, bool hires, bool interlac
for(unsigned y = 0; y < height; y++) {
uint32_t *dp = output + y * 512;
if(y < osh || y >= height - osh) {
memset(dp, 0, width * 2);
memset(dp, 0, width * sizeof(uint32_t));
} else {
memset(dp + 0, 0, osw * 2);
memset(dp + width - osw, 0, osw * 2);
memset(dp + 0, 0, osw * sizeof(uint32_t));
memset(dp + width - osw, 0, osw * sizeof(uint32_t));
}
}
}
interface->videoRefresh(output, 512 * 4, width, height);
interface->videoRefresh(output, 512 * sizeof(uint32_t), width, height);
}
void InterfaceSNES::audioSample(int16_t lsample, int16_t rsample) {

View File

@ -8,7 +8,6 @@ void Utility::setMode(Interface::Mode mode) {
mainWindow->nesMenu.setVisible(false);
mainWindow->snesMenu.setVisible(false);
mainWindow->gameBoyMenu.setVisible(false);
mainWindow->viewport.setVisible(mode != Interface::Mode::None);
if(mode == Interface::Mode::None) {
mainWindow->setTitle(application->title);
@ -48,16 +47,16 @@ void Utility::resizeMainWindow(bool shrink) {
unsigned width = geometry.width, height = geometry.height;
switch(interface->mode()) {
case Interface::Mode::None: return;
case Interface::Mode::None: return mainWindow->viewport.setGeometry({ 0, 0, 1, 1 });
case Interface::Mode::NES: width = 256, height = 240; break;
case Interface::Mode::SNES: width = 256, height = 240; break;
case Interface::Mode::GameBoy: width = 160, height = 144; break;
}
if(config->video.correctAspectRatio) {
if(interface->mode() != Interface::Mode::GameBoy) {
width = (double)width * 1.226;
}
if(interface->mode() == Interface::Mode::NES
|| interface->mode() == Interface::Mode::SNES
) width = (double)width * 1.226;
}
unsigned maxW = geometry.width / width;