OSDN Git Service

[VM][FM7] Fix pointing outs from Mr.Takeda.
authorK.Ohta <whatisthis.sowhat@gmail.com>
Tue, 7 Apr 2015 19:37:44 +0000 (04:37 +0900)
committerK.Ohta <whatisthis.sowhat@gmail.com>
Tue, 7 Apr 2015 19:37:44 +0000 (04:37 +0900)
[VM][General] Fix compilation errors.

source/src/common.h
source/src/emu.h
source/src/qt/common/qt_gldraw.cpp
source/src/vm/datarec.h
source/src/vm/debugger.h
source/src/vm/fm7/fm7.h
source/src/vm/fm7/keyboard.cpp
source/src/vm/mame/emu/cpu/i86/i286.c
source/src/vm/pc9801/pc9801.h
source/src/vm/z80.h

index 5389fc7..d9f18c9 100644 (file)
@@ -354,12 +354,12 @@ typedef union {
 } pair;
 
 // max/min from WinDef.h
-#ifndef max
-#define max(a,b) (((a) > (b)) ? (a) : (b))
-#endif
-#ifndef min
-#define min(a,b) (((a) < (b)) ? (a) : (b))
-#endif
+//#ifndef max
+//#define max(a,b) (((a) > (b)) ? (a) : (b))
+//#endif
+//#ifndef min
+//#define min(a,b) (((a) < (b)) ? (a) : (b))
+//#endif
 
 // rgb color
 //#define _RGB888
index e27acdf..2c303d0 100644 (file)
 #elif defined(_USE_QT)
 # include <SDL2/SDL.h>
 //# include "menuclasses.h"
-# include "mainwidget.h"
-# include "qt_gldraw.h"
-# include "emu_utils.h"
-# include "qt_main.h"
+//# include "mainwidget.h"
+//# include "qt_gldraw.h"
+//# include "emu_utils.h"
+//# include "qt_main.h"
 # include "simd_types.h"
 // Wrapper of WIN32->*nix
 
@@ -236,6 +236,9 @@ class EMU;
 class FIFO;
 class FILEIO;
 #endif
+#if defined(_USE_QT)
+class GLDrawClass;
+#endif
 
 #if defined(_USE_AGAR) || defined(_USE_QT)
         typedef Uint32 scrntype;
index c9cc92f..75c776e 100644 (file)
@@ -45,7 +45,7 @@ void GLDrawClass::SetBrightRGB(float r, float g, float b)
 extern class GLCLDraw *cldraw;
 extern void InitContextCL(void);
 #endif
-
+extern EMU *emu;
 
 // Grids
 
index 5bf0e1e..75a4e02 100644 (file)
@@ -93,18 +93,17 @@ protected:
        int load_t77_image();
        int load_mzt_image();
        
-       
 #if defined(_USE_AGAR) || defined(_USE_SDL) || defined(_USE_QT)   
         unsigned int min(int x, unsigned int y) {
-          if((unsigned int)x < y) return (unsigned int)x;
-          return y;
+               if((unsigned int)x < y) return (unsigned int)x;
+               return y;
        }
         unsigned int max(int x, unsigned int y) {
-          if((unsigned int)x > y) return (unsigned int)x;
-          return y;
+               if((unsigned int)x > y) return (unsigned int)x;
+               return y;
        }
 #endif   
-public:
+ public:
        DATAREC(VM* parent_vm, EMU* parent_emu) : DEVICE(parent_vm, parent_emu)
        {
                init_output_signals(&outputs_out);
index 3b28186..95703cc 100644 (file)
 #include "vm.h"
 #include "../emu.h"
 #include "device.h"
+#if defined(_USE_QT)
+#include <SDL2/SDL.h>
+
+#define Sleep(n) SDL_Delay(n)
+#endif
 
 #ifdef USE_DEBUGGER
 
index 8cea084..62bc9d2 100644 (file)
@@ -312,7 +312,7 @@ public:
        void open_disk(int drv, _TCHAR* file_path, int offset);
        void close_disk(int drv);
        bool disk_inserted(int drv);
-#define USE_DISK_WRITE_PROTECT
+#if defined(USE_DISK_WRITE_PROTECT)
        void write_protect_fd(int drv, bool flag);
        bool is_write_protect_fd(int drv);
 #endif
@@ -325,7 +325,6 @@ public:
 #if defined(USE_TAPE_PTR)
         int get_tape_ptr(void);
 #endif
-       
        void update_config();
        //void save_state(FILEIO* state_fio);
        //bool load_state(FILEIO* state_fio);
index 70cf7f0..2686109 100644 (file)
@@ -1547,7 +1547,7 @@ KEYBOARD::KEYBOARD(VM *parent_vm, EMU *parent_emu) : DEVICE(parent_vm, parent_em
        init_output_signals(&ins_led);
 }
 
-KEYBOARD::release()
+void KEYBOARD::release(void)
 {
        cmd_fifo->release();
        data_fifo->release();
index 6cacaf6..c9338bc 100644 (file)
@@ -22,6 +22,7 @@
 
 #include "i86time.c"
 
+
 /***************************************************************************/
 /* cpu state                                                               */
 /***************************************************************************/
index 5b959cf..2f4aa45 100644 (file)
@@ -357,7 +357,7 @@ public:
 #if defined(USE_DISK_WRITE_PROTECT)
         void write_protect_fd(int drv, bool flag);
         bool is_write_protect_fd(int drv);
-#edndif
+#endif
 #if defined(SUPPORT_CMT_IF) || defined(_PC98DO)
        void play_tape(_TCHAR* file_path);
        void rec_tape(_TCHAR* file_path);
index 1841cc7..73bb053 100644 (file)
@@ -108,7 +108,7 @@ private:
           if(x < y) return y;
           return x;
        }
-#endif   
+#endif
 public:
        Z80(VM* parent_vm, EMU* parent_emu) : DEVICE(parent_vm, parent_emu)
        {