OSDN Git Service

[VM][FM16PI] .
[csp-qt/common_source_project-fm7.git] / source / src / vm / fm16pi / fm16pi.cpp
index c9fb452..c9c4992 100644 (file)
@@ -441,11 +441,8 @@ bool VM::process_state(FILEIO* state_fio, bool loading)
                return false;
        }
        for(DEVICE* device = first_device; device; device = device->next_device) {
-               // Note: typeid(foo).name is fixed by recent ABI.Not dec 6.
-               // const char *name = typeid(*device).name();
-               //       But, using get_device_name() instead of typeid(foo).name() 20181008 K.O
-               const char *name = device->get_device_name();
-               int len = (int)strlen(name);
+               const _TCHAR *name = char_to_tchar(typeid(*device).name() + 6); // skip "class "
+               int len = (int)_tcslen(name);
                
                if(!state_fio->StateCheckInt32(len)) {
                        if(loading) {