From 292d506ed8ab6846b6b17e183fe351cdf388c6ba Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 30 Dec 2017 13:35:47 +0100 Subject: [PATCH] Fix more MSVC Griffin build errors --- cores/internal_cores.h | 5 +++++ file_path_special.h | 5 +++++ gfx/common/win32_common.c | 2 -- gfx/common/win32_common.h | 11 +++++------ griffin/griffin.c | 16 ---------------- led/led_driver.h | 15 ++++----------- list_special.h | 5 +++++ menu/menu_networking.h | 2 ++ 8 files changed, 26 insertions(+), 35 deletions(-) diff --git a/cores/internal_cores.h b/cores/internal_cores.h index aa756ed349..59edc75ae8 100644 --- a/cores/internal_cores.h +++ b/cores/internal_cores.h @@ -20,11 +20,14 @@ #include #include +#include #ifdef HAVE_CONFIG_H #include "../config.h" #endif +RETRO_BEGIN_DECLS + void libretro_dummy_retro_init(void); void libretro_dummy_retro_deinit(void); @@ -300,4 +303,6 @@ size_t libretro_videoprocessor_retro_get_memory_size(unsigned id); #endif +RETRO_END_DECLS + #endif diff --git a/file_path_special.h b/file_path_special.h index 4d959e1899..0363dbd9d5 100644 --- a/file_path_special.h +++ b/file_path_special.h @@ -21,6 +21,9 @@ #include #include +#include + +RETRO_BEGIN_DECLS enum file_path_enum { @@ -141,4 +144,6 @@ bool fill_pathname_application_data(char *s, size_t len); void fill_pathname_application_special(char *s, size_t len, enum application_special_type type); +RETRO_END_DECLS + #endif diff --git a/gfx/common/win32_common.c b/gfx/common/win32_common.c index e03df00404..e5dbb84928 100644 --- a/gfx/common/win32_common.c +++ b/gfx/common/win32_common.c @@ -73,8 +73,6 @@ const GUID GUID_DEVINTERFACE_HID = { 0x4d1e55b2, 0xf16f, 0x11Cf, { 0x88, 0xcb, 0x00, 0x11, 0x11, 0x00, 0x00, 0x30 } }; HDEVNOTIFY notification_handler; -extern LRESULT win32_menu_loop(HWND owner, WPARAM wparam); - #if defined(HAVE_D3D9) || defined(HAVE_D3D8) extern bool dinput_handle_message(void *dinput, UINT message, WPARAM wParam, LPARAM lParam); diff --git a/gfx/common/win32_common.h b/gfx/common/win32_common.h index 9df4db8246..a3156b25d8 100644 --- a/gfx/common/win32_common.h +++ b/gfx/common/win32_common.h @@ -32,6 +32,7 @@ #include #include +#include #include "../../driver.h" #include "../video_driver.h" @@ -42,9 +43,7 @@ #include "../../ui/drivers/ui_win32.h" #endif -#ifdef __cplusplus -extern "C" { -#endif +RETRO_BEGIN_DECLS #ifndef _XBOX extern unsigned g_resize_width; @@ -141,8 +140,8 @@ LRESULT CALLBACK WndProcGDI(HWND hwnd, UINT message, BOOL IsIconic(HWND hwnd); #endif -#ifdef __cplusplus -} -#endif +LRESULT win32_menu_loop(HWND owner, WPARAM wparam); + +RETRO_END_DECLS #endif diff --git a/griffin/griffin.c b/griffin/griffin.c index 624b0b2613..a40792503e 100644 --- a/griffin/griffin.c +++ b/griffin/griffin.c @@ -1085,16 +1085,8 @@ MENU #include "../menu/menu_cbs.c" #include "../menu/menu_content.c" -#ifdef __cplusplus -extern "C" { -#endif - #include "../menu/menu_networking.c" -#ifdef __cplusplus -} -#endif - #include "../menu/widgets/menu_entry.c" #include "../menu/widgets/menu_filebrowser.c" #include "../menu/widgets/menu_dialog.c" @@ -1204,10 +1196,6 @@ extern "C" { #include "../command.c" -#ifdef __cplusplus -extern "C" { -#endif - #if defined(HAVE_NETWORKING) #include "../libretro-common/net/net_http_parse.c" #endif @@ -1330,7 +1318,3 @@ HTTP SERVER #include "../deps/civetweb/civetweb.c" #include "network/httpserver/httpserver.c" #endif - -#ifdef __cplusplus -} -#endif diff --git a/led/led_driver.h b/led/led_driver.h index d86e368a3a..9b815026bf 100644 --- a/led/led_driver.h +++ b/led/led_driver.h @@ -20,24 +20,17 @@ #include #include -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - #include #include -#include -#include - -#include "../msg_hash.h" +#include RETRO_BEGIN_DECLS typedef struct led_driver { - void (*init)(void); - void (*free)(void); - void (*set_led)(int led,int value); + void (*init)(void); + void (*free)(void); + void (*set_led)(int led,int value); } led_driver_t; bool led_driver_init(void); diff --git a/list_special.h b/list_special.h index def7686d62..f0e8bfc285 100644 --- a/list_special.h +++ b/list_special.h @@ -22,6 +22,9 @@ #include #include +#include + +RETRO_BEGIN_DECLS enum dir_list_type { @@ -62,4 +65,6 @@ struct string_list *string_list_new_special(enum string_list_type type, const char *char_list_new_special(enum string_list_type type, void *data); +RETRO_END_DECLS + #endif diff --git a/menu/menu_networking.h b/menu/menu_networking.h index 37c0f6f9fb..9347b5bf00 100644 --- a/menu/menu_networking.h +++ b/menu/menu_networking.h @@ -19,7 +19,9 @@ #define _MENU_NETWORKING_H #include + #include +#include #include