OSDN Git Service

[VM][MZ2800] Fix crash at building VM. Thanks to http://hanabi.2ch.net/test/read...
authorK.Ohta <whatisthis.sowhat@gmail.com>
Sat, 19 Mar 2016 15:41:30 +0000 (00:41 +0900)
committerK.Ohta <whatisthis.sowhat@gmail.com>
Sat, 19 Mar 2016 15:41:30 +0000 (00:41 +0900)
source/build-cmake/mz2800/CMakeLists.txt
source/src/vm/mz2800/mz2800.cpp

index 2247660..48cdbfb 100644 (file)
@@ -34,6 +34,7 @@ set(VMFILES
                   z80pio.cpp
                   z80sio.cpp
                   mz1p17.cpp
+                  prnfile.cpp
                   
                   disk.cpp
                   event.cpp
index a41eab0..7d6fa73 100644 (file)
@@ -128,7 +128,8 @@ VM::VM(EMU* parent_emu) : emu(parent_emu)
        memory->set_context_crtc(crtc);
        mouse->set_context_sio(sio);
        if(config.printer_device_type == 0) {  
-               PRNFILE *prnfile = (PRNFILE *)printer;
+               //PRNFILE *prnfile = (PRNFILE *)printer;
+               PRNFILE *prnfile = new PRNFILE(this, emu);
                prnfile->set_context_busy(not_busy, SIG_NOT_INPUT, 1);
                printer->set_context_prn(prnfile);
        } else if(config.printer_device_type == 1) {