• R/O
  • HTTP
  • SSH
  • HTTPS

common_source_project-fm7: Commit

Common Source Code Project for Qt (a.k.a for FM-7).


Commit MetaInfo

Revisioncc9d48c53b0e688023eef800ca8d199da80058f1 (tree)
Time2018-12-14 23:00:34
AuthorK.Ohta <whatisthis.sowhat@gmai...>
CommiterK.Ohta

Log Message

[Qt][GUI][WIN32] Fix linkage error building libCSPgui.dll.

Change Summary

Incremental Difference

--- a/source/src/qt/common/util_fd2.cpp
+++ b/source/src/qt/common/util_fd2.cpp
@@ -56,9 +56,9 @@ int Ui_MainWindowBase::set_d88_slot(int drive, int num)
5656
5757 void Ui_MainWindowBase::do_update_recent_disk(int drv)
5858 {
59- if(emu == NULL) return;
59+ if(hRunEmu == NULL) return;
6060 menu_fds[drv]->do_update_histories(listFDs[drv]);
61- menu_fds[drv]->do_set_initialize_directory(config.initial_floppy_disk_dir);
61+ menu_fds[drv]->do_set_initialize_directory(p_config->initial_floppy_disk_dir);
6262 if(hRunEmu != NULL) {
6363 // if(hRunEmu->get_d88_file_cur_bank(drv) != num) {
6464 if(hRunEmu->is_floppy_disk_protected(drv)) {
@@ -78,18 +78,18 @@ int Ui_MainWindowBase::set_recent_disk(int drv, int num)
7878 QString s_path;
7979 char path_shadow[PATH_MAX];
8080 if((num < 0) || (num >= MAX_HISTORY)) return -1;
81- s_path = QString::fromLocal8Bit(config.recent_floppy_disk_path[drv][num]);
81+ s_path = QString::fromLocal8Bit(p_config->recent_floppy_disk_path[drv][num]);
8282 strncpy(path_shadow, s_path.toLocal8Bit().constData(), PATH_MAX - 1);
83- UPDATE_HISTORY(path_shadow, config.recent_floppy_disk_path[drv], listFDs[drv]);
83+ UPDATE_HISTORY(path_shadow, p_config->recent_floppy_disk_path[drv], listFDs[drv]);
8484
85- strncpy(config.initial_floppy_disk_dir, get_parent_dir((const _TCHAR *)path_shadow), _MAX_PATH - 1);
85+ strncpy(p_config->initial_floppy_disk_dir, get_parent_dir((const _TCHAR *)path_shadow), _MAX_PATH - 1);
8686 strncpy(path_shadow, s_path.toLocal8Bit().constData(), PATH_MAX - 1);
8787
8888 // if(emu) {
8989 emit sig_close_disk(drv);
9090 emit sig_open_disk(drv, s_path, 0);
9191 menu_fds[drv]->do_update_histories(listFDs[drv]);
92- menu_fds[drv]->do_set_initialize_directory(config.initial_floppy_disk_dir);
92+ menu_fds[drv]->do_set_initialize_directory(p_config->initial_floppy_disk_dir);
9393 if(check_file_extension(path_shadow, ".d88") || check_file_extension(path_shadow, ".d77")) {
9494 UPDATE_D88_LIST(drv, listD88[drv]);
9595 menu_fds[drv]->do_update_inner_media(listD88[drv], 0);
@@ -104,7 +104,7 @@ int Ui_MainWindowBase::set_recent_disk(int drv, int num)
104104 emit sig_close_disk(drv2);
105105 emit sig_open_disk(drv2, s_path, 1);
106106 menu_fds[drv2]->do_update_histories(listFDs[drv2]);
107- menu_fds[drv2]->do_set_initialize_directory(config.initial_floppy_disk_dir);
107+ menu_fds[drv2]->do_set_initialize_directory(p_config->initial_floppy_disk_dir);
108108 UPDATE_D88_LIST(drv2, listD88[drv2]);
109109 menu_fds[drv2]->do_update_inner_media(listD88[drv2], 1);
110110 }
@@ -121,8 +121,8 @@ void Ui_MainWindowBase::_open_disk(int drv, const QString fname)
121121 if(fname.length() <= 0) return;
122122 drv = drv & 7;
123123 strncpy(path_shadow, fname.toLocal8Bit().constData(), PATH_MAX - 1);
124- UPDATE_HISTORY(path_shadow, config.recent_floppy_disk_path[drv], listFDs[drv]);
125- strcpy(config.initial_floppy_disk_dir, get_parent_dir((const _TCHAR *)path_shadow));
124+ UPDATE_HISTORY(path_shadow, p_config->recent_floppy_disk_path[drv], listFDs[drv]);
125+ strcpy(p_config->initial_floppy_disk_dir, get_parent_dir((const _TCHAR *)path_shadow));
126126 // Update List
127127 strncpy(path_shadow, fname.toLocal8Bit().constData(), PATH_MAX - 1);
128128 // if(emu) {
@@ -130,7 +130,7 @@ void Ui_MainWindowBase::_open_disk(int drv, const QString fname)
130130 //emu->LockVM();
131131 emit sig_open_disk(drv, fname, 0);
132132 menu_fds[drv]->do_update_histories(listFDs[drv]);
133- menu_fds[drv]->do_set_initialize_directory(config.initial_floppy_disk_dir);
133+ menu_fds[drv]->do_set_initialize_directory(p_config->initial_floppy_disk_dir);
134134 if(check_file_extension(path_shadow, ".d88") || check_file_extension(path_shadow, ".d77")) {
135135 UPDATE_D88_LIST(drv, listD88[drv]);
136136 menu_fds[drv]->do_update_inner_media(listD88[drv], 0);
@@ -147,7 +147,7 @@ void Ui_MainWindowBase::_open_disk(int drv, const QString fname)
147147 strncpy(path_shadow, fname.toLocal8Bit().constData(), PATH_MAX - 1);
148148 emit sig_open_disk(drv2, fname, 1);
149149 menu_fds[drv2]->do_update_histories(listFDs[drv2]);
150- menu_fds[drv2]->do_set_initialize_directory(config.initial_floppy_disk_dir);
150+ menu_fds[drv2]->do_set_initialize_directory(p_config->initial_floppy_disk_dir);
151151 UPDATE_D88_LIST(drv2, listD88[drv2]);
152152 menu_fds[drv2]->do_update_inner_media(listD88[drv2], 1);
153153 }
--- a/source/src/qt/common/util_hdd2.cpp
+++ b/source/src/qt/common/util_hdd2.cpp
@@ -13,7 +13,7 @@
1313 void Ui_MainWindowBase::do_update_recent_hard_disk(int drv)
1414 {
1515 menu_hdds[drv]->do_update_histories(listHDDs[drv]);
16- menu_hdds[drv]->do_set_initialize_directory(config.initial_hard_disk_dir);
16+ menu_hdds[drv]->do_set_initialize_directory(p_config->initial_hard_disk_dir);
1717 }
1818
1919 int Ui_MainWindowBase::set_recent_hard_disk(int drv, int num)
@@ -21,18 +21,18 @@ int Ui_MainWindowBase::set_recent_hard_disk(int drv, int num)
2121 QString s_path;
2222 char path_shadow[PATH_MAX];
2323 if((num < 0) || (num >= MAX_HISTORY)) return -1;
24- s_path = QString::fromLocal8Bit(config.recent_hard_disk_path[drv][num]);
24+ s_path = QString::fromLocal8Bit(p_config->recent_hard_disk_path[drv][num]);
2525 strncpy(path_shadow, s_path.toLocal8Bit().constData(), PATH_MAX - 1);
26- UPDATE_HISTORY(path_shadow, config.recent_hard_disk_path[drv], listHDDs[drv]);
26+ UPDATE_HISTORY(path_shadow, p_config->recent_hard_disk_path[drv], listHDDs[drv]);
2727
28- strncpy(config.initial_hard_disk_dir, get_parent_dir((const _TCHAR *)path_shadow), _MAX_PATH - 1);
28+ strncpy(p_config->initial_hard_disk_dir, get_parent_dir((const _TCHAR *)path_shadow), _MAX_PATH - 1);
2929 strncpy(path_shadow, s_path.toLocal8Bit().constData(), PATH_MAX - 1);
3030
3131 // if(emu) {
3232 emit sig_close_hard_disk(drv);
3333 emit sig_open_hard_disk(drv, s_path);
3434 menu_hdds[drv]->do_update_histories(listHDDs[drv]);
35- menu_hdds[drv]->do_set_initialize_directory(config.initial_hard_disk_dir);
35+ menu_hdds[drv]->do_set_initialize_directory(p_config->initial_hard_disk_dir);
3636 menu_hdds[drv]->do_clear_inner_media();
3737 // }
3838 return 0;
@@ -45,15 +45,15 @@ void Ui_MainWindowBase::_open_hard_disk(int drv, const QString fname)
4545 if(fname.length() <= 0) return;
4646 drv = drv & 7;
4747 strncpy(path_shadow, fname.toLocal8Bit().constData(), PATH_MAX - 1);
48- UPDATE_HISTORY(path_shadow, config.recent_hard_disk_path[drv], listHDDs[drv]);
49- strncpy(config.initial_hard_disk_dir, get_parent_dir((const _TCHAR *)path_shadow), _MAX_PATH - 1);
48+ UPDATE_HISTORY(path_shadow, p_config->recent_hard_disk_path[drv], listHDDs[drv]);
49+ strncpy(p_config->initial_hard_disk_dir, get_parent_dir((const _TCHAR *)path_shadow), _MAX_PATH - 1);
5050 // Update List
5151 strncpy(path_shadow, fname.toLocal8Bit().constData(), PATH_MAX - 1);
5252 // if(emu) {
5353 emit sig_close_hard_disk(drv);
5454 emit sig_open_hard_disk(drv, fname);
5555 menu_hdds[drv]->do_update_histories(listHDDs[drv]);
56- menu_hdds[drv]->do_set_initialize_directory(config.initial_hard_disk_dir);
56+ menu_hdds[drv]->do_set_initialize_directory(p_config->initial_hard_disk_dir);
5757 menu_hdds[drv]->do_clear_inner_media();
5858 // }
5959 }
Show on old repository browser