OSDN Git Service

[Qt][VM][FM7] Fix FTBFS with MinGW32.
authorK.Ohta <whatisthis.sowhat@gmail.com>
Thu, 10 May 2018 12:02:33 +0000 (21:02 +0900)
committerK.Ohta <whatisthis.sowhat@gmail.com>
Thu, 10 May 2018 12:02:33 +0000 (21:02 +0900)
source/src/qt/gui/draw_thread.cpp
source/src/qt/osd.h
source/src/vm/fm7/keyboard_tables.h

index 4bfd043..62e35fd 100644 (file)
@@ -137,23 +137,6 @@ void DrawThreadClass::doWork(const QString &param)
        bDrawReq = false;
        if(renderSemaphore == NULL) goto __exit;
        do {
-#if 0
-               _rate = (wait_refresh < emu_frame_rate) ? emu_frame_rate : wait_refresh;
-               do_draw_one_turn(bDrawReq);
-               if((bDrawReq) && (draw_screen_buffer != NULL)) {
-                       bDrawReq = false;
-               }
-               if(wait_count <= 0.0f) {
-                       wait_count = wait_count + _rate;
-               } else if(wait_count < 8.0) {
-                       msleep(8);
-                       wait_count = wait_count + _rate - 8.0;
-               } else {
-                       wait_factor = (int)wait_count;
-                       msleep(wait_factor);
-                       wait_count -= (qreal)wait_factor;
-               }
-#else
                _rate = (wait_refresh < emu_frame_rate) ? emu_frame_rate : wait_refresh;
                if(_rate < 2.0) {
                        wait_factor = 2.0;
@@ -171,8 +154,6 @@ void DrawThreadClass::doWork(const QString &param)
                if(draw_screen_buffer == NULL) _d = false;
                if((_d) && (draw_screen_buffer != NULL)) bDrawReq = false;
                do_draw_one_turn(_d);
-#endif
-       
        } while(bRunThread);
 __exit:
        csp_logger->debug_log(CSP_LOG_INFO, CSP_LOG_TYPE_GENERAL,
index 22dec8d..8ef4792 100644 (file)
@@ -11,6 +11,7 @@
 #define _QT_OSD_H_
 
 #include "osd_base.h"
+#include "gui/qt_input.h" // Key code table (VK_foo).
 
 class GLDrawClass;
 class EmuThreadClass;
index 59b7d07..1704a82 100644 (file)
 #define _FM7_KEYBOARD_TABLES_H
 
 #include "fm7_keyboard.h"
+#if !defined(VK_OEM_CSP_KPRET)
+#     define VK_OEM_CSP_KPRET 0x9f
+#endif
+
 
 const uint16_t vk_matrix_106[0x68] = { // VK
        // +0, +1, +2, +3, +4, +5, +6, +7