Cosmetic changes on UI and icons.
[clinton/Virtual-Jaguar-Rx.git] / src / gui / mainwin.cpp
index a3ff16d..0bbf2df 100644 (file)
@@ -90,7 +90,7 @@
 #include "joystick.h"\r
 #include "m68000/m68kinterface.h"\r
 \r
-#include "debugger/VideoWin.h"\r
+//#include "debugger/VideoWin.h"\r
 #include "debugger/DasmWin.h"\r
 #include "debugger/m68KDasmWin.h"\r
 #include "debugger/GPUDasmWin.h"\r
@@ -184,7 +184,7 @@ MainWin::MainWin(bool autoRun): running(true), powerButtonOn(false),
        riscDasmBrowseWin = new RISCDasmBrowserWindow(this);\r
        if (vjs.softTypeDebugger)\r
        {\r
-               VideoOutputWin = new VideoOutputWindow(this);\r
+               //VideoOutputWin = new VideoOutputWindow(this);\r
                //VideoOutputWin->setCentralWidget()\r
                //DasmWin = new DasmWindow();\r
                DasmWin = new DasmWindow(this);\r
@@ -230,7 +230,7 @@ MainWin::MainWin(bool autoRun): running(true), powerButtonOn(false),
 \r
        // Create actions\r
 \r
-       quitAppAct = new QAction(tr("E&xit"), this);\r
+       quitAppAct = new QAction(QIcon(":/res/exit.png"), tr("E&xit"), this);\r
 //     quitAppAct->setShortcuts(QKeySequence::Quit);\r
 //     quitAppAct->setShortcut(QKeySequence(tr("Alt+x")));\r
        //quitAppAct->setShortcut(QKeySequence(tr("Ctrl+q")));\r
@@ -329,7 +329,7 @@ MainWin::MainWin(bool autoRun): running(true), powerButtonOn(false),
        configAct->setShortcutContext(Qt::ApplicationShortcut);\r
        connect(configAct, SIGNAL(triggered()), this, SLOT(Configure()));\r
 \r
-       emustatusAct = new QAction(QIcon(""), tr("&Status"), this);\r
+       emustatusAct = new QAction(QIcon(":/res/status.png"), tr("&Status"), this);\r
        emustatusAct->setStatusTip(tr("Emulator status"));\r
        //emustatusAct->setShortcut(QKeySequence(tr("Ctrl+s")));\r
        emustatusAct->setShortcut(QKeySequence(tr(vjs.KBContent[KBEMUSTATUS].KBSettingValue)));\r
@@ -1321,10 +1321,14 @@ void MainWin::LoadSoftware(QString file)
        uint8_t * biosPointer = jaguarBootROM;\r
 \r
        if (vjs.hardwareTypeAlpine)\r
+       {\r
                biosPointer = jaguarDevBootROM2;\r
+       }\r
 \r
        if (vjs.softTypeDebugger)\r
+       {\r
                biosPointer = jaguarDevBootROM2;\r
+       }\r
 \r
        memcpy(jagMemSpace + 0xE00000, biosPointer, 0x20000);\r
 \r
@@ -1340,7 +1344,9 @@ void MainWin::LoadSoftware(QString file)
        // This is icky because we've already done it\r
 // it gets worse :-P\r
        if (!vjs.useJaguarBIOS)\r
+       {\r
                SET32(jaguarMainRAM, 4, jaguarRunAddress);\r
+       }\r
 \r
        m68k_pulse_reset();\r
 \r
@@ -1363,8 +1369,7 @@ void MainWin::LoadSoftware(QString file)
 \r
        if ((!vjs.hardwareTypeAlpine || !vjs.softTypeDebugger) && !loadAndGo && jaguarRunAddress)\r
        {\r
-               QString newTitle = QString("Virtual Jaguar " VJ_RELEASE_VERSION " Rx - Now playing: %1")\r
-                       .arg(filePickWin->GetSelectedPrettyName());\r
+               QString newTitle = QString("Virtual Jaguar " VJ_RELEASE_VERSION " Rx - Now playing: %1").arg(filePickWin->GetSelectedPrettyName());\r
                setWindowTitle(newTitle);\r
        }\r
 }\r
@@ -1408,7 +1413,9 @@ void MainWin::TraceStepInto(void)
 void MainWin::Restart(void)\r
 {\r
        m68k_set_reg(M68K_REG_PC, jaguarRunAddress);\r
+       m68k_set_reg(M68K_REG_SP, vjs.DRAM_size);\r
        //m68kDasmWin->SetAddress(jaguarRunAddress);\r
+       ResetDebuggerWindows();\r
        RefreshDebuggerWindows();\r
 #ifdef _MSC_VER\r
 #pragma message("Warning: !!! Need to verify the Restart function !!!")\r
@@ -1615,7 +1622,7 @@ void MainWin::ShowVideoOutputWin(void)
        //VideoOutputWindowCentrale->setWindowTitle(QString(tr("Video output")));\r
        //VideoOutputWindowCentrale->show();\r
        //memBrowseWin->show();\r
-       VideoOutputWin->show();\r
+       //VideoOutputWin->show();\r
        //VideoOutputWin->RefreshContents(videoWidget);\r
 }\r
 \r
@@ -2094,8 +2101,20 @@ void     MainWin::RefreshAlpineWindows(void)
 }\r
 \r
 \r
+// Reset soft debugger & alpine debug windows\r
+void MainWin::ResetDebuggerWindows(void)\r
+{\r
+       if (vjs.softTypeDebugger)\r
+       {\r
+               heapallocatorBrowseWin->Reset();\r
+       }\r
+\r
+       //ResetAlpineWindows();\r
+}\r
+\r
+\r
 // Refresh soft debugger & alpine debug windows\r
-void   MainWin::RefreshDebuggerWindows(void)\r
+void MainWin::RefreshDebuggerWindows(void)\r
 {\r
        size_t i;\r
 \r