// We'll make the VJ core modular so that it doesn't matter what GUI is in
// use, we can drop it in anywhere and use it as-is.
-MainWin::MainWin(): running(false), powerButtonOn(false), showUntunedTankCircuit(true),
+MainWin::MainWin(): running(true), powerButtonOn(false), showUntunedTankCircuit(true),
cartridgeLoaded(false), CDActive(false),//, alpineLoadSuccessful(false),
pauseForFileSelector(false)
{
powerAct->setStatusTip(tr("Powers Jaguar on/off"));
powerAct->setCheckable(true);
powerAct->setChecked(false);
- powerAct->setDisabled(true);
+// powerAct->setDisabled(true);
connect(powerAct, SIGNAL(triggered()), this, SLOT(TogglePowerState()));
pauseAct = new QAction(QIcon(":/res/pause.png"), tr("Pause"), this);
x1Act->setChecked(zoomLevel == 1);
x2Act->setChecked(zoomLevel == 2);
x3Act->setChecked(zoomLevel == 3);
- running = powerAct->isChecked();
+// running = powerAct->isChecked();
ntscAct->setChecked(vjs.hardwareTypeNTSC);
palAct->setChecked(!vjs.hardwareTypeNTSC);
void MainWin::keyPressEvent(QKeyEvent * e)
{
+ // We ignore the Alt key for now, since it causes problems with the GUI
+ if (e->key() == Qt::Key_Alt)
+ {
+ e->accept();
+ return;
+ }
+
HandleKeys(e, true);
}
void MainWin::keyReleaseEvent(QKeyEvent * e)
{
+ // We ignore the Alt key for now, since it causes problems with the GUI
+ if (e->key() == Qt::Key_Alt)
+ {
+ e->accept();
+ return;
+ }
+
HandleKeys(e, false);
}
joypad_0_buttons[i] = (state ? 0x01 : 0x00);
// Pad #2 is screwing up pad #1. Prolly a problem in joystick.cpp...
-// So let's try to fix it there. :-P
+// So let's try to fix it there. :-P [DONE]
if (e->key() == (int)vjs.p2KeyBindings[i])
// joypad_1_buttons[i] = (uint8)state;
joypad_1_buttons[i] = (state ? 0x01 : 0x00);
{
// Otherwise, run the Jaguar simulation
JaguarExecuteNew();
-// memcpy(videoWidget->buffer, backbuffer, videoWidget->rasterHeight * videoWidget->rasterWidth);
- memcpy(videoWidget->buffer, backbuffer, videoWidget->rasterHeight * videoWidget->textureWidth * sizeof(uint32_t));
-// memcpy(surface->pixels, backbuffer, TOMGetVideoModeWidth() * TOMGetVideoModeHeight() * 4);
+//// memcpy(videoWidget->buffer, backbuffer, videoWidget->rasterHeight * videoWidget->rasterWidth);
+//No longer needed--see glwidget.cpp for details!
+// memcpy(videoWidget->buffer, backbuffer, videoWidget->rasterHeight * videoWidget->textureWidth * sizeof(uint32_t));
+//// memcpy(surface->pixels, backbuffer, TOMGetVideoModeWidth() * TOMGetVideoModeHeight() * 4);
}
videoWidget->updateGL();
{
// If the emulator is running, we pause it here and unpause it later
// if we dismiss the file selector without choosing anything
- if (running)
+ if (running && powerButtonOn)
{
ToggleRunState();
pauseForFileSelector = true;
{
CDActive = !CDActive;
+#if 0
if (CDActive)
{
powerAct->setDisabled(false);
{
powerAct->setDisabled(true);
}
+#endif
}
void MainWin::ResizeMainWindow(void)