]> Shamusworld >> Repos - apple2/blobdiff - src/apple2.cpp
Added initial emulator configuration window, cleanup of settings code.
[apple2] / src / apple2.cpp
index ce38ed1721890d9de75bddf65e75adf3d95a550b..e97363afdf68a4ea4555c383645fdc4b81e20f70 100644 (file)
@@ -45,7 +45,9 @@
 #include <stdlib.h>
 #include <string>
 #include <time.h>
-#include "firmware.h"
+#include "firmware/apple2-fw.h"
+#include "firmware/apple2e-enh.h"
+#include "firmware/firmware.h"
 #include "floppydrive.h"
 #include "harddrive.h"
 #include "log.h"
@@ -55,8 +57,9 @@
 #include "sound.h"
 #include "timing.h"
 #include "video.h"
-#include "gui/gui.h"
 #include "gui/diskselector.h"
+#include "gui/config.h"
+#include "gui/gui.h"
 
 // Debug and misc. defines
 
@@ -556,11 +559,15 @@ int main(int /*argc*/, char * /*argv*/[])
        mainCPU.Timer = AppleTimer;
        mainCPU.cpuFlags |= V65C02_ASSERT_LINE_RESET;
 
+#if 0
        if (!LoadImg(settings.BIOSPath, rom + 0xC000, 0x4000))
        {
                WriteLog("Could not open file '%s'!\n", settings.BIOSPath);
                return -1;
        }
+#else
+       memcpy(rom + 0xC000, apple2eEnhROM, 0x4000);
+#endif
 
        WriteLog("About to initialize video...\n");
 
@@ -667,9 +674,9 @@ while (pc < 0x9FF)
 }
 #endif
 
+       SaveSettings();
        SoundDone();
        VideoDone();
-       SaveSettings();
        LogDone();
 
        return 0;
@@ -746,6 +753,10 @@ static void FrameCallback(void)
                        if (event.key.repeat != 0)
                                break;
 
+                       // This breaks IMEs and the like, but we'll do simple for now
+                       if (GUI::KeyDown(event.key.keysym.sym))
+                               break;
+
                        // Use CTRL+SHIFT+Q to exit, as well as the usual window decoration
                        // method
                        if ((event.key.keysym.mod & KMOD_CTRL)
@@ -1027,7 +1038,7 @@ else if (event.key.keysym.sym == SDLK_F9)
 
        // Hide the mouse if it's been 1s since the last time it was moved
        // N.B.: Should disable mouse hiding if it's over the GUI...
-       if ((hideMouseTimeout > 0) && !(GUI::sidebarState == SBS_SHOWN || DiskSelector::showWindow == true))
+       if ((hideMouseTimeout > 0) && !(GUI::sidebarState == SBS_SHOWN || DiskSelector::showWindow == true || Config::showWindow == true))
                hideMouseTimeout--;
        else if (hideMouseTimeout == 0)
        {