OSDN Git Service

[Qt][OSD] Fix linkage error for OSD, WIN32.
authorK.Ohta <whatisthis.sowhat@gmail.com>
Sat, 24 Oct 2020 09:05:51 +0000 (18:05 +0900)
committerK.Ohta <whatisthis.sowhat@gmail.com>
Sat, 24 Oct 2020 09:05:51 +0000 (18:05 +0900)
source/src/qt/osd.h
source/src/qt/osd_base.cpp
source/src/qt/osd_base.h
source/src/qt/osd_wrapper.cpp

index d49bdff..7d3c265 100644 (file)
@@ -77,6 +77,8 @@ public:
        int get_window_mode_height(int mode);
        double get_window_mode_power(int mode);
        QString get_vm_config_name(void);
+       void reset_vm_node(void);
+       const _TCHAR *get_lib_common_vm_version();
 
        // Movie/Video
        void get_video_buffer();
index 0f75725..fdb9800 100644 (file)
@@ -360,18 +360,6 @@ void OSD_BASE::reset_vm_node(void)
        device_node_list.clear();
        p_logger->reset();
        max_vm_nodes = 0;
-       if(vm == NULL) return;
-       for(DEVICE *p = vm->first_device; p != NULL; p = p->next_device) {
-               sp.id = p->this_device_id;
-               sp.name = p->this_device_name;
-               p_logger->set_device_name(sp.id, (char *)sp.name);
-               p_logger->debug_log(CSP_LOG_DEBUG, CSP_LOG_TYPE_GENERAL,  "Device %d :%s", sp.id, sp.name);
-               device_node_list.append(sp);
-               if(max_vm_nodes <= p->this_device_id) max_vm_nodes = p->this_device_id + 1;
-       }
-       for(DEVICE *p = vm->first_device; p != NULL; p = p->next_device) {
-               emit sig_update_device_node_name(p->this_device_id, p->this_device_name);
-       }
 }
 
 void OSD_BASE::debug_log(int level, int domain_num, char *strbuf)
@@ -637,11 +625,7 @@ void OSD_BASE::set_hdd_image_name(int drv, _TCHAR *filename)
 // Moved from OSD_WRAPPER.
 const _TCHAR *OSD_BASE::get_lib_common_vm_version()
 {
-       if(vm->first_device != NULL) {
-               return vm->first_device->get_lib_common_vm_version();
-       } else {
-               return (const _TCHAR *)"\0";
-       }
+       return (const _TCHAR *)"\0";
 }
 
 const _TCHAR *OSD_BASE::get_lib_common_vm_git_version()
index a5ee1d6..ba03bfb 100644 (file)
@@ -588,14 +588,14 @@ public:
        void unlock_vm(void);
        void force_unlock_vm(void);
        bool is_vm_locked(void);
-       const _TCHAR *get_lib_common_vm_version();
+       virtual const _TCHAR *get_lib_common_vm_version();
        const _TCHAR *get_lib_common_vm_git_version();
        const _TCHAR *get_lib_osd_version();
        
        // Wrapper
        virtual void set_draw_thread(DrawThreadClass *handler);
        virtual QString get_vm_config_name(void);
-       void reset_vm_node(void);
+       virtual void reset_vm_node(void);
        
        void set_device_name(int id, char *name);
        
index 9ac06f6..4bcf9c5 100644 (file)
@@ -861,3 +861,32 @@ uint64_t OSD::get_vm_current_clock_uint64()
        return vm->get_current_clock_uint64();
 }
 
+const _TCHAR *OSD::get_lib_common_vm_version()
+{
+       if(vm->first_device != NULL) {
+               return vm->first_device->get_lib_common_vm_version();
+       } else {
+               return (const _TCHAR *)"\0";
+       }
+}
+
+void OSD::reset_vm_node(void)
+{
+       device_node_t sp;
+       device_node_list.clear();
+       p_logger->reset();
+       max_vm_nodes = 0;
+       if(vm == NULL) return;
+       for(DEVICE *p = vm->first_device; p != NULL; p = p->next_device) {
+               sp.id = p->this_device_id;
+               sp.name = p->this_device_name;
+               p_logger->set_device_name(sp.id, (char *)sp.name);
+               p_logger->debug_log(CSP_LOG_DEBUG, CSP_LOG_TYPE_GENERAL,  "Device %d :%s", sp.id, sp.name);
+               device_node_list.append(sp);
+               if(max_vm_nodes <= p->this_device_id) max_vm_nodes = p->this_device_id + 1;
+       }
+       for(DEVICE *p = vm->first_device; p != NULL; p = p->next_device) {
+               emit sig_update_device_node_name(p->this_device_id, p->this_device_name);
+       }
+}
+