Common Source Code Project for Qt (a.k.a for FM-7).
Revision | 9ffba9a02431b6ff02e60d68e7262696aa0634cd (tree) |
---|---|
Zeit | 2023-02-08 02:56:48 |
Autor | K.Ohta <whatisthis.sowhat@gmai...> |
Commiter | K.Ohta |
[Qt][EMU_THREAD] Remove unused variables.
@@ -42,7 +42,7 @@ EmuThreadClass::EmuThreadClass(Ui_MainWindowBase *rootWindow, std::shared_ptr<US | ||
42 | 42 | p->set_emu(emu); |
43 | 43 | p->set_osd((OSD*)p_osd); |
44 | 44 | poweroff_notified = false; |
45 | - | |
45 | + | |
46 | 46 | connect(this, SIGNAL(sig_open_binary_load(int, QString)), MainWindow, SLOT(_open_binary_load(int, QString))); |
47 | 47 | connect(this, SIGNAL(sig_open_binary_save(int, QString)), MainWindow, SLOT(_open_binary_save(int, QString))); |
48 | 48 | connect(this, SIGNAL(sig_open_cart(int, QString)), MainWindow, SLOT(_open_cart(int, QString))); |
@@ -53,10 +53,10 @@ EmuThreadClass::EmuThreadClass(Ui_MainWindowBase *rootWindow, std::shared_ptr<US | ||
53 | 53 | connect(this, SIGNAL(sig_open_quick_disk(int, QString)), MainWindow, SLOT(_open_quick_disk(int, QString))); |
54 | 54 | connect(this, SIGNAL(sig_open_bubble(int, QString)), MainWindow, SLOT(_open_bubble(int, QString))); |
55 | 55 | connect(this, SIGNAL(sig_open_b77_bubble(int, QString, int)), this, SLOT(do_open_bubble_casette(int, QString, int))); |
56 | - | |
56 | + | |
57 | 57 | connect(this, SIGNAL(sig_open_cdrom(int, QString)), MainWindow, SLOT(do_open_cdrom(int, QString))); |
58 | 58 | connect(this, SIGNAL(sig_open_laser_disc(int, QString)), MainWindow, SLOT(do_open_laserdisc(int, QString))); |
59 | - | |
59 | + | |
60 | 60 | connect(this, SIGNAL(sig_open_hdd(int, QString)), MainWindow, SLOT(_open_hard_disk(int, QString))); |
61 | 61 | |
62 | 62 | connect(this, SIGNAL(sig_set_b77_num(int, int)), MainWindow, SLOT(set_b77_slot(int, int))); |
@@ -143,14 +143,14 @@ void EmuThreadClass::doWork(const QString ¶ms) | ||
143 | 143 | bool gl_crt_filter_bak = config.use_opengl_filters; |
144 | 144 | int opengl_filter_num_bak = config.opengl_filter_num; |
145 | 145 | //uint32_t key_mod_old = 0xffffffff; |
146 | - int no_draw_count = 0; | |
146 | + int no_draw_count = 0; | |
147 | 147 | bool prevRecordReq = false; |
148 | 148 | double nr_fps = -1.0; |
149 | 149 | int _queue_begin; |
150 | 150 | bool multithread_draw = config.use_separate_thread_draw; |
151 | 151 | |
152 | 152 | bool state_power_off = false; |
153 | - | |
153 | + | |
154 | 154 | doing_debug_command = false; |
155 | 155 | ctext.clear(); |
156 | 156 | // draw_timing = false; |
@@ -185,9 +185,6 @@ void EmuThreadClass::doWork(const QString ¶ms) | ||
185 | 185 | for(int i = 0; i < using_flags->get_max_drive(); i++) { |
186 | 186 | fd_text[i].clear(); |
187 | 187 | fd_lamp[i] = QString::fromUtf8("×"); |
188 | - fd_open_wait_count[i] = 0; | |
189 | - fd_reserved_path[i].clear(); | |
190 | - fd_reserved_bank[i] = 0; | |
191 | 188 | } |
192 | 189 | for(int i = 0; i < using_flags->get_max_tape(); i++) { |
193 | 190 | cmt_text[i].clear(); |
@@ -206,7 +203,7 @@ void EmuThreadClass::doWork(const QString ¶ms) | ||
206 | 203 | } |
207 | 204 | _queue_begin = parse_command_queue(virtualMediaList, 0); |
208 | 205 | //SDL_SetHint(SDL_HINT_TIMER_RESOLUTION, "2"); |
209 | - | |
206 | + | |
210 | 207 | do { |
211 | 208 | //p_emu->SetHostCpus(this->idealThreadCount()); |
212 | 209 | if((MainWindow == NULL) || (bBlockTask)) { |
@@ -237,7 +234,7 @@ void EmuThreadClass::doWork(const QString ¶ms) | ||
237 | 234 | emit sig_change_virtual_media(CSP_DockDisks_Domain_HD, ii, config.last_hard_disk_path[ii]); |
238 | 235 | } |
239 | 236 | } |
240 | - | |
237 | + | |
241 | 238 | first = false; |
242 | 239 | } |
243 | 240 | } |
@@ -296,7 +293,7 @@ void EmuThreadClass::doWork(const QString ¶ms) | ||
296 | 293 | req_draw = true; |
297 | 294 | } |
298 | 295 | if(bStartRecordMovieReq != false) { |
299 | - if(!prevRecordReq && (record_fps > 0) && (record_fps < 75)) { | |
296 | + if(!prevRecordReq && (record_fps > 0) && (record_fps < 75)) { | |
300 | 297 | p_emu->start_record_video(record_fps); |
301 | 298 | prevRecordReq = true; |
302 | 299 | } |
@@ -307,7 +304,7 @@ void EmuThreadClass::doWork(const QString ¶ms) | ||
307 | 304 | prevRecordReq = false; |
308 | 305 | } |
309 | 306 | } |
310 | -#if defined(USE_LASER_DISC) || defined(USE_MOVIE_PLAYER) | |
307 | +#if defined(USE_LASER_DISC) || defined(USE_MOVIE_PLAYER) | |
311 | 308 | if(turn_count < 128) { |
312 | 309 | turn_count++; |
313 | 310 | } else { |
@@ -329,7 +326,7 @@ void EmuThreadClass::doWork(const QString ¶ms) | ||
329 | 326 | // 20221011 K.O |
330 | 327 | // Note: Maybe not need below, cause lock-up at starting debugger. |
331 | 328 | //emit sig_is_enable_mouse(p_emu->is_mouse_enabled()); |
332 | -#endif | |
329 | +#endif | |
333 | 330 | #if defined(USE_SOUND_VOLUME) |
334 | 331 | for(int ii = 0; ii < USE_SOUND_VOLUME; ii++) { |
335 | 332 | if(bUpdateVolumeReq[ii]) { |
@@ -342,7 +339,7 @@ void EmuThreadClass::doWork(const QString ¶ms) | ||
342 | 339 | while(!is_empty_key()) { |
343 | 340 | key_queue_t sp; |
344 | 341 | dequeue_key(&sp); |
345 | - //printf("%08x %04x %08x %d\n", sp.type, sp.code, sp.mod, sp.repeat); | |
342 | + //printf("%08x %04x %08x %d\n", sp.type, sp.code, sp.mod, sp.repeat); | |
346 | 343 | switch(sp.type) { |
347 | 344 | case KEY_QUEUE_UP: |
348 | 345 | key_mod = sp.mod; |
@@ -363,7 +360,7 @@ void EmuThreadClass::doWork(const QString ¶ms) | ||
363 | 360 | } |
364 | 361 | } |
365 | 362 | } |
366 | - | |
363 | + | |
367 | 364 | if(!(half_count) && (multithread_draw)) { |
368 | 365 | if(nr_fps < 0.0) { |
369 | 366 | nr_fps = get_emu_frame_rate(); |
@@ -381,7 +378,7 @@ void EmuThreadClass::doWork(const QString ¶ms) | ||
381 | 378 | // After frame, delayed open |
382 | 379 | if(!(half_count)) { |
383 | 380 | led_data = 0x00; |
384 | - | |
381 | + | |
385 | 382 | USING_FLAGS *up = using_flags.get(); |
386 | 383 | bool _ind_caps_kana = false; |
387 | 384 | bool _key_lock = false; |
@@ -389,7 +386,7 @@ void EmuThreadClass::doWork(const QString ¶ms) | ||
389 | 386 | if(up != nullptr) { |
390 | 387 | _ind_caps_kana = up->get_independent_caps_kana_led(); |
391 | 388 | _key_lock = up->get_use_key_locked(); |
392 | - _led_shift = up->get_use_led_devices(); | |
389 | + _led_shift = up->get_use_led_devices(); | |
393 | 390 | if(up->is_use_minimum_rendering()) { |
394 | 391 | req_draw |= p_emu->is_screen_changed(); |
395 | 392 | } else { |
@@ -463,7 +460,7 @@ void EmuThreadClass::doWork(const QString ¶ms) | ||
463 | 460 | no_draw_count = 0; |
464 | 461 | //emit sig_draw_thread(true); |
465 | 462 | } |
466 | - if(!(half_count)) | |
463 | + if(!(half_count)) | |
467 | 464 | { |
468 | 465 | double nd; |
469 | 466 | nd = p_emu->get_frame_rate(); |
@@ -489,7 +486,7 @@ void EmuThreadClass::doWork(const QString ¶ms) | ||
489 | 486 | } |
490 | 487 | } else if(++skip_frames > MAX_SKIP_FRAMES) { |
491 | 488 | // update window at least once per 10 frames |
492 | - if(!(half_count)) | |
489 | + if(!(half_count)) | |
493 | 490 | { |
494 | 491 | double nd; |
495 | 492 | nd = p_emu->get_frame_rate(); |
@@ -544,7 +541,7 @@ _exit: | ||
544 | 541 | state_power_off = true; |
545 | 542 | } |
546 | 543 | #endif |
547 | - | |
544 | + | |
548 | 545 | if(csp_logger != NULL) { |
549 | 546 | csp_logger->debug_log(CSP_LOG_INFO, CSP_LOG_TYPE_GENERAL, |
550 | 547 | "EmuThread : EXIT"); |
@@ -557,6 +554,3 @@ const _TCHAR *EmuThreadClass::get_device_name(void) | ||
557 | 554 | { |
558 | 555 | return (const _TCHAR *)_T(DEVICE_NAME); |
559 | 556 | } |
560 | - | |
561 | - | |
562 | - |
@@ -228,7 +228,7 @@ const int auto_key_table_base_us[][2] = { | ||
228 | 228 | {0x2d, 0x000 | 0xbd}, // '-' |
229 | 229 | {0x2e, 0x000 | 0xbe}, // '.' |
230 | 230 | {0x2f, 0x000 | 0xbf}, // '/' |
231 | - | |
231 | + | |
232 | 232 | {0x30, 0x000 | 0x30}, // '0' |
233 | 233 | {0x31, 0x000 | 0x31}, // '1' |
234 | 234 | {0x32, 0x000 | 0x32}, // '2' |
@@ -239,7 +239,7 @@ const int auto_key_table_base_us[][2] = { | ||
239 | 239 | {0x37, 0x000 | 0x37}, // '7' |
240 | 240 | {0x38, 0x000 | 0x38}, // '8' |
241 | 241 | {0x39, 0x000 | 0x39}, // '9' |
242 | - | |
242 | + | |
243 | 243 | {0x3a, 0x100 | 0xbb}, // ':' |
244 | 244 | {0x3b, 0x000 | 0xbb}, // ';' |
245 | 245 | {0x3c, 0x100 | 0xbc}, // '<' |
@@ -247,7 +247,7 @@ const int auto_key_table_base_us[][2] = { | ||
247 | 247 | {0x3e, 0x100 | 0xbe}, // '>' |
248 | 248 | {0x3f, 0x100 | 0xbf}, // '?' |
249 | 249 | {0x40, 0x100 | 0x32}, // '@' |
250 | - | |
250 | + | |
251 | 251 | {0x41, 0x400 | 0x41}, // 'A' |
252 | 252 | {0x42, 0x400 | 0x42}, // 'B' |
253 | 253 | {0x43, 0x400 | 0x43}, // 'C' |
@@ -281,7 +281,7 @@ const int auto_key_table_base_us[][2] = { | ||
281 | 281 | {0x5e, 0x100 | 0x36}, // '^' |
282 | 282 | {0x5f, 0x100 | 0xbd}, // '_' |
283 | 283 | {0x60, 0x000 | 0xdd}, // '`' |
284 | - | |
284 | + | |
285 | 285 | {0x61, 0x800 | 0x41}, // 'a' |
286 | 286 | {0x62, 0x800 | 0x42}, // 'b' |
287 | 287 | {0x63, 0x800 | 0x43}, // 'c' |
@@ -450,7 +450,7 @@ const int auto_key_table_50on_base[][2] = { | ||
450 | 450 | void EmuThreadClassBase::do_start_auto_key(QString ctext) |
451 | 451 | { |
452 | 452 | //QMutexLocker _locker(&uiMutex); |
453 | - | |
453 | + | |
454 | 454 | if(using_flags->is_use_auto_key()) { |
455 | 455 | QTextCodec *codec = QTextCodec::codecForName("Shift-Jis"); |
456 | 456 | QByteArray array; |
@@ -515,10 +515,7 @@ void EmuThreadClassBase::do_close_floppy_disk(int drv) | ||
515 | 515 | if(p.get() == nullptr) return; |
516 | 516 | if((p->get_max_drive() > drv) && (p->is_use_fd())) { |
517 | 517 | p_emu->close_floppy_disk(drv); |
518 | - //fd_open_wait_count[drv] = (int)(get_emu_frame_rate() * 1.0); | |
519 | 518 | emit sig_change_virtual_media(CSP_DockDisks_Domain_FD, drv, QString::fromUtf8("")); |
520 | - fd_reserved_path[drv].clear(); | |
521 | - fd_open_wait_count[drv] = 0; | |
522 | 519 | } |
523 | 520 | } |
524 | 521 |
@@ -526,36 +523,32 @@ void EmuThreadClassBase::do_open_floppy_disk(int drv, QString path, int bank) | ||
526 | 523 | { |
527 | 524 | if(path.isEmpty()) return; |
528 | 525 | if(path.isNull()) return; |
529 | - | |
526 | + | |
530 | 527 | std::shared_ptr<USING_FLAGS> p = using_flags; |
531 | 528 | if(p.get() == nullptr) return; |
532 | 529 | if(!(using_flags->is_use_fd())) return; |
533 | - if(!((p->get_max_drive() > drv) && (p->is_use_fd()))) return; | |
534 | - | |
530 | + if(!((p->get_max_drive() > drv) && (p->is_use_fd()))) return; | |
531 | + | |
535 | 532 | const _TCHAR *file_path = (const _TCHAR *)(path.toLocal8Bit().constData()); |
536 | 533 | if(!(FILEIO::IsFileExisting(file_path))) return; // File not found. |
537 | 534 | |
538 | - bool reserved = p_emu->is_floppy_disk_inserted(drv); | |
539 | 535 | p_emu->open_floppy_disk(drv, file_path, bank); |
540 | - | |
541 | - fd_open_wait_count[drv] = (int)(get_emu_frame_rate() * 0.05); | |
542 | - fd_reserved_path[drv] = path; | |
543 | 536 | } |
544 | 537 | |
545 | 538 | |
546 | 539 | void EmuThreadClassBase::do_select_floppy_disk_d88(int drive, int slot) |
547 | 540 | { |
548 | 541 | if(p_emu == nullptr) return; |
549 | - | |
542 | + | |
550 | 543 | int bank_num = p_emu->d88_file[drive].bank_num; |
551 | 544 | if(bank_num <= 0) return; |
552 | - | |
545 | + | |
553 | 546 | std::shared_ptr<USING_FLAGS>p = using_flags; |
554 | 547 | if(p.get() == nullptr) return; |
555 | 548 | if(p->get_max_d88_banks() <= slot) slot = p->get_max_d88_banks() - 1; |
556 | 549 | if(slot < 0) return; |
557 | 550 | if(bank_num <= slot) return; |
558 | - | |
551 | + | |
559 | 552 | if((p_emu->is_floppy_disk_inserted(drive)) && |
560 | 553 | (slot != p_emu->d88_file[drive].cur_bank)) { |
561 | 554 | QString path = get_d88_file_path(drive); |
@@ -566,10 +559,13 @@ void EmuThreadClassBase::do_select_floppy_disk_d88(int drive, int slot) | ||
566 | 559 | |
567 | 560 | void EmuThreadClassBase::do_play_tape(int drv, QString name) |
568 | 561 | { |
569 | - if(using_flags->is_use_tape()) { | |
562 | + if(p_emu == nullptr) return; | |
563 | + std::shared_ptr<USING_FLAGS>p = using_flags; | |
564 | + if(p.get() == nullptr) return; | |
565 | + | |
566 | + if(p->is_use_tape()) { | |
570 | 567 | //QMutexLocker _locker(&uiMutex); |
571 | 568 | p_emu->play_tape(drv, name.toLocal8Bit().constData()); |
572 | - emit sig_change_virtual_media(CSP_DockDisks_Domain_CMT, drv, name); | |
573 | 569 | } |
574 | 570 | } |
575 | 571 |
@@ -651,7 +647,7 @@ void EmuThreadClassBase::done_open_tape(int drive, QString path) | ||
651 | 647 | _TCHAR path_shadow[_MAX_PATH] = {0}; |
652 | 648 | strncpy(path_shadow, path.toLocal8Bit().constData(), _MAX_PATH - 1); |
653 | 649 | UPDATE_HISTORY(path_shadow, p_config->recent_tape_path[drive], list); |
654 | - | |
650 | + | |
655 | 651 | const _TCHAR* __dir = get_parent_dir((const _TCHAR *)path_shadow); |
656 | 652 | strncpy(p_config->initial_tape_dir, __dir, _MAX_PATH - 1); |
657 | 653 |
@@ -749,7 +745,7 @@ void EmuThreadClassBase::done_open_compact_disc(int drive, QString path) | ||
749 | 745 | _TCHAR path_shadow[_MAX_PATH] = {0}; |
750 | 746 | strncpy(path_shadow, path.toLocal8Bit().constData(), _MAX_PATH - 1); |
751 | 747 | UPDATE_HISTORY(path_shadow, p_config->recent_compact_disc_path[drive], list); |
752 | - | |
748 | + | |
753 | 749 | const _TCHAR* __dir = get_parent_dir((const _TCHAR *)path_shadow); |
754 | 750 | strncpy(p_config->initial_compact_disc_dir, __dir, _MAX_PATH - 1); |
755 | 751 |
@@ -795,7 +791,7 @@ void EmuThreadClassBase::done_open_hard_disk(int drive, QString path) | ||
795 | 791 | _TCHAR path_shadow[_MAX_PATH] = {0}; |
796 | 792 | strncpy(path_shadow, path.toLocal8Bit().constData(), _MAX_PATH - 1); |
797 | 793 | UPDATE_HISTORY(path_shadow, p_config->recent_hard_disk_path[drive], list); |
798 | - | |
794 | + | |
799 | 795 | const _TCHAR* __dir = get_parent_dir((const _TCHAR *)path_shadow); |
800 | 796 | strncpy(p_config->initial_hard_disk_dir, __dir, _MAX_PATH - 1); |
801 | 797 |
@@ -842,7 +838,7 @@ void EmuThreadClassBase::done_open_cart(int drive, QString path) | ||
842 | 838 | _TCHAR path_shadow[_MAX_PATH] = {0}; |
843 | 839 | strncpy(path_shadow, path.toLocal8Bit().constData(), _MAX_PATH - 1); |
844 | 840 | UPDATE_HISTORY(path_shadow, p_config->recent_cart_path[drive], list); |
845 | - | |
841 | + | |
846 | 842 | const _TCHAR* __dir = get_parent_dir((const _TCHAR *)path_shadow); |
847 | 843 | strncpy(p_config->initial_cart_dir, __dir, _MAX_PATH - 1); |
848 | 844 |
@@ -888,7 +884,7 @@ void EmuThreadClassBase::done_open_laser_disc(int drive, QString path) | ||
888 | 884 | _TCHAR path_shadow[_MAX_PATH] = {0}; |
889 | 885 | strncpy(path_shadow, path.toLocal8Bit().constData(), _MAX_PATH - 1); |
890 | 886 | UPDATE_HISTORY(path_shadow, p_config->recent_laser_disc_path[drive], list); |
891 | - | |
887 | + | |
892 | 888 | const _TCHAR* __dir = get_parent_dir((const _TCHAR *)path_shadow); |
893 | 889 | strncpy(p_config->initial_laser_disc_dir, __dir, _MAX_PATH - 1); |
894 | 890 |
@@ -973,15 +969,15 @@ void EmuThreadClassBase::do_close_bubble_casette(int drv) | ||
973 | 969 | void EmuThreadClassBase::do_open_bubble_casette(int drv, QString path, int bank) |
974 | 970 | { |
975 | 971 | if(!(using_flags->is_use_bubble())) return; |
976 | - | |
972 | + | |
977 | 973 | //QMutexLocker _locker(&uiMutex); |
978 | 974 | QByteArray localPath = path.toLocal8Bit(); |
979 | - | |
975 | + | |
980 | 976 | p_emu->b77_file[drv].bank_num = 0; |
981 | 977 | p_emu->b77_file[drv].cur_bank = -1; |
982 | - | |
978 | + | |
983 | 979 | if(check_file_extension(localPath.constData(), ".b77")) { |
984 | - | |
980 | + | |
985 | 981 | FILEIO *fio = new FILEIO(); |
986 | 982 | if(fio->Fopen(localPath.constData(), FILEIO_READ_BINARY)) { |
987 | 983 | try { |
@@ -994,7 +990,7 @@ void EmuThreadClassBase::do_open_bubble_casette(int drv, QString path, int bank) | ||
994 | 990 | fio->Fread(tmp, 16, 1); |
995 | 991 | memset(p_emu->b77_file[drv].bubble_name[p_emu->b77_file[drv].bank_num], 0x00, 128); |
996 | 992 | if(strlen(tmp) > 0) Convert_CP932_to_UTF8(p_emu->b77_file[drv].bubble_name[p_emu->b77_file[drv].bank_num], tmp, 127, 17); |
997 | - | |
993 | + | |
998 | 994 | fio->Fseek(file_offset + 0x1c, FILEIO_SEEK_SET); |
999 | 995 | file_offset += fio->FgetUint32_LE(); |
1000 | 996 | p_emu->b77_file[drv].bank_num++; |
@@ -1017,7 +1013,7 @@ void EmuThreadClassBase::do_open_bubble_casette(int drv, QString path, int bank) | ||
1017 | 1013 | p_emu->open_bubble_casette(drv, localPath.constData(), bank); |
1018 | 1014 | emit sig_change_virtual_media(CSP_DockDisks_Domain_Bubble, drv, path); |
1019 | 1015 | emit sig_update_recent_bubble(drv); |
1020 | - | |
1016 | + | |
1021 | 1017 | } |
1022 | 1018 | // Signal from EMU:: -> OSD:: -> EMU_THREAD (-> GUI) |
1023 | 1019 | void EmuThreadClassBase::done_open_bubble(int drive, QString path) |
@@ -1031,13 +1027,13 @@ void EmuThreadClassBase::done_open_bubble(int drive, QString path) | ||
1031 | 1027 | _TCHAR path_shadow[_MAX_PATH] = {0}; |
1032 | 1028 | strncpy(path_shadow, path.toLocal8Bit().constData(), _MAX_PATH - 1); |
1033 | 1029 | UPDATE_HISTORY(path_shadow, p_config->recent_bubble_casette_path[drive], list); |
1034 | - | |
1030 | + | |
1035 | 1031 | const _TCHAR* __dir = get_parent_dir((const _TCHAR *)path_shadow); |
1036 | 1032 | strncpy(p_config->initial_bubble_casette_dir, __dir, _MAX_PATH - 1); |
1037 | 1033 | |
1038 | 1034 | emit sig_ui_update_bubble_casette_list(drive, list); |
1039 | 1035 | emit sig_ui_clear_b77(drive); |
1040 | - | |
1036 | + | |
1041 | 1037 | QString relpath = QString::fromUtf8(""); |
1042 | 1038 | if(strlen(&(__dir[0])) > 1) { |
1043 | 1039 | relpath = QString::fromLocal8Bit(&(__dir[1])); |
@@ -1126,7 +1122,7 @@ void EmuThreadClassBase::moved_mouse(double x, double y, double globalx, double | ||
1126 | 1122 | |
1127 | 1123 | void EmuThreadClassBase::button_pressed_mouse_sub(Qt::MouseButton button) |
1128 | 1124 | { |
1129 | - | |
1125 | + | |
1130 | 1126 | if(using_flags->is_use_one_board_computer() || using_flags->is_use_mouse() || (using_flags->get_max_button() > 0)) { |
1131 | 1127 | int stat = p_osd->get_mouse_button(); |
1132 | 1128 | bool flag = (p_osd->is_mouse_enabled() || using_flags->is_use_one_board_computer() || (using_flags->get_max_button() > 0)); |
@@ -1148,11 +1144,11 @@ void EmuThreadClassBase::button_pressed_mouse_sub(Qt::MouseButton button) | ||
1148 | 1144 | if(!flag) return; |
1149 | 1145 | p_osd->set_mouse_button(stat); |
1150 | 1146 | } |
1151 | -} | |
1147 | +} | |
1152 | 1148 | |
1153 | 1149 | void EmuThreadClassBase::button_released_mouse_sub(Qt::MouseButton button) |
1154 | 1150 | { |
1155 | - | |
1151 | + | |
1156 | 1152 | if(using_flags->is_use_one_board_computer() || using_flags->is_use_mouse() || (using_flags->get_max_button() > 0)) { |
1157 | 1153 | int stat = p_osd->get_mouse_button(); |
1158 | 1154 | switch(button) { |
@@ -1187,5 +1183,3 @@ void EmuThreadClassBase::dec_message_count(void) | ||
1187 | 1183 | { |
1188 | 1184 | p_emu->message_count--; |
1189 | 1185 | } |
1190 | - | |
1191 | - |
@@ -60,7 +60,7 @@ QT_BEGIN_NAMESPACE | ||
60 | 60 | enum { |
61 | 61 | KEY_QUEUE_DOWN = 0x10000000, |
62 | 62 | KEY_QUEUE_UP = 0x20000000, |
63 | -}; | |
63 | +}; | |
64 | 64 | typedef struct { |
65 | 65 | uint32_t type; |
66 | 66 | uint32_t code; |
@@ -76,7 +76,7 @@ protected: | ||
76 | 76 | OSD_BASE *p_osd; |
77 | 77 | |
78 | 78 | bool poweroff_notified; |
79 | - | |
79 | + | |
80 | 80 | bool now_skip; |
81 | 81 | bool calc_message; |
82 | 82 | bool tape_play_flag; |
@@ -91,12 +91,12 @@ protected: | ||
91 | 91 | FIFO *key_fifo; |
92 | 92 | QOpenGLContext *glContext; |
93 | 93 | bool is_shared_glcontext; |
94 | - | |
94 | + | |
95 | 95 | uint32_t key_mod; |
96 | 96 | |
97 | 97 | std::shared_ptr<USING_FLAGS> using_flags; |
98 | 98 | config_t *p_config; |
99 | - | |
99 | + | |
100 | 100 | QWaitCondition *drawCond; |
101 | 101 | #if QT_VERSION >= 0x051400 |
102 | 102 | QRecursiveMutex keyMutex; |
@@ -104,11 +104,11 @@ protected: | ||
104 | 104 | #else |
105 | 105 | QMutex keyMutex; |
106 | 106 | QMutex mouseMutex; |
107 | -#endif | |
107 | +#endif | |
108 | 108 | //class META_MainWindow *MainWindow; |
109 | 109 | Ui_MainWindowBase *MainWindow; |
110 | 110 | QElapsedTimer tick_timer; |
111 | - | |
111 | + | |
112 | 112 | bool bBlockTask; |
113 | 113 | bool bRunThread; |
114 | 114 | bool bResetReq; |
@@ -124,14 +124,11 @@ protected: | ||
124 | 124 | |
125 | 125 | #if QT_VERSION >= 0x051400 |
126 | 126 | QRecursiveMutex uiMutex; |
127 | -#else | |
127 | +#else | |
128 | 128 | QMutex uiMutex; |
129 | 129 | #endif |
130 | 130 | char dbg_prev_command[MAX_COMMAND_LEN]; |
131 | - int fd_open_wait_count[8]; | |
132 | - QString fd_reserved_path[8]; | |
133 | - int fd_reserved_bank[8]; | |
134 | - | |
131 | + | |
135 | 132 | // bool draw_timing; |
136 | 133 | bool doing_debug_command; |
137 | 134 | bool bUpdateVolumeReq[32]; |
@@ -155,7 +152,7 @@ protected: | ||
155 | 152 | QString cdrom_text[4]; |
156 | 153 | QString laserdisc_text[4]; |
157 | 154 | QString bubble_text[16]; |
158 | - | |
155 | + | |
159 | 156 | QString clipBoardText; |
160 | 157 | QStringList vMovieQueue; |
161 | 158 |
@@ -163,10 +160,10 @@ protected: | ||
163 | 160 | void calc_volume_from_balance(int num, int balance); |
164 | 161 | void calc_volume_from_level(int num, int level); |
165 | 162 | int parse_command_queue(QStringList _l, int _begin); |
166 | - | |
163 | + | |
167 | 164 | void button_pressed_mouse_sub(Qt::MouseButton button); |
168 | 165 | void button_released_mouse_sub(Qt::MouseButton button); |
169 | - | |
166 | + | |
170 | 167 | void get_qd_string(void); |
171 | 168 | void get_fd_string(void); |
172 | 169 | void get_hdd_string(void); |
@@ -251,11 +248,11 @@ public: | ||
251 | 248 | bool is_floppy_disk_protected(int drive); |
252 | 249 | void set_floppy_disk_protected(int drive, bool flag); |
253 | 250 | QString get_d88_file_path(int drive); |
254 | - | |
255 | - | |
251 | + | |
252 | + | |
256 | 253 | public slots: |
257 | 254 | void doExit(void); |
258 | - | |
255 | + | |
259 | 256 | void do_reset(void); |
260 | 257 | void do_notify_power_off(void); |
261 | 258 | void do_special_reset(void); |
@@ -286,10 +283,10 @@ public slots: | ||
286 | 283 | void do_write_protect_floppy_disk(int drv, bool flag); |
287 | 284 | void do_close_floppy_disk(int); |
288 | 285 | void do_open_floppy_disk(int, QString, int); |
289 | - | |
286 | + | |
290 | 287 | void do_close_hard_disk(int); |
291 | 288 | void do_open_hard_disk(int, QString); |
292 | - | |
289 | + | |
293 | 290 | void do_play_tape(int drv, QString name); |
294 | 291 | void do_rec_tape(int drv, QString name); |
295 | 292 | void do_close_tape(int drv); |
@@ -299,27 +296,27 @@ public slots: | ||
299 | 296 | void do_cmt_push_fast_rewind(int drv); |
300 | 297 | void do_cmt_push_apss_forward(int drv); |
301 | 298 | void do_cmt_push_apss_rewind(int drv); |
302 | - | |
299 | + | |
303 | 300 | void do_write_protect_quickdisk(int drv, bool flag); |
304 | 301 | void do_close_quickdisk(int drv); |
305 | 302 | void do_open_quickdisk(int drv, QString path); |
306 | - | |
303 | + | |
307 | 304 | void do_close_cart(int drv); |
308 | 305 | void do_open_cart(int drv, QString path); |
309 | - | |
306 | + | |
310 | 307 | void do_close_laser_disc(int drv); |
311 | 308 | void do_open_laser_disc(int drv, QString path); |
312 | - | |
309 | + | |
313 | 310 | void do_eject_cdrom(int drv); |
314 | 311 | void do_open_cdrom(int drv, QString path); |
315 | - | |
312 | + | |
316 | 313 | void do_load_binary(int drv, QString path); |
317 | 314 | void do_save_binary(int drv, QString path); |
318 | - | |
315 | + | |
319 | 316 | void do_write_protect_bubble_casette(int drv, bool flag); |
320 | 317 | void do_close_bubble_casette(int); |
321 | 318 | void do_open_bubble_casette(int, QString, int); |
322 | - | |
319 | + | |
323 | 320 | void do_start_auto_key(QString text); |
324 | 321 | void do_stop_auto_key(void); |
325 | 322 | void set_romakana(bool flag); |
@@ -336,16 +333,16 @@ public slots: | ||
336 | 333 | |
337 | 334 | void done_open_compact_disc(int drive, QString path); |
338 | 335 | void done_close_compact_disc(int drive); |
339 | - | |
336 | + | |
340 | 337 | void done_open_hard_disk(int drive, QString path); |
341 | 338 | void done_close_hard_disk(int drive); |
342 | - | |
339 | + | |
343 | 340 | void done_open_cart(int drive, QString path); |
344 | 341 | void done_close_cart(int drive); |
345 | 342 | |
346 | 343 | void done_open_laser_disc(int drive, QString path); |
347 | 344 | void done_close_laser_disc(int drive); |
348 | - | |
345 | + | |
349 | 346 | void done_open_binary(int drive, QString path); |
350 | 347 | void done_close_binary(int drive); |
351 | 348 |
@@ -363,11 +360,11 @@ signals: | ||
363 | 360 | int sig_finished(void); |
364 | 361 | int sig_mouse_enable(bool); |
365 | 362 | int sig_update_recent_hard_disk(int); |
366 | - | |
363 | + | |
367 | 364 | int sig_change_osd(int, int, QString); |
368 | 365 | int sig_change_access_lamp(int, int, QString); |
369 | 366 | int sig_change_virtual_media(int, int, QString); |
370 | - | |
367 | + | |
371 | 368 | int sig_update_recent_bubble(int); |
372 | 369 | int sig_change_osd_bubble(int, QString); |
373 | 370 | int sig_set_grid_vertical(int, bool); |
@@ -390,13 +387,13 @@ signals: | ||
390 | 387 | int sig_open_fd(int, QString); |
391 | 388 | int sig_open_d88_fd(int, QString, int); |
392 | 389 | int sig_open_hdd(int, QString); |
393 | - | |
390 | + | |
394 | 391 | int sig_open_quick_disk(int, QString); |
395 | 392 | int sig_open_bubble(int, QString); |
396 | 393 | int sig_open_b77_bubble(int, QString, int); |
397 | 394 | int sig_open_cdrom(int, QString); |
398 | 395 | int sig_open_laser_disc(int, QString); |
399 | - | |
396 | + | |
400 | 397 | int sig_set_b77_num(int, int); |
401 | 398 | |
402 | 399 | // From emu_thread_slots.cpp . |
@@ -409,34 +406,34 @@ signals: | ||
409 | 406 | int sig_ui_clear_d88(int); |
410 | 407 | int sig_ui_update_d88(int, int, QString); |
411 | 408 | int sig_ui_select_d88(int, int); |
412 | - | |
409 | + | |
413 | 410 | int sig_ui_update_tape_list(int, QStringList); |
414 | 411 | int sig_ui_close_tape(int); |
415 | 412 | |
416 | 413 | int sig_ui_update_quick_disk_list(int, QStringList); |
417 | 414 | int sig_ui_close_quick_disk(int); |
418 | - | |
415 | + | |
419 | 416 | int sig_ui_update_compact_disc_list(int, QStringList); |
420 | 417 | int sig_ui_close_compact_disc(int); |
421 | 418 | |
422 | 419 | int sig_ui_update_hard_disk_list(int, QStringList); |
423 | 420 | int sig_ui_close_hard_disk(int); |
424 | - | |
421 | + | |
425 | 422 | int sig_ui_update_cart_list(int, QStringList); |
426 | 423 | int sig_ui_close_cart(int); |
427 | - | |
424 | + | |
428 | 425 | int sig_ui_update_laser_disc_list(int, QStringList); |
429 | 426 | int sig_ui_close_laser_disc(int); |
430 | 427 | |
431 | 428 | int sig_ui_update_binary_list(int, QStringList); |
432 | 429 | int sig_ui_close_binary(int); |
433 | - | |
430 | + | |
434 | 431 | int sig_ui_update_bubble_casette_list(int, QStringList); |
435 | 432 | int sig_ui_close_bubble_casette(int); |
436 | 433 | int sig_ui_clear_b77(int); |
437 | 434 | int sig_ui_update_b77(int, int, QString); |
438 | 435 | int sig_ui_select_b77(int, int); |
439 | - | |
436 | + | |
440 | 437 | }; |
441 | 438 | |
442 | 439 | QT_END_NAMESPACE |