From 1da727cd540637a98558e07c4e383b9025ab7fcc Mon Sep 17 00:00:00 2001 From: twinaphex Date: Wed, 11 Nov 2015 20:23:19 +0100 Subject: [PATCH] convert keyboard_event_win32 to C++ --- gfx/common/win32_common.h | 2 +- griffin/griffin.c | 4 ---- griffin/griffin_cpp.cpp | 8 ++++++++ .../{keyboard_event_win32.c => keyboard_event_win32.cpp} | 0 4 files changed, 9 insertions(+), 5 deletions(-) rename input/drivers_keyboard/{keyboard_event_win32.c => keyboard_event_win32.cpp} (100%) diff --git a/gfx/common/win32_common.h b/gfx/common/win32_common.h index 4b0e88054c..76ff1cd5fa 100644 --- a/gfx/common/win32_common.h +++ b/gfx/common/win32_common.h @@ -39,7 +39,7 @@ extern bool g_resized; extern bool g_quit; extern HWND g_hwnd; -extern "C" LRESULT win32_handle_keyboard_event(HWND hwnd, UINT message, +LRESULT win32_handle_keyboard_event(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam); LRESULT win32_menu_loop(HWND handle, WPARAM wparam); diff --git a/griffin/griffin.c b/griffin/griffin.c index 7845d1e35a..b93bd20a04 100644 --- a/griffin/griffin.c +++ b/griffin/griffin.c @@ -415,10 +415,6 @@ INPUT (HID) KEYBOARD EVENT ============================================================ */ -#if defined(_WIN32) && !defined(_XBOX) -#include "../input/drivers_keyboard/keyboard_event_win32.c" -#endif - #ifdef HAVE_X11 #include "../input/drivers_keyboard/keyboard_event_x11.c" #endif diff --git a/griffin/griffin_cpp.cpp b/griffin/griffin_cpp.cpp index d81d425e2d..b28331f5c4 100644 --- a/griffin/griffin_cpp.cpp +++ b/griffin/griffin_cpp.cpp @@ -32,6 +32,14 @@ AUDIO #include "../audio/drivers/xaudio.cpp" #endif +/*============================================================ + KEYBOARD EVENT + ============================================================ */ + +#if defined(_WIN32) && !defined(_XBOX) +#include "../input/drivers_keyboard/keyboard_event_win32.cpp" +#endif + /*============================================================ UI COMMON CONTEXT ============================================================ */ diff --git a/input/drivers_keyboard/keyboard_event_win32.c b/input/drivers_keyboard/keyboard_event_win32.cpp similarity index 100% rename from input/drivers_keyboard/keyboard_event_win32.c rename to input/drivers_keyboard/keyboard_event_win32.cpp