From 2ea322d9ddcd7532f610378775dd4fd9ffa3d5fe Mon Sep 17 00:00:00 2001 From: "K.Ohta" Date: Wed, 8 Apr 2015 04:37:44 +0900 Subject: [PATCH] [VM][FM7] Fix pointing outs from Mr.Takeda. [VM][General] Fix compilation errors. --- source/src/common.h | 12 ++++++------ source/src/emu.h | 11 +++++++---- source/src/qt/common/qt_gldraw.cpp | 2 +- source/src/vm/datarec.h | 11 +++++------ source/src/vm/debugger.h | 5 +++++ source/src/vm/fm7/fm7.h | 3 +-- source/src/vm/fm7/keyboard.cpp | 2 +- source/src/vm/mame/emu/cpu/i86/i286.c | 1 + source/src/vm/pc9801/pc9801.h | 2 +- source/src/vm/z80.h | 2 +- 10 files changed, 29 insertions(+), 22 deletions(-) diff --git a/source/src/common.h b/source/src/common.h index 5389fc77f..d9f18c9bf 100644 --- a/source/src/common.h +++ b/source/src/common.h @@ -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 diff --git a/source/src/emu.h b/source/src/emu.h index e27acdf16..2c303d0dc 100644 --- a/source/src/emu.h +++ b/source/src/emu.h @@ -38,10 +38,10 @@ #elif defined(_USE_QT) # include //# 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; diff --git a/source/src/qt/common/qt_gldraw.cpp b/source/src/qt/common/qt_gldraw.cpp index c9cc92f21..75c776ed7 100644 --- a/source/src/qt/common/qt_gldraw.cpp +++ b/source/src/qt/common/qt_gldraw.cpp @@ -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 diff --git a/source/src/vm/datarec.h b/source/src/vm/datarec.h index 5bf0e1e4c..75a4e02bb 100644 --- a/source/src/vm/datarec.h +++ b/source/src/vm/datarec.h @@ -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); diff --git a/source/src/vm/debugger.h b/source/src/vm/debugger.h index 3b2818679..95703ccff 100644 --- a/source/src/vm/debugger.h +++ b/source/src/vm/debugger.h @@ -13,6 +13,11 @@ #include "vm.h" #include "../emu.h" #include "device.h" +#if defined(_USE_QT) +#include + +#define Sleep(n) SDL_Delay(n) +#endif #ifdef USE_DEBUGGER diff --git a/source/src/vm/fm7/fm7.h b/source/src/vm/fm7/fm7.h index 8cea084c0..62bc9d2c7 100644 --- a/source/src/vm/fm7/fm7.h +++ b/source/src/vm/fm7/fm7.h @@ -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); diff --git a/source/src/vm/fm7/keyboard.cpp b/source/src/vm/fm7/keyboard.cpp index 70cf7f0e4..26861091a 100644 --- a/source/src/vm/fm7/keyboard.cpp +++ b/source/src/vm/fm7/keyboard.cpp @@ -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(); diff --git a/source/src/vm/mame/emu/cpu/i86/i286.c b/source/src/vm/mame/emu/cpu/i86/i286.c index 6cacaf620..c9338bc13 100644 --- a/source/src/vm/mame/emu/cpu/i86/i286.c +++ b/source/src/vm/mame/emu/cpu/i86/i286.c @@ -22,6 +22,7 @@ #include "i86time.c" + /***************************************************************************/ /* cpu state */ /***************************************************************************/ diff --git a/source/src/vm/pc9801/pc9801.h b/source/src/vm/pc9801/pc9801.h index 5b959cf2e..2f4aa450a 100644 --- a/source/src/vm/pc9801/pc9801.h +++ b/source/src/vm/pc9801/pc9801.h @@ -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); diff --git a/source/src/vm/z80.h b/source/src/vm/z80.h index 1841cc777..73bb05352 100644 --- a/source/src/vm/z80.h +++ b/source/src/vm/z80.h @@ -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) { -- 2.11.0