3 #include "qt_emuevents.h"
5 #include "qt_dialogs.h"
10 void Ui_MainWindow::OnReset(void)
15 void Ui_MainWindow::OnSpecialReset(void)
17 #ifdef USE_SPECIAL_RESET
18 printf("Special Reset\n");
19 if(emu) emu->special_reset();
23 void Ui_MainWindow::OnLoadState(void) // Final entry of load state.
25 if(emu) emu->load_state();
28 void Ui_MainWindow::OnSaveState(void)
30 if(emu) emu->save_state();
39 void Ui_MainWindow::OnCpuPower(int mode)
41 config.cpu_power = mode;
48 void Ui_MainWindow::OnStartAutoKey(void)
51 emu->start_auto_key();
54 void Ui_MainWindow::OnStopAutoKey(void)
62 void Ui_MainWindow::OnOpenDebugger(int no)
64 if((no < 0) || (no > 3)) return;
65 if(emu) emu->open_debugger(no);
67 void Ui_MainWindow::OnCloseDebugger(void )
69 if(emu) emu->close_debugger();
74 // Will move to other file.
75 #if defined(USE_FD1) || defined(USE_FD2) || defined(USE_FD3) || defined(USE_FD4) || defined(USE_FD5) || defined(USE_FD6) || defined(USE_FD7) || defined(USE_FD8)
76 //void OpenRecentFloppy(QWidget *parent, int drv, int num)
78 void OnCloseFD(int drive)
80 if(emu) close_disk(drive);
86 void OnToggleDipSw(int dipsw)
88 if((dipsw < 0) || (dipsw > 31)) return;
89 config.dipswitch ^= (1 << dipsw);
91 void OnChangeDipSw(int dipsw, int flag)
94 if((dipsw < 0) || (dipsw > 31)) return;
96 config.dipswitch &= ~(1 << dipsw);
98 config.dipswitch |= (1 << dipsw);
102 #ifdef USE_DEVICE_TYPE
103 void OnSetDeviceType(int devtype)
105 if((devtype < 0) || (devtype > 7)) return;
106 config.device_type = devtype;
110 #if defined(USE_CART1) || defined(USE_CART2)
114 #if defined(USE_QD1) || defined(USE_QD2)
115 void OnOpenQD(QWidget *parent, int drive)
117 // if(emu) open_quickdisk_dialog(AGWIDGET(hWindow), drive);
120 void OnCloseQD(int drive)
122 // if(emu) emu->close_quickdisk(drive);
125 void OnRecentQD(int drive, int menunum)
130 if((menunum < 0) || (menunum > 7)) return;
131 path = config.recent_quickdisk_path[drive][menunum];
133 for(int i = menunum; i > 0; i--) {
134 strcpy(config.recent_quickdisk_path[drive][i], config.recent_quickdisk_path[drive][i - 1]);
136 strcpy(config.recent_quickdisk_path[drive][0], path.c_str());
138 emu->open_quickdisk(drive, path.c_str());
145 #ifdef USE_TAPE_BUTTON
147 // Implement LASER-DISC, BINARY
150 void OnStartRecordScreen(int num)
153 const int fps[3] = {60, 30, 15};
154 if((num < 0) || (num > 2)) return;
156 emu->start_rec_sound();
157 if(!emu->start_rec_video(fps[num])) {
158 emu->stop_rec_sound();
162 void OnStopRecordScreen(void)
165 emu->stop_rec_video();
166 emu->stop_rec_sound();
170 void OnScreenCapture(QWidget *parent)
172 if(emu) emu->capture_screen();
178 void OnFullScreen(QMainWindow *MainWindow, QWidget *drawspace, int mode)